| 1 | 
#ifndef __SIMINFO_H__ | 
| 2 | 
#define __SIMINFO_H__ | 
| 3 | 
 | 
| 4 | 
#include <map> | 
| 5 | 
#include <string> | 
| 6 | 
#include <vector> | 
| 7 | 
 | 
| 8 | 
#include "primitives/Atom.hpp" | 
| 9 | 
#include "primitives/RigidBody.hpp" | 
| 10 | 
#include "primitives/Molecule.hpp" | 
| 11 | 
#include "brains/Exclude.hpp" | 
| 12 | 
#include "brains/SkipList.hpp" | 
| 13 | 
#include "primitives/AbstractClasses.hpp" | 
| 14 | 
#include "types/MakeStamps.hpp" | 
| 15 | 
#include "brains/SimState.hpp" | 
| 16 | 
#include "restraints/Restraints.hpp" | 
| 17 | 
 | 
| 18 | 
#define __C | 
| 19 | 
#include "brains/fSimulation.h" | 
| 20 | 
#include "utils/GenericData.hpp" | 
| 21 | 
 | 
| 22 | 
 | 
| 23 | 
//#include "Minimizer.hpp" | 
| 24 | 
//#include "minimizers/OOPSEMinimizer.hpp" | 
| 25 | 
 | 
| 26 | 
 | 
| 27 | 
double roundMe( double x ); | 
| 28 | 
class OOPSEMinimizer; | 
| 29 | 
class SimInfo{ | 
| 30 | 
 | 
| 31 | 
public: | 
| 32 | 
 | 
| 33 | 
  SimInfo(); | 
| 34 | 
  ~SimInfo(); | 
| 35 | 
 | 
| 36 | 
  int n_atoms; // the number of atoms | 
| 37 | 
  Atom **atoms; // the array of atom objects | 
| 38 | 
 | 
| 39 | 
  vector<RigidBody*> rigidBodies;  // A vector of rigid bodies | 
| 40 | 
  vector<StuntDouble*> integrableObjects; | 
| 41 | 
   | 
| 42 | 
  double tau[9]; // the stress tensor | 
| 43 | 
 | 
| 44 | 
  int n_bonds;    // number of bends | 
| 45 | 
  int n_bends;    // number of bends | 
| 46 | 
  int n_torsions; // number of torsions | 
| 47 | 
  int n_oriented; // number of of atoms with orientation | 
| 48 | 
  int ndf;        // number of actual degrees of freedom | 
| 49 | 
  int ndfRaw;     // number of settable degrees of freedom | 
| 50 | 
  int ndfTrans;   // number of translational degrees of freedom | 
| 51 | 
  int nZconstraints; // the number of zConstraints | 
| 52 | 
 | 
| 53 | 
  int setTemp;   // boolean to set the temperature at each sampleTime | 
| 54 | 
  int resetIntegrator; // boolean to reset the integrator | 
| 55 | 
 | 
| 56 | 
  int n_dipoles; // number of dipoles | 
| 57 | 
 | 
| 58 | 
  int n_exclude; | 
| 59 | 
  Exclude* excludes;  // the exclude list for ignoring pairs in fortran | 
| 60 | 
  int nGlobalExcludes; | 
| 61 | 
  int* globalExcludes; // same as above, but these guys participate in | 
| 62 | 
                       // no long range forces. | 
| 63 | 
 | 
| 64 | 
  int* identArray;     // array of unique identifiers for the atoms | 
| 65 | 
  int* molMembershipArray;  // map of atom numbers onto molecule numbers | 
| 66 | 
 | 
| 67 | 
  int n_constraints; // the number of constraints on the system | 
| 68 | 
 | 
| 69 | 
  int n_SRI;   // the number of short range interactions | 
| 70 | 
 | 
| 71 | 
  double lrPot; // the potential energy from the long range calculations. | 
| 72 | 
 | 
| 73 | 
  double Hmat[3][3];  // the periodic boundry conditions. The Hmat is the | 
| 74 | 
                      // column vectors of the x, y, and z box vectors. | 
| 75 | 
                      //   h1  h2  h3 | 
| 76 | 
                      // [ Xx  Yx  Zx ] | 
| 77 | 
                      // [ Xy  Yy  Zy ] | 
| 78 | 
                      // [ Xz  Yz  Zz ] | 
| 79 | 
                      //    | 
| 80 | 
  double HmatInv[3][3]; | 
| 81 | 
 | 
| 82 | 
  double boxL[3]; // The Lengths of the 3 column vectors of Hmat | 
| 83 | 
  double boxVol; | 
| 84 | 
  int orthoRhombic; | 
| 85 | 
   | 
| 86 | 
 | 
| 87 | 
  double dielectric;      // the dielectric of the medium for reaction field | 
| 88 | 
 | 
| 89 | 
   | 
| 90 | 
  int usePBC; // whether we use periodic boundry conditions. | 
| 91 | 
  int useLJ;  | 
| 92 | 
  int useSticky; | 
| 93 | 
  int useCharges; | 
| 94 | 
  int useDipoles; | 
| 95 | 
  int useReactionField; | 
| 96 | 
  int useGB; | 
| 97 | 
  int useEAM; | 
| 98 | 
  bool haveCutoffGroups; | 
| 99 | 
  bool useInitXSstate; | 
| 100 | 
  double orthoTolerance; | 
| 101 | 
 | 
| 102 | 
  double dt, run_time;           // the time step and total time | 
| 103 | 
  double sampleTime, statusTime; // the position and energy dump frequencies | 
| 104 | 
  double target_temp;            // the target temperature of the system | 
| 105 | 
  double thermalTime;            // the temp kick interval | 
| 106 | 
  double currentTime;            // Used primarily for correlation Functions | 
| 107 | 
  double resetTime;              // Use to reset the integrator periodically | 
| 108 | 
  short int have_target_temp; | 
| 109 | 
 | 
| 110 | 
  int n_mol;           // n_molecules; | 
| 111 | 
  Molecule* molecules; // the array of molecules | 
| 112 | 
   | 
| 113 | 
  int nComponents;           // the number of components in the system | 
| 114 | 
  int* componentsNmol;       // the number of molecules of each component | 
| 115 | 
  MoleculeStamp** compStamps;// the stamps matching the components | 
| 116 | 
  LinkedMolStamp* headStamp; // list of stamps used in the simulation | 
| 117 | 
   | 
| 118 | 
   | 
| 119 | 
  char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. ) | 
| 120 | 
  char mixingRule[100]; // the mixing rules for Lennard jones/van der walls  | 
| 121 | 
  BaseIntegrator *the_integrator; // the integrator of the simulation | 
| 122 | 
 | 
| 123 | 
  OOPSEMinimizer* the_minimizer; // the energy minimizer | 
| 124 | 
  Restraints* restraint; | 
| 125 | 
  bool has_minimizer; | 
| 126 | 
 | 
| 127 | 
  string finalName;  // the name of the eor file to be written | 
| 128 | 
  string sampleName; // the name of the dump file to be written | 
| 129 | 
  string statusName; // the name of the stat file to be written | 
| 130 | 
 | 
| 131 | 
  int seed;                    //seed for random number generator | 
| 132 | 
 | 
| 133 | 
  int useSolidThermInt;  // is solid-state thermodynamic integration being used | 
| 134 | 
  int useLiquidThermInt; // is liquid thermodynamic integration being used | 
| 135 | 
  double thermIntLambda; // lambda for TI | 
| 136 | 
  double thermIntK;      // power of lambda for TI | 
| 137 | 
  double vRaw;           // unperturbed potential for TI | 
| 138 | 
  double vHarm;          // harmonic potential for TI | 
| 139 | 
  int i;                 // just an int | 
| 140 | 
 | 
| 141 | 
  vector<double> mfact; | 
| 142 | 
  vector<int> FglobalGroupMembership; | 
