1 /* -*- c++ -*- */ 2 #ifndef MOLECULE_H 3 #define MOLECULE_H 4 5 #include "Real.h" 6 #include "Vector3D.h" 7 #include "simpleTypes.h" 8 #include <vector> 9 #include <set> 10 11 namespace ProtoMol { 12 //_________________________________________________________________ Molecule 13 14 /** 15 This class defines the information for one molecule. It contains the mass 16 of the molecule, its center of mass position and momentum, and a list of the 17 atoms on the molecule. 18 */ 19 struct Molecule { 20 21 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 22 // Constructors, destructors, assignment 23 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MoleculeMolecule24 Molecule():mass(0.0),position(0.0,0.0,0.0),momentum(0.0,0.0,0.0),water(false), 25 type(0),newtype(0),lambda(0.0) {} 26 27 sizeMolecule28 size_t size(){return atoms.size();} 29 ///< Return number of atoms of this molecule 30 31 int operator [](int i ){return atoms[i];} 32 ///< Return atom number 33 34 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 35 // My data members 36 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 37 38 Real mass; 39 ///< The mass of the molecule. 40 41 Vector3D position; 42 ///< The xyz coordinate of the molecule's center of mass. 43 44 Vector3D momentum; 45 ///< The xyz momentum of the molecule's center of mass. 46 47 std::vector<int> atoms; 48 ///< List of the ID#s of the atoms on the molecule. 49 50 std::vector<PairInt> pairs; 51 ///< List of pairs (bond, angle, dihedral and improper) 52 53 bool water; 54 ///< If molecule is a water molecule 55 56 57 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 58 // iSG molecule parts are listed below 59 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 60 61 unsigned int type, newtype; 62 ///< Type of the molecule...needed for ISG simulations 63 ///< type is the molecule's type in the Lambda = 0 state; 64 ///< newtype is the molecule's type in the Lambda = 1 state; 65 66 Real lambda; 67 ///< Parameter controlling the identity (or type) of the molecule. 68 69 std::vector<int> bondList; 70 std::vector<int> angleList; 71 std::vector<int> dihedralList; 72 std::vector<int> improperList; 73 ///< list of the index #s of each bond, angle, dihedral, 74 ///< and improper on this molecule...may not need this because of pairs above!!!! 75 76 77 78 }; 79 80 } 81 #endif /* MOLECULE_H */ 82 83