| 75 |
|
class SelectionManager; |
| 76 |
|
/** |
| 77 |
|
* @class SimInfo SimInfo.hpp "brains/SimInfo.hpp" |
| 78 |
< |
* @brief As one of the heavy weight class of OOPSE, SimInfo |
| 79 |
< |
* One of the major changes in SimInfo class is the data struct. It only maintains a list of molecules. |
| 80 |
< |
* And the Molecule class will maintain all of the concrete objects (atoms, bond, bend, torsions, rigid bodies, |
| 81 |
< |
* cutoff groups, constrains). |
| 82 |
< |
* Another major change is the index. No matter single version or parallel version, atoms and |
| 83 |
< |
* rigid bodies have both global index and local index. Local index is not important to molecule as well as |
| 84 |
< |
* cutoff group. |
| 78 |
> |
* @brief One of the heavy weight classes of OOPSE, SimInfo maintains a list of molecules. |
| 79 |
> |
* The Molecule class maintains all of the concrete objects |
| 80 |
> |
* (atoms, bond, bend, torsions, rigid bodies, cutoff groups, constrains). |
| 81 |
> |
* In both the single and parallel versions, atoms and |
| 82 |
> |
* rigid bodies have both global and local indices. The local index is |
| 83 |
> |
* not relevant to molecules or cutoff groups. |
| 84 |
|
*/ |
| 85 |
|
class SimInfo { |
| 86 |
|
public: |
| 94 |
|
* @param simParams |
| 95 |
|
* @note |
| 96 |
|
*/ |
| 97 |
< |
SimInfo(MakeStamps* stamps, std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs, ForceField* ff, Globals* simParams); |
| 97 |
> |
SimInfo(ForceField* ff, Globals* simParams); |
| 98 |
|
virtual ~SimInfo(); |
| 99 |
|
|
| 100 |
|
/** |
| 206 |
|
|
| 207 |
|
/** Returns the number of degrees of freedom */ |
| 208 |
|
int getNdf() { |
| 209 |
< |
return ndf_; |
| 209 |
> |
return ndf_ - getFdf(); |
| 210 |
|
} |
| 211 |
|
|
| 212 |
|
/** Returns the number of raw degrees of freedom */ |
| 219 |
|
return ndfTrans_; |
| 220 |
|
} |
| 221 |
|
|
| 222 |
+ |
/** sets the current number of frozen degrees of freedom */ |
| 223 |
+ |
void setFdf(int fdf) { |
| 224 |
+ |
fdf_local = fdf; |
| 225 |
+ |
} |
| 226 |
+ |
|
| 227 |
+ |
int getFdf(); |
| 228 |
+ |
|
| 229 |
|
//getNZconstraint and setNZconstraint ruin the coherent of SimInfo class, need refactorying |
| 230 |
|
|
| 231 |
|
/** Returns the total number of z-constraint molecules in the system */ |
| 304 |
|
|
| 305 |
|
return i != molecules_.end() ? i->second : NULL; |
| 306 |
|
} |
| 301 |
– |
|
| 302 |
– |
/** Calculate the maximum cutoff radius based on the atom types */ |
| 303 |
– |
double calcMaxCutoffRadius(); |
| 307 |
|
|
| 308 |
|
double getRcut() { |
| 309 |
|
return rcut_; |
| 312 |
|
double getRsw() { |
| 313 |
|
return rsw_; |
| 314 |
|
} |
| 315 |
+ |
|
| 316 |
+ |
double getList() { |
| 317 |
+ |
return rlist_; |
| 318 |
+ |
} |
| 319 |
|
|
| 320 |
|
std::string getFinalConfigFileName() { |
| 321 |
|
return finalConfigFileName_; |
| 446 |
|
void setupCutoff(); |
| 447 |
|
|
| 448 |
|
/** Figure out which coulombic correction method to use and pass to fortran */ |
| 449 |
< |
void setupCoulombicCorrection( int isError ); |
| 449 |
> |
void setupElectrostaticSummationMethod( int isError ); |
| 450 |
|
|
| 451 |
+ |
/** Figure out which polynomial type to use for the switching function */ |
| 452 |
+ |
void setupSwitchingFunction(); |
| 453 |
+ |
|
| 454 |
|
/** Calculates the number of degress of freedom in the whole system */ |
| 455 |
|
void calcNdf(); |
| 456 |
|
void calcNdfRaw(); |
| 457 |
|
void calcNdfTrans(); |
| 458 |
+ |
|
| 459 |
+ |
ForceField* forceField_; |
| 460 |
+ |
Globals* simParams_; |
| 461 |
|
|
| 462 |
+ |
std::map<int, Molecule*> molecules_; /**< Molecule array */ |
| 463 |
+ |
|
| 464 |
|
/** |
| 465 |
|
* Adds molecule stamp and the total number of the molecule with same molecule stamp in the whole |
| 466 |
|
* system. |
| 467 |
|
*/ |
| 468 |
|
void addMoleculeStamp(MoleculeStamp* molStamp, int nmol); |
| 454 |
– |
|
| 455 |
– |
MakeStamps* stamps_; |
| 456 |
– |
ForceField* forceField_; |
| 457 |
– |
Globals* simParams_; |
| 458 |
– |
|
| 459 |
– |
std::map<int, Molecule*> molecules_; /**< Molecule array */ |
| 469 |
|
|
| 470 |
|
//degress of freedom |
| 471 |
|
int ndf_; /**< number of degress of freedom (excludes constraints), ndf_ is local */ |
| 472 |
+ |
int fdf_local; /**< number of frozen degrees of freedom */ |
| 473 |
+ |
int fdf_; /**< number of frozen degrees of freedom */ |
| 474 |
|
int ndfRaw_; /**< number of degress of freedom (includes constraints), ndfRaw_ is local */ |
| 475 |
|
int ndfTrans_; /**< number of translation degress of freedom, ndfTrans_ is local */ |
| 476 |
|
int nZconstraint_; /** number of z-constraint molecules, nZconstraint_ is global */ |
| 530 |
|
|
| 531 |
|
double rcut_; /**< cutoff radius*/ |
| 532 |
|
double rsw_; /**< radius of switching function*/ |
| 533 |
+ |
double rlist_; /**< neighbor list radius */ |
| 534 |
|
|
| 535 |
|
bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */ |
| 536 |
|
|