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 */ |
305 |
|
return i != molecules_.end() ? i->second : NULL; |
306 |
|
} |
307 |
|
|
308 |
< |
double getRcut() { |
308 |
> |
RealType getRcut() { |
309 |
|
return rcut_; |
310 |
|
} |
311 |
|
|
312 |
< |
double getRsw() { |
312 |
> |
RealType getRsw() { |
313 |
|
return rsw_; |
314 |
|
} |
315 |
|
|
316 |
< |
double getList() { |
316 |
> |
RealType getList() { |
317 |
|
return rlist_; |
318 |
|
} |
319 |
|
|
429 |
|
|
430 |
|
friend std::ostream& operator <<(std::ostream& o, SimInfo& info); |
431 |
|
|
432 |
< |
void getCutoff(double& rcut, double& rsw); |
432 |
> |
void getCutoff(RealType& rcut, RealType& rsw); |
433 |
|
|
434 |
|
private: |
435 |
|
|
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); |
458 |
– |
|
459 |
– |
MakeStamps* stamps_; |
460 |
– |
ForceField* forceField_; |
461 |
– |
Globals* simParams_; |
462 |
– |
|
463 |
– |
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 */ |
528 |
|
std::string statFileName_; |
529 |
|
std::string restFileName_; |
530 |
|
|
531 |
< |
double rcut_; /**< cutoff radius*/ |
532 |
< |
double rsw_; /**< radius of switching function*/ |
533 |
< |
double rlist_; /**< neighbor list radius */ |
531 |
> |
RealType rcut_; /**< cutoff radius*/ |
532 |
> |
RealType rsw_; /**< radius of switching function*/ |
533 |
> |
RealType rlist_; /**< neighbor list radius */ |
534 |
|
|
535 |
|
bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */ |
536 |
|
|