| 64 |
|
#include "utils/LocalIndexManager.hpp" |
| 65 |
|
#include "nonbonded/SwitchingFunction.hpp" |
| 66 |
|
|
| 67 |
– |
//another nonsense macro declaration |
| 68 |
– |
#define __OPENMD_C |
| 69 |
– |
#include "brains/fSimulation.h" |
| 70 |
– |
|
| 67 |
|
using namespace std; |
| 68 |
|
namespace OpenMD{ |
| 69 |
< |
//forward decalration |
| 69 |
> |
//forward declaration |
| 70 |
|
class SnapshotManager; |
| 71 |
|
class Molecule; |
| 72 |
|
class SelectionManager; |
| 166 |
|
return nAtoms_; |
| 167 |
|
} |
| 168 |
|
|
| 169 |
+ |
/** Returns the number of effective cutoff groups on local processor */ |
| 170 |
+ |
unsigned int getNLocalCutoffGroups(); |
| 171 |
+ |
|
| 172 |
|
/** Returns the number of local bonds */ |
| 173 |
|
unsigned int getNBonds(){ |
| 174 |
|
return nBonds_; |
| 301 |
|
|
| 302 |
|
void update(); |
| 303 |
|
/** |
| 304 |
< |
* Setup Fortran Simulation |
| 304 |
> |
* Do final bookkeeping before Force managers need their data. |
| 305 |
|
*/ |
| 306 |
< |
void setupFortran(); |
| 306 |
> |
void prepareTopology(); |
| 307 |
|
|
| 308 |
|
|
| 309 |
|
/** Returns the local index manager */ |
| 340 |
|
int getGlobalMolMembership(int id){ |
| 341 |
|
return globalMolMembership_[id]; |
| 342 |
|
} |
| 343 |
+ |
|
| 344 |
+ |
/** |
| 345 |
+ |
* returns a vector which maps the local atom index on this |
| 346 |
+ |
* processor to the global atom index. With only one processor, |
| 347 |
+ |
* these should be identical. |
| 348 |
+ |
*/ |
| 349 |
+ |
vector<int> getGlobalAtomIndices(); |
| 350 |
+ |
|
| 351 |
+ |
/** |
| 352 |
+ |
* returns a vector which maps the local cutoff group index on |
| 353 |
+ |
* this processor to the global cutoff group index. With only one |
| 354 |
+ |
* processor, these should be identical. |
| 355 |
+ |
*/ |
| 356 |
+ |
vector<int> getGlobalGroupIndices(); |
| 357 |
+ |
|
| 358 |
|
|
| 359 |
|
string getFinalConfigFileName() { |
| 360 |
|
return finalConfigFileName_; |
| 414 |
|
} |
| 415 |
|
|
| 416 |
|
|
| 417 |
< |
bool isFortranInitialized() { |
| 418 |
< |
return fortranInitialized_; |
| 417 |
> |
bool isTopologyDone() { |
| 418 |
> |
return topologyDone_; |
| 419 |
|
} |
| 420 |
|
|
| 421 |
|
bool getCalcBoxDipole() { |
| 554 |
|
private: |
| 555 |
|
/// Data structures holding primary simulation objects |
| 556 |
|
map<int, Molecule*> molecules_; /**< map holding pointers to LOCAL molecules */ |
| 543 |
– |
simtype fInfo_; /**< A dual struct shared by C++ |
| 544 |
– |
and Fortran to pass |
| 545 |
– |
information about what types |
| 546 |
– |
of calculation are |
| 547 |
– |
required */ |
| 557 |
|
|
| 558 |
|
/// Stamps are templates for objects that are then used to create |
| 559 |
|
/// groups of objects. For example, a molecule stamp contains |
| 590 |
|
public: |
| 591 |
|
vector<int> getIdentArray() { return identArray_; } |
| 592 |
|
private: |
| 593 |
+ |
|
| 594 |
+ |
/** |
| 595 |
+ |
* A vector which contains the fractional contribution of an |
| 596 |
+ |
* atom's mass to the total mass of the cutoffGroup that atom |
| 597 |
+ |
* belongs to. In the case of single atom cutoff groups, the mass |
| 598 |
+ |
* factor for that atom is 1. For massless atoms, the factor is |
| 599 |
+ |
* also 1. |
| 600 |
+ |
*/ |
| 601 |
+ |
vector<RealType> massFactors_; |
| 602 |
+ |
public: |
| 603 |
+ |
vector<RealType> getMassFactors() { return massFactors_; } |
| 604 |
+ |
|
| 605 |
+ |
PairList getExcludedInteractions() { return excludedInteractions_; } |
| 606 |
+ |
PairList getOneTwoInteractions() { return oneTwoInteractions_; } |
| 607 |
+ |
PairList getOneThreeInteractions() { return oneThreeInteractions_; } |
| 608 |
+ |
PairList getOneFourInteractions() { return oneFourInteractions_; } |
| 609 |
+ |
|
| 610 |
+ |
private: |
| 611 |
+ |
|
| 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 */ |