ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-2.0/src/primitives/Molecule.hpp (file contents):
Revision 1725 by tim, Wed Nov 10 22:01:06 2004 UTC vs.
Revision 1782 by tim, Wed Nov 24 20:55:03 2004 UTC

# Line 38 | Line 38
38   #include "math/Vector3.hpp"
39   #include "primitives/Atom.hpp"
40   #include "primitives/RigidBody.hpp"
41 < //#include "primitives/Bond.hpp"
42 < //#include "primitives/Bend.hpp"
43 < //#include "primitives/Torsion.hpp"
44 < #include "primitives/SRI.hpp"
41 > #include "primitives/Bond.hpp"
42 > #include "primitives/Bend.hpp"
43 > #include "primitives/Torsion.hpp"
44   #include "primitives/CutoffGroup.hpp"
45  
46   namespace oopse{
# Line 63 | Line 62 | class Molecule {
62          typedef std::vector<CutoffGroup*>::iterator CutoffGroupIterator;
63          typedef std::vector<StuntDouble*>::iterator IntegrableObjectIterator;        
64  
65 <        Molecule(int stampId, int globalIndex);
65 >        Molecule(int stampId, int globalIndex, const std::string& molName);
66          virtual ~Molecule();
67  
68          /**
# Line 72 | Line 71 | class Molecule {
71           */
72          int getGlobalIndex() {
73              return globalIndex_;
74 +        }
75 +
76 +        /**
77 +         * Returns the stamp id of this molecule
78 +         * @note Ideally, every molecule should keep a pointer of its molecule stamp instead of its
79 +         * stamp id. However, the pointer will become invalid, if the molecule migrate to other processor.
80 +         */
81 +        int getStampId() {
82 +            return stampId_;
83          }
84  
85 +        /** Returns the name of the molecule */
86 +        std::string getType() {
87 +            return moleculeName_;
88 +        }
89 +        
90          /**
91           * Sets the global index of this molecule.
92           * @param new global index to be set
# Line 82 | Line 95 | class Molecule {
95              return globalIndex_;
96          }
97  
98 +        
99          /** add an atom into this molecule */
100          void addAtom(Atom* atom);
101  
# Line 218 | Line 232 | class Molecule {
232  
233          Constraint* nextConstraint(std::vector<Constraint*>::iterator& i);
234          
221        //void setStampID( int info ) {stampID = info;}
235  
223        void calcForces( void );
224
225        void atoms2rigidBodies( void );
226
236          /** return the total potential energy of short range interaction of this molecule */
237          double getPotential();
238  
# Line 255 | Line 264 | class Molecule {
264          std::vector<CutoffGroup*> cutoffGroups_;
265          std::vector<Constraint*> constraints_;
266  
267 <        int stampID;
267 >        int stampId_;
268 >        std::string moleculeName_;
269   };
270  
271   } //namespace oopse

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines