| 1 |
#ifndef __SIMINFO_H__ |
| 2 |
#define __SIMINFO_H__ |
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
#include "Atom.hpp" |
| 7 |
#include "Molecule.hpp" |
| 8 |
#include "AbstractClasses.hpp" |
| 9 |
#include "MakeStamps.hpp" |
| 10 |
|
| 11 |
#define __C |
| 12 |
#include "fSimulation.h" |
| 13 |
#include "fortranWrapDefines.hpp" |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
class SimInfo{ |
| 18 |
|
| 19 |
public: |
| 20 |
|
| 21 |
SimInfo(); |
| 22 |
~SimInfo(){} |
| 23 |
|
| 24 |
int n_atoms; // the number of atoms |
| 25 |
Atom **atoms; // the array of atom objects |
| 26 |
|
| 27 |
double tau[9]; // the stress tensor |
| 28 |
|
| 29 |
unsigned int n_bonds; // number of bends |
| 30 |
unsigned int n_bends; // number of bends |
| 31 |
unsigned int n_torsions; // number of torsions |
| 32 |
unsigned int n_oriented; // number of of atoms with orientation |
| 33 |
unsigned int ndf; // number of actual degrees of freedom |
| 34 |
unsigned int ndfRaw; // number of settable degrees of freedom |
| 35 |
|
| 36 |
unsigned int setTemp; // boolean to set the temperature at each sampleTime |
| 37 |
|
| 38 |
unsigned int n_dipoles; // number of dipoles |
| 39 |
double ecr; // the electrostatic cutoff radius |
| 40 |
double est; // the electrostatic skin thickness |
| 41 |
double dielectric; // the dielectric of the medium for reaction field |
| 42 |
|
| 43 |
int n_exclude; // the # of pairs excluded from long range forces |
| 44 |
Exclude** excludes; // the pairs themselves |
| 45 |
|
| 46 |
int nGlobalExcludes; |
| 47 |
int* globalExcludes; // same as above, but these guys participate in |
| 48 |
// no long range forces. |
| 49 |
|
| 50 |
int* identArray; // array of unique identifiers for the atoms |
| 51 |
int* molMembershipArray; // map of atom numbers onto molecule numbers |
| 52 |
|
| 53 |
int n_constraints; // the number of constraints on the system |
| 54 |
|
| 55 |
unsigned int n_SRI; // the number of short range interactions |
| 56 |
|
| 57 |
double lrPot; // the potential energy from the long range calculations. |
| 58 |
|
| 59 |
double Hmat[9]; // the periodic boundry conditions. The Hmat is the |
| 60 |
// column vectors of the x, y, and z box vectors. |
| 61 |
// |
| 62 |
// h1 h2 h3 |
| 63 |
// [ Xx Yx Zx ] |
| 64 |
// [ Xy Yy Zy ] |
| 65 |
// [ Xz Yz Zz ] |
| 66 |
// |
| 67 |
// to preserve compatibility with Fortran the |
| 68 |
// ordering in the array is as follows: |
| 69 |
// |
| 70 |
// [ 0 3 6 ] |
| 71 |
// [ 1 4 7 ] |
| 72 |
// [ 2 5 8 ] |
| 73 |
|
| 74 |
double HmatI[9]; // the inverted Hmat; |
| 75 |
double boxLx, boxLy, boxLz; // the box Lengths |
| 76 |
double boxVol; |
| 77 |
int orthoRhombic; |
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
double rList, rCut; // variables for the neighborlist |
| 82 |
|
| 83 |
int usePBC; // whether we use periodic boundry conditions. |
| 84 |
int useLJ; |
| 85 |
int useSticky; |
| 86 |
int useDipole; |
| 87 |
int useReactionField; |
| 88 |
int useGB; |
| 89 |
int useEAM; |
| 90 |
|
| 91 |
|
| 92 |
double dt, run_time; // the time step and total time |
| 93 |
double sampleTime, statusTime; // the position and energy dump frequencies |
| 94 |
double target_temp; // the target temperature of the system |
| 95 |
double thermalTime; // the temp kick interval |
| 96 |
|
| 97 |
int n_mol; // n_molecules; |
| 98 |
Molecule* molecules; // the array of molecules |
| 99 |
|
| 100 |
int nComponents; // the number of componentsin the system |
| 101 |
int* componentsNmol; // the number of molecules of each component |
| 102 |
MoleculeStamp** compStamps;// the stamps matching the components |
| 103 |
LinkedMolStamp* headStamp; // list of stamps used in the simulation |
| 104 |
|
| 105 |
|
| 106 |
char ensemble[100]; // the enesemble of the simulation (NVT, NVE, etc. ) |
| 107 |
char mixingRule[100]; // the mixing rules for Lennard jones/van der walls |
| 108 |
BaseIntegrator *the_integrator; // the integrator of the simulation |
| 109 |
|
| 110 |
char finalName[300]; // the name of the eor file to be written |
| 111 |
char sampleName[300]; // the name of the dump file to be written |
| 112 |
char statusName[300]; // the name of the stat file to be written |
| 113 |
|
| 114 |
|
| 115 |
// refreshes the sim if things get changed (load balanceing, volume |
| 116 |
// adjustment, etc.) |
| 117 |
|
| 118 |
void refreshSim( void ); |
| 119 |
|
| 120 |
|
| 121 |
// sets the internal function pointer to fortran. |
| 122 |
|
| 123 |
void setInternal( void (*fSetup) setFortranSimList, |
| 124 |
void (*fBox) setFortranBoxList ){ |
| 125 |
setFsimulation = fSetup; |
| 126 |
setFortranBoxSize = fBox; |
| 127 |
} |
| 128 |
|
| 129 |
int getNDF(); |
| 130 |
int getNDFraw(); |
| 131 |
|
| 132 |
void setBox( double newBox[3] ); |
| 133 |
void setBoxM( double newBox[9] ); |
| 134 |
void getBoxM( double theBox[9] ); |
| 135 |
|
| 136 |
void wrapVector( double thePos[3] ); |
| 137 |
|
| 138 |
private: |
| 139 |
|
| 140 |
void calcHmatI( void ); |
| 141 |
void calcBoxL(); |
| 142 |
|
| 143 |
// private function to initialize the fortran side of the simulation |
| 144 |
void (*setFsimulation) setFortranSimList; |
| 145 |
|
| 146 |
void (*setFortranBoxSize) setFortranBoxList; |
| 147 |
}; |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
#endif |