57 |
|
*/ |
58 |
|
class SimInfo { |
59 |
|
public: |
60 |
< |
typedef MoleculeIterator MoleculeIterator; |
60 |
> |
typedef std::map<int, Molecule*>::iterator MoleculeIterator; |
61 |
|
|
62 |
|
/** |
63 |
|
* Constructor of SimInfo |
66 |
|
* @param ff pointer of a concrete ForceField instance |
67 |
|
* @param globals |
68 |
|
* @note |
69 |
– |
* <p> |
70 |
– |
* The major change of SimInfo |
71 |
– |
* </p> |
69 |
|
*/ |
70 |
|
SimInfo(const std::vector<std::pair<MoleculeStamp*, int> >& molStampPairs, ForceField* ff, Globals* globals); |
71 |
|
virtual ~SimInfo(); |
259 |
|
|
260 |
|
double getRcut() { |
261 |
|
return rcut_; |
265 |
– |
} |
266 |
– |
|
267 |
– |
void setRcut(double rcut) { |
268 |
– |
rcut_ = rcut; |
262 |
|
} |
263 |
|
|
264 |
|
double getRsw() { |
265 |
|
return rsw_; |
266 |
|
} |
274 |
– |
void setRsw(double rsw) { |
275 |
– |
rsw_ = rsw; |
276 |
– |
} |
267 |
|
|
268 |
|
std::string getFinalConfigFileName() { |
269 |
|
return finalConfigFileName_; |
273 |
|
finalConfigFileName_ = fileName; |
274 |
|
} |
275 |
|
|
286 |
– |
|
276 |
|
std::string getDumpFileName() { |
277 |
|
return dumpFileName_; |
278 |
|
} |
304 |
|
int* getGlobalMolMembershipPointer() { |
305 |
|
return globalMolMembership_[0]; |
306 |
|
} |
307 |
+ |
|
308 |
+ |
|
309 |
+ |
bool isFortranInitialized() { |
310 |
+ |
return fortranInitialized_; |
311 |
+ |
} |
312 |
|
|
313 |
|
//below functions are just forward functions |
314 |
|
//To compose or to inherit is always a hot debate. In general, is-a relation need subclassing, in the |
367 |
|
*/ |
368 |
|
void setupFortranSim(); |
369 |
|
|
370 |
+ |
/** Figure out the radius of cutoff, radius of switching function and pass them to fortran */ |
371 |
+ |
void setupCutoff(); |
372 |
+ |
|
373 |
|
/** Calculates the number of degress of freedom in the whole system */ |
374 |
|
void calcNdf(); |
375 |
|
void calcNdfRaw(); |
448 |
|
|
449 |
|
double rcut_; /**< cutoff radius*/ |
450 |
|
double rsw_; /**< radius of switching function*/ |
451 |
+ |
|
452 |
+ |
bool fortranInitialized_; /**< flag indicate whether fortran side is initialized */ |
453 |
|
|
454 |
|
#ifdef IS_MPI |
455 |
|
//in Parallel version, we need MolToProc |