ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Molecule.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Molecule.hpp (file contents):
Revision 378 by mmeineke, Fri Mar 21 17:42:12 2003 UTC vs.
Revision 658 by tim, Thu Jul 31 15:35:07 2003 UTC

# Line 3 | Line 3
3  
4   #include "Atom.hpp"
5   #include "SRI.hpp"
6 + #include "MoleculeStamp.hpp"
7 + #include "Exclude.hpp"
8  
9 + typedef struct{
10 +  
11 +  int stampID;   // the ID in the BASS component stamp array
12 +  int nAtoms;    // the number of atoms in the molecule
13 +  int nBonds;    // ... .. ..  . .bonds .. .. . . . .
14 +  int nBends;    // . . . . .. . .bends . . . . .. .
15 +  int nTorsions; // .. . . .. . . torsions . . .. . .
16 +  int nOriented; // .. . . . .. . oriented atoms . . .
17 +  int nExcludes; // . . .. . . . .exclude pairs.. . . .
18 +
19 +  Atom** myAtoms;      // the array of atoms
20 +  Exclude** myExcludes;// the array of Excluded pairs
21 +  Bond** myBonds;      // arrays of all the short range interactions
22 +  Bend** myBends;
23 +  Torsion** myTorsions;
24 +
25 +
26 + } molInit;
27 +
28   class Molecule{
29  
30   public:
31    
32 <  Molecule() {}
33 <  ~Molecule() {}
32 >  Molecule( void );
33 >  ~Molecule( void );
34  
35 <  int   getNMembers( void )  { return nMembers; }
36 <  int   getStartAtom( void ) { return startAtom; }
37 <  int   getEndAtom( void )   { return endAtom; }
38 <  int   getStampID( void )   { return stampID; }
35 >  void initialize( molInit &theInit );
36 >
37 >  void setMyIndex( int theIndex ){ myIndex = theIndex;}
38 >  void setGlobalIndex( int theIndex ) { globalIndex = theIndex; }
39 >
40 >  int getMyIndex( void ) { return myIndex; }
41 >  int getGlobalIndex( void ) { return globalIndex; }
42 >
43 >  int getNAtoms   ( void ) {return nAtoms;}
44 >  int getNBonds   ( void ) {return nBonds;}
45 >  int getNBends   ( void ) {return nBends;}
46 >  int getNTorsions( void ) {return nTorsions;}
47 >  int getNOriented( void ) {return nOriented;}
48 >  int getNExcludes( void ) {return nExcludes;}
49 >  int getNMembers ( void ) {return nMembers;}
50 >  int getStampID  ( void ) {return stampID;}
51 >
52 >  Atom**     getMyAtoms   ( void ) {return myAtoms;}
53 >  Bond**     getMyBonds   ( void ) {return myBonds;}
54 >  Bend**     getMyBends   ( void ) {return myBends;}
55 >  Torsion**  getMyTorsions( void ) {return myTorsions;}
56 >  Exclude**  getMyExcludes( void ) {return myExcludes;}
57    
58 <  void   setNMembers( int info )  { nMembers = info; }
20 <  void   setStartAtom( int info ) { startAtom = info; }
21 <  void   setEndAtom( int info )   { endAtom = info; }
22 <  void   setStampID( int info )   { stampID = info; }
58 >  void setStampID( int info ) {stampID = info;}
59    
60  
61 +
62 +
63 +  void calcForces( void );
64 +  double getPotential( void );
65 +  
66 +  void printMe( void );
67 +
68 +  void getCOM( double COM[3] );
69 +  void moveCOM( double delta[3] );
70 +  double getCOMvel( double COMvel[3] );
71 +  
72 +  double getTotalMass();
73 +
74   private:
75  
76 <  int nMembers;
77 <  int startAtom;
78 <  int endAtom;
76 >  int stampID;   // the ID in the BASS component stamp array
77 >  int nAtoms;    // the number of atoms in the molecule
78 >  int nBonds;    // ... .. ..  . .bonds .. .. . . . .
79 >  int nBends;    // . . . . .. . .bends . . . . .. .
80 >  int nTorsions; // .. . . .. . . torsions . . .. . .
81 >  int nOriented; // .. . . . .. . oriented atoms . . .
82 >  int nMembers;  // .. . . . . . .atoms (legacy code) . . .
83 >  int nExcludes; // . . . . .. .. excludes .. . .
84  
85 <  int stampID;
85 >  int myIndex; // mostly just for debug (and for making pressure calcs work)
86 >  int globalIndex;
87 >
88 >  Atom** myAtoms;     // the array of atoms
89 >  Bond** myBonds;     // arrays of all the short range interactions
90 >  Bend** myBends;
91 >  Torsion** myTorsions;
92 >  Exclude** myExcludes; // array of the excluded pairs of long range forces
93 >  
94   };
95  
96   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines