"csrc/vscode:/vscode.git/clone" did not exist on "4e923188f7dd96db44dfa7b73e9e94ab059f7bbf"
Commit abd4ebdc authored by peastman's avatar peastman
Browse files

Exposed getMolecules() in the public API

parent e76cbe31
...@@ -247,6 +247,15 @@ public: ...@@ -247,6 +247,15 @@ public:
* @param stream an input stream the checkpoint data should be read from * @param stream an input stream the checkpoint data should be read from
*/ */
void loadCheckpoint(std::istream& stream); void loadCheckpoint(std::istream& stream);
/**
* Get a description of how the particles in the system are grouped into molecules. Two particles are in the
* same molecule if they are connected by constraints or bonds, where every Force object can define bonds
* in whatever way are appropriate to that force.
*
* Each element lists the indices of all particles in a single molecule. Every particle is guaranteed to
* belong to exactly one molecule.
*/
const std::vector<std::vector<int> >& getMolecules() const;
private: private:
friend class Force; friend class Force;
friend class Platform; friend class Platform;
......
...@@ -278,3 +278,7 @@ void Context::loadCheckpoint(istream& stream) { ...@@ -278,3 +278,7 @@ void Context::loadCheckpoint(istream& stream) {
ContextImpl& Context::getImpl() { ContextImpl& Context::getImpl() {
return *impl; return *impl;
} }
const vector<vector<int> >& Context::getMolecules() const {
return impl->getMolecules();
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment