--- branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp 2004/11/10 22:01:06 1725 +++ branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp 2004/11/24 20:55:03 1782 @@ -38,10 +38,9 @@ #include "math/Vector3.hpp" #include "primitives/Atom.hpp" #include "primitives/RigidBody.hpp" -//#include "primitives/Bond.hpp" -//#include "primitives/Bend.hpp" -//#include "primitives/Torsion.hpp" -#include "primitives/SRI.hpp" +#include "primitives/Bond.hpp" +#include "primitives/Bend.hpp" +#include "primitives/Torsion.hpp" #include "primitives/CutoffGroup.hpp" namespace oopse{ @@ -63,7 +62,7 @@ class Molecule { typedef std::vector::iterator CutoffGroupIterator; typedef std::vector::iterator IntegrableObjectIterator; - Molecule(int stampId, int globalIndex); + Molecule(int stampId, int globalIndex, const std::string& molName); virtual ~Molecule(); /** @@ -72,8 +71,22 @@ class Molecule { */ int getGlobalIndex() { return globalIndex_; + } + + /** + * Returns the stamp id of this molecule + * @note Ideally, every molecule should keep a pointer of its molecule stamp instead of its + * stamp id. However, the pointer will become invalid, if the molecule migrate to other processor. + */ + int getStampId() { + return stampId_; } + /** Returns the name of the molecule */ + std::string getType() { + return moleculeName_; + } + /** * Sets the global index of this molecule. * @param new global index to be set @@ -82,6 +95,7 @@ class Molecule { return globalIndex_; } + /** add an atom into this molecule */ void addAtom(Atom* atom); @@ -218,12 +232,7 @@ class Molecule { Constraint* nextConstraint(std::vector::iterator& i); - //void setStampID( int info ) {stampID = info;} - void calcForces( void ); - - void atoms2rigidBodies( void ); - /** return the total potential energy of short range interaction of this molecule */ double getPotential(); @@ -255,7 +264,8 @@ class Molecule { std::vector cutoffGroups_; std::vector constraints_; - int stampID; + int stampId_; + std::string moleculeName_; }; } //namespace oopse