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 446 by gezelter, Thu Apr 3 20:19:50 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 +  double* COM;   // the location of the center of mass of the molecule
20 +  
21 +  Atom** myAtoms;      // the array of atoms
22 +  Exclude** myExcludes;// the array of Excluded pairs
23 +  Bond** myBonds;      // arrays of all the short range interactions
24 +  Bend** myBends;
25 +  Torsion** myTorsions;
26 +
27 +
28 + } molInit;
29 +
30   class Molecule{
31  
32   public:
33    
34 <  Molecule() {}
35 <  ~Molecule() {}
34 >  Molecule( void );
35 >  ~Molecule( void );
36  
37 <  int   getNMembers( void )  { return nMembers; }
38 <  int   getStartAtom( void ) { return startAtom; }
39 <  int   getEndAtom( void )   { return endAtom; }
40 <  int   getStampID( void )   { return stampID; }
37 >  void initialize( molInit &theInit );
38 >
39 >  void setMyIndex( int theIndex ){ myIndex = theIndex;}
40 >
41 >  int getNAtoms   ( void ) {return nAtoms;}
42 >  int getNBonds   ( void ) {return nBonds;}
43 >  int getNBends   ( void ) {return nBends;}
44 >  int getNTorsions( void ) {return nTorsions;}
45 >  int getNOriented( void ) {return nOriented;}
46 >  int getNExcludes( void ) {return nExcludes;}
47 >  int getNMembers ( void ) {return nMembers;}
48 >  int getStampID  ( void ) {return stampID;}
49 >
50 >  Atom**     getMyAtoms   ( void ) {return myAtoms;}
51 >  Bond**     getMyBonds   ( void ) {return myBonds;}
52 >  Bend**     getMyBends   ( void ) {return myBends;}
53 >  Torsion**  getMyTorsions( void ) {return myTorsions;}
54 >  Exclude**  getMyExcludes( void ) {return myExcludes;}
55    
56 <  void   setNMembers( int info )  { nMembers = info; }
57 <  void   setStartAtom( int info ) { startAtom = info; }
58 <  void   setEndAtom( int info )   { endAtom = info; }
59 <  void   setStampID( int info )   { stampID = info; }
56 >  void setStampID( int info ) {stampID = info;}
57 >
58 >  void calcForces( void );
59 >  double getPotential( void );
60    
61 +  void printMe( void );
62  
63 +  double* getCOM();
64 +  void moveCOM(double* delta);
65 +
66   private:
67  
68 <  int nMembers;
69 <  int startAtom;
70 <  int endAtom;
68 >  int stampID;   // the ID in the BASS component stamp array
69 >  int nAtoms;    // the number of atoms in the molecule
70 >  int nBonds;    // ... .. ..  . .bonds .. .. . . . .
71 >  int nBends;    // . . . . .. . .bends . . . . .. .
72 >  int nTorsions; // .. . . .. . . torsions . . .. . .
73 >  int nOriented; // .. . . . .. . oriented atoms . . .
74 >  int nMembers;  // .. . . . . . .atoms (legacy code) . . .
75 >  int nExcludes; // . . . . .. .. excludes .. . .
76  
77 <  int stampID;
77 >  int myIndex; // mostly just for debug
78 >
79 >  Atom** myAtoms;     // the array of atoms
80 >  Bond** myBonds;     // arrays of all the short range interactions
81 >  Bend** myBends;
82 >  Torsion** myTorsions;
83 >  Exclude** myExcludes; // array of the excluded pairs of long range forces
84 >  
85 >  double* COM;
86   };
87  
88   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines