--- branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp 2004/11/05 02:56:22 1713 +++ branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp 2004/11/10 22:01:06 1725 @@ -55,7 +55,15 @@ class Molecule { class Molecule { public: - Molecule(); + typedef std::vector::iterator AtomIterator; + typedef std::vector::iterator BondIterator; + typedef std::vector::iterator BendIterator; + typedef std::vector::iterator TorsionIterator; + typedef std::vector::iterator RigidBodyIterator; + typedef std::vector::iterator CutoffGroupIterator; + typedef std::vector::iterator IntegrableObjectIterator; + + Molecule(int stampId, int globalIndex); virtual ~Molecule(); /** @@ -72,14 +80,6 @@ class Molecule { */ int setGlobalIndex(int index) { return globalIndex_; - } - - /** - * Returns the local index of this molecule - * @return the local index of this molecule - */ - int getLocalIndex() { - return localIndex_; } /** add an atom into this molecule */ @@ -142,7 +142,11 @@ class Molecule { unsigned int getNConstraints() { return constraints_.size(); } - + + Atom* getAtomAt(unsigned int i) { + assert(i < atoms_.size()); + return atoms_[i]; + } /** * Returns the first atom in this molecule and initialize the iterator. * @return the first atom, return NULL if there is not cut off group in this molecule @@ -239,7 +243,7 @@ class Molecule { friend std::ostream& operator <<(std::ostream& o, Molecule& mol); private: - int localIndex_; + int globalIndex_; std::vector atoms_;