--- trunk/OOPSE/libmdtools/Molecule.hpp 2003/04/03 20:19:50 446 +++ trunk/OOPSE/libmdtools/Molecule.hpp 2003/07/31 15:35:07 658 @@ -16,8 +16,6 @@ typedef struct{ int nOriented; // .. . . . .. . oriented atoms . . . int nExcludes; // . . .. . . . .exclude pairs.. . . . - double* COM; // the location of the center of mass of the molecule - Atom** myAtoms; // the array of atoms Exclude** myExcludes;// the array of Excluded pairs Bond** myBonds; // arrays of all the short range interactions @@ -37,6 +35,10 @@ class Molecule{ (public) void initialize( molInit &theInit ); void setMyIndex( int theIndex ){ myIndex = theIndex;} + void setGlobalIndex( int theIndex ) { globalIndex = theIndex; } + + int getMyIndex( void ) { return myIndex; } + int getGlobalIndex( void ) { return globalIndex; } int getNAtoms ( void ) {return nAtoms;} int getNBonds ( void ) {return nBonds;} @@ -54,14 +56,20 @@ class Molecule{ (public) Exclude** getMyExcludes( void ) {return myExcludes;} void setStampID( int info ) {stampID = info;} + + + void calcForces( void ); double getPotential( void ); void printMe( void ); - double* getCOM(); - void moveCOM(double* delta); + void getCOM( double COM[3] ); + void moveCOM( double delta[3] ); + double getCOMvel( double COMvel[3] ); + + double getTotalMass(); private: @@ -74,7 +82,8 @@ class Molecule{ (public) int nMembers; // .. . . . . . .atoms (legacy code) . . . int nExcludes; // . . . . .. .. excludes .. . . - int myIndex; // mostly just for debug + int myIndex; // mostly just for debug (and for making pressure calcs work) + int globalIndex; Atom** myAtoms; // the array of atoms Bond** myBonds; // arrays of all the short range interactions @@ -82,7 +91,6 @@ class Molecule{ (public) Torsion** myTorsions; Exclude** myExcludes; // array of the excluded pairs of long range forces - double* COM; }; #endif