36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
/** |
65 |
|
#include "utils/LocalIndexManager.hpp" |
66 |
|
#include "nonbonded/SwitchingFunction.hpp" |
67 |
|
|
67 |
– |
//another nonsense macro declaration |
68 |
– |
#define __OPENMD_C |
69 |
– |
#include "brains/fSimulation.h" |
70 |
– |
|
68 |
|
using namespace std; |
69 |
|
namespace OpenMD{ |
70 |
< |
//forward decalration |
70 |
> |
//forward declaration |
71 |
|
class SnapshotManager; |
72 |
|
class Molecule; |
73 |
|
class SelectionManager; |
167 |
|
return nAtoms_; |
168 |
|
} |
169 |
|
|
170 |
+ |
/** Returns the number of effective cutoff groups on local processor */ |
171 |
+ |
unsigned int getNLocalCutoffGroups(); |
172 |
+ |
|
173 |
|
/** Returns the number of local bonds */ |
174 |
|
unsigned int getNBonds(){ |
175 |
|
return nBonds_; |
302 |
|
|
303 |
|
void update(); |
304 |
|
/** |
305 |
< |
* Setup Fortran Simulation |
305 |
> |
* Do final bookkeeping before Force managers need their data. |
306 |
|
*/ |
307 |
< |
void setupFortran(); |
307 |
> |
void prepareTopology(); |
308 |
|
|
309 |
|
|
310 |
|
/** Returns the local index manager */ |
341 |
|
int getGlobalMolMembership(int id){ |
342 |
|
return globalMolMembership_[id]; |
343 |
|
} |
344 |
+ |
|
345 |
+ |
/** |
346 |
+ |
* returns a vector which maps the local atom index on this |
347 |
+ |
* processor to the global atom index. With only one processor, |
348 |
+ |
* these should be identical. |
349 |
+ |
*/ |
350 |
+ |
vector<int> getGlobalAtomIndices(); |
351 |
+ |
|
352 |
+ |
/** |
353 |
+ |
* returns a vector which maps the local cutoff group index on |
354 |
+ |
* this processor to the global cutoff group index. With only one |
355 |
+ |
* processor, these should be identical. |
356 |
+ |
*/ |
357 |
+ |
vector<int> getGlobalGroupIndices(); |
358 |
+ |
|
359 |
|
|
360 |
|
string getFinalConfigFileName() { |
361 |
|
return finalConfigFileName_; |
415 |
|
} |
416 |
|
|
417 |
|
|
418 |
< |
bool isFortranInitialized() { |
419 |
< |
return fortranInitialized_; |
418 |
> |
bool isTopologyDone() { |
419 |
> |
return topologyDone_; |
420 |
|
} |
421 |
|
|
422 |
|
bool getCalcBoxDipole() { |
547 |
|
bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; } |
548 |
|
bool usesDirectionalAtoms() { return usesDirectionalAtoms_; } |
549 |
|
bool usesMetallicAtoms() { return usesMetallicAtoms_; } |
550 |
+ |
bool usesAtomicVirial() { return usesAtomicVirial_; } |
551 |
+ |
bool requiresPrepair() { return requiresPrepair_; } |
552 |
+ |
bool requiresSkipCorrection() { return requiresSkipCorrection_;} |
553 |
+ |
bool requiresSelfCorrection() { return requiresSelfCorrection_;} |
554 |
|
|
555 |
|
private: |
556 |
|
/// Data structures holding primary simulation objects |
557 |
|
map<int, Molecule*> molecules_; /**< map holding pointers to LOCAL molecules */ |
539 |
– |
simtype fInfo_; /**< A dual struct shared by C++ |
540 |
– |
and Fortran to pass |
541 |
– |
information about what types |
542 |
– |
of calculation are |
543 |
– |
required */ |
558 |
|
|
559 |
|
/// Stamps are templates for objects that are then used to create |
560 |
|
/// groups of objects. For example, a molecule stamp contains |
571 |
|
* the simulation. It should be nGlobalAtoms_ in size. |
572 |
|
*/ |
573 |
|
vector<int> globalGroupMembership_; |
574 |
+ |
public: |
575 |
+ |
vector<int> getGlobalGroupMembership() { return globalGroupMembership_; } |
576 |
+ |
private: |
577 |
|
|
578 |
|
/** |
579 |
|
* A vector that maps between the global index of an atom and the |
588 |
|
* index of the AtomType. |
589 |
|
*/ |
590 |
|
vector<int> identArray_; |
591 |
+ |
public: |
592 |
|
vector<int> getIdentArray() { return identArray_; } |
593 |
+ |
private: |
594 |
|
|
595 |
+ |
/** |
596 |
+ |
* A vector which contains the fractional contribution of an |
597 |
+ |
* atom's mass to the total mass of the cutoffGroup that atom |
598 |
+ |
* belongs to. In the case of single atom cutoff groups, the mass |
599 |
+ |
* factor for that atom is 1. For massless atoms, the factor is |
600 |
+ |
* also 1. |
601 |
+ |
*/ |
602 |
+ |
vector<RealType> massFactors_; |
603 |
+ |
public: |
604 |
+ |
vector<RealType> getMassFactors() { return massFactors_; } |
605 |
+ |
|
606 |
+ |
PairList* getExcludedInteractions() { return &excludedInteractions_; } |
607 |
+ |
PairList* getOneTwoInteractions() { return &oneTwoInteractions_; } |
608 |
+ |
PairList* getOneThreeInteractions() { return &oneThreeInteractions_; } |
609 |
+ |
PairList* getOneFourInteractions() { return &oneFourInteractions_; } |
610 |
+ |
|
611 |
+ |
private: |
612 |
|
|
613 |
|
/// lists to handle atoms needing special treatment in the non-bonded interactions |
614 |
|
PairList excludedInteractions_; /**< atoms excluded from interacting with each other */ |
639 |
|
string restFileName_; |
640 |
|
|
641 |
|
|
642 |
< |
bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */ |
642 |
> |
bool topologyDone_; /** flag to indicate whether the topology has |
643 |
> |
been scanned and all the relevant |
644 |
> |
bookkeeping has been done*/ |
645 |
|
|
646 |
|
bool calcBoxDipole_; /**< flag to indicate whether or not we calculate |
647 |
|
the simulation box dipole moment */ |