--- branches/development/src/brains/SimInfo.hpp 2010/12/31 18:31:56 1535 +++ branches/development/src/brains/SimInfo.hpp 2011/05/26 13:55:04 1569 @@ -63,14 +63,10 @@ #include "utils/PropertyMap.hpp" #include "utils/LocalIndexManager.hpp" #include "nonbonded/SwitchingFunction.hpp" - -//another nonsense macro declaration -#define __OPENMD_C -#include "brains/fSimulation.h" using namespace std; namespace OpenMD{ - //forward decalration + //forward declaration class SnapshotManager; class Molecule; class SelectionManager; @@ -302,9 +298,9 @@ namespace OpenMD{ void update(); /** - * Setup Fortran Simulation + * Do final bookkeeping before Force managers need their data. */ - void setupFortran(); + void prepareTopology(); /** Returns the local index manager */ @@ -341,6 +337,21 @@ namespace OpenMD{ int getGlobalMolMembership(int id){ return globalMolMembership_[id]; } + + /** + * returns a vector which maps the local atom index on this + * processor to the global atom index. With only one processor, + * these should be identical. + */ + vector getGlobalAtomIndices(); + + /** + * returns a vector which maps the local cutoff group index on + * this processor to the global cutoff group index. With only one + * processor, these should be identical. + */ + vector getGlobalGroupIndices(); + string getFinalConfigFileName() { return finalConfigFileName_; @@ -400,8 +411,8 @@ namespace OpenMD{ } - bool isFortranInitialized() { - return fortranInitialized_; + bool isTopologyDone() { + return topologyDone_; } bool getCalcBoxDipole() { @@ -532,15 +543,14 @@ namespace OpenMD{ bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; } bool usesDirectionalAtoms() { return usesDirectionalAtoms_; } bool usesMetallicAtoms() { return usesMetallicAtoms_; } + bool usesAtomicVirial() { return usesAtomicVirial_; } + bool requiresPrepair() { return requiresPrepair_; } + bool requiresSkipCorrection() { return requiresSkipCorrection_;} + bool requiresSelfCorrection() { return requiresSelfCorrection_;} private: /// Data structures holding primary simulation objects map molecules_; /**< map holding pointers to LOCAL molecules */ - simtype fInfo_; /**< A dual struct shared by C++ - and Fortran to pass - information about what types - of calculation are - required */ /// Stamps are templates for objects that are then used to create /// groups of objects. For example, a molecule stamp contains @@ -557,6 +567,9 @@ namespace OpenMD{ * the simulation. It should be nGlobalAtoms_ in size. */ vector globalGroupMembership_; + public: + vector getGlobalGroupMembership() { return globalGroupMembership_; } + private: /** * A vector that maps between the global index of an atom and the @@ -564,7 +577,29 @@ namespace OpenMD{ * by SimCreator once and only once, since it is never changed * during the simulation. It shoudl be nGlobalAtoms_ in size. */ - vector globalMolMembership_; + vector globalMolMembership_; + + /** + * A vector that maps between the local index of an atom and the + * index of the AtomType. + */ + vector identArray_; + public: + vector getIdentArray() { return identArray_; } + private: + + /** + * A vector which contains the fractional contribution of an + * atom's mass to the total mass of the cutoffGroup that atom + * belongs to. In the case of single atom cutoff groups, the mass + * factor for that atom is 1. For massless atoms, the factor is + * also 1. + */ + vector massFactors_; + public: + vector getMassFactors() { return massFactors_; } + private: + /// lists to handle atoms needing special treatment in the non-bonded interactions PairList excludedInteractions_; /**< atoms excluded from interacting with each other */ @@ -595,7 +630,9 @@ namespace OpenMD{ string restFileName_; - bool fortranInitialized_; /** flag to indicate whether the fortran side is initialized */ + bool topologyDone_; /** flag to indicate whether the topology has + been scanned and all the relevant + bookkeeping has been done*/ bool calcBoxDipole_; /**< flag to indicate whether or not we calculate the simulation box dipole moment */