ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Molecule.hpp
Revision: 475
Committed: Tue Apr 8 12:44:18 2003 UTC (21 years, 3 months ago) by gezelter
File size: 2569 byte(s)
Log Message:
Changes to integrate the NVT and NPT ensembles

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
39 int getNAtoms ( void ) {return nAtoms;}
40 int getNBonds ( void ) {return nBonds;}
41 int getNBends ( void ) {return nBends;}
42 int getNTorsions( void ) {return nTorsions;}
43 int getNOriented( void ) {return nOriented;}
44 int getNExcludes( void ) {return nExcludes;}
45 int getNMembers ( void ) {return nMembers;}
46 int getStampID ( void ) {return stampID;}
47
48 Atom** getMyAtoms ( void ) {return myAtoms;}
49 Bond** getMyBonds ( void ) {return myBonds;}
50 Bend** getMyBends ( void ) {return myBends;}
51 Torsion** getMyTorsions( void ) {return myTorsions;}
52 Exclude** getMyExcludes( void ) {return myExcludes;}
53
54 void setStampID( int info ) {stampID = info;}
55
56 void calcForces( void );
57 double getPotential( void );
58
59 void printMe( void );
60
61 void getCOM( double COM[3] );
62 void moveCOM( double delta[3] );
63 double getCOMvel( double COMvel[3] );
64
65 private:
66
67 int stampID; // the ID in the BASS component stamp array
68 int nAtoms; // the number of atoms in the molecule
69 int nBonds; // ... .. .. . .bonds .. .. . . . .
70 int nBends; // . . . . .. . .bends . . . . .. .
71 int nTorsions; // .. . . .. . . torsions . . .. . .
72 int nOriented; // .. . . . .. . oriented atoms . . .
73 int nMembers; // .. . . . . . .atoms (legacy code) . . .
74 int nExcludes; // . . . . .. .. excludes .. . .
75
76 int myIndex; // mostly just for debug
77
78 Atom** myAtoms; // the array of atoms
79 Bond** myBonds; // arrays of all the short range interactions
80 Bend** myBends;
81 Torsion** myTorsions;
82 Exclude** myExcludes; // array of the excluded pairs of long range forces
83
84 };
85
86 #endif