| 143 | 
  int ngroup; | 
| 144 | 
  int* globalGroupMembership; | 
| 145 | 
 | 
| 146 | 
  // refreshes the sim if things get changed (load balanceing, volume | 
| 147 | 
  // adjustment, etc.) | 
| 148 | 
 | 
| 149 | 
  void refreshSim( void ); | 
| 150 | 
   | 
| 151 | 
 | 
| 152 | 
  // sets the internal function pointer to fortran. | 
| 153 | 
 | 
| 154 | 
 | 
| 155 | 
  int getNDF(); | 
| 156 | 
  int getNDFraw(); | 
| 157 | 
  int getNDFtranslational(); | 
| 158 | 
  int getTotIntegrableObjects(); | 
| 159 | 
  void setBox( double newBox[3] ); | 
| 160 | 
  void setBoxM( double newBox[3][3] ); | 
| 161 | 
  void getBoxM( double theBox[3][3] ); | 
| 162 | 
  void scaleBox( double scale ); | 
| 163 | 
   | 
| 164 | 
  void setDefaultRcut( double theRcut ); | 
| 165 | 
  void setDefaultRcut( double theRcut, double theRsw ); | 
| 166 | 
  void checkCutOffs( void ); | 
| 167 | 
 | 
| 168 | 
  double getRcut( void )  { return rCut; } | 
| 169 | 
  double getRlist( void ) { return rList; } | 
| 170 | 
  double getRsw( void )   { return rSw; } | 
| 171 | 
  double getMaxCutoff( void ) { return maxCutoff; } | 
| 172 | 
   | 
| 173 | 
  void setTime( double theTime ) { currentTime = theTime; } | 
| 174 | 
  void incrTime( double the_dt ) { currentTime += the_dt; } | 
| 175 | 
  void decrTime( double the_dt ) { currentTime -= the_dt; } | 
| 176 | 
  double getTime( void ) { return currentTime; } | 
| 177 | 
 | 
| 178 | 
  void wrapVector( double thePos[3] ); | 
| 179 | 
 | 
| 180 | 
  SimState* getConfiguration( void ) { return myConfiguration; } | 
| 181 | 
   | 
| 182 | 
  void addProperty(GenericData* prop);  | 
| 183 | 
  GenericData* getProperty(const string& propName); | 
| 184 | 
  //vector<GenericData*>& getProperties()  {return properties;}      | 
| 185 | 
 | 
| 186 | 
  int getSeed(void) {  return seed; } | 
| 187 | 
  void setSeed(int theSeed) {  seed = theSeed;} | 
| 188 | 
 | 
| 189 | 
private: | 
| 190 | 
 | 
| 191 | 
  SimState* myConfiguration; | 
| 192 | 
 | 
| 193 | 
  int boxIsInit, haveRcut, haveRsw; | 
| 194 | 
 | 
| 195 | 
  double rList, rCut; // variables for the neighborlist | 
| 196 | 
  double rSw;         // the switching radius | 
| 197 | 
 | 
| 198 | 
  double maxCutoff; | 
| 199 | 
 | 
| 200 | 
  double distXY; | 
| 201 | 
  double distYZ; | 
| 202 | 
  double distZX; | 
| 203 | 
   | 
| 204 | 
  void calcHmatInv( void ); | 
| 205 | 
  void calcBoxL(); | 
| 206 | 
  double calcMaxCutOff(); | 
| 207 | 
 | 
| 208 | 
   | 
| 209 | 
  //Addtional Properties of SimInfo | 
| 210 | 
  map<string, GenericData*> properties; | 
| 211 | 
  void getFortranGroupArrays(SimInfo* info,  | 
| 212 | 
                             vector<int>& FglobalGroupMembership, | 
| 213 | 
                             vector<double>& mfact); | 
| 214 | 
 | 
| 215 | 
 | 
| 216 | 
}; | 
| 217 | 
 | 
| 218 | 
 | 
| 219 | 
#endif |