ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Molecule.hpp
Revision: 490
Committed: Fri Apr 11 15:16:59 2003 UTC (21 years, 2 months ago) by gezelter
File size: 2795 byte(s)
Log Message:
Bug fix in progress for NPT

File Contents

# Content
1 #ifndef _MOLECULE_H_
2 #define _MOLECULE_H_
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( void );
33 ~Molecule( void );
34
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 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 private:
73
74 int stampID; // the ID in the BASS component stamp array
75 int nAtoms; // the number of atoms in the molecule
76 int nBonds; // ... .. .. . .bonds .. .. . . . .
77 int nBends; // . . . . .. . .bends . . . . .. .
78 int nTorsions; // .. . . .. . . torsions . . .. . .
79 int nOriented; // .. . . . .. . oriented atoms . . .
80 int nMembers; // .. . . . . . .atoms (legacy code) . . .
81 int nExcludes; // . . . . .. .. excludes .. . .
82
83 int myIndex; // mostly just for debug (and for making pressure calcs work)
84 int globalIndex;
85
86 Atom** myAtoms; // the array of atoms
87 Bond** myBonds; // arrays of all the short range interactions
88 Bend** myBends;
89 Torsion** myTorsions;
90 Exclude** myExcludes; // array of the excluded pairs of long range forces
91
92 };
93
94 #endif