--- branches/development/src/brains/SimInfo.hpp 2011/05/26 13:55:04 1569 +++ branches/development/src/brains/SimInfo.hpp 2012/10/22 20:42:10 1808 @@ -36,7 +36,8 @@ * [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). * [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). - * [4] Vardeman & Gezelter, in progress (2009). + * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). + * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). */ /** @@ -59,7 +60,7 @@ #include "math/Vector3.hpp" #include "math/SquareMatrix3.hpp" #include "types/MoleculeStamp.hpp" -#include "UseTheForce/ForceField.hpp" +#include "brains/ForceField.hpp" #include "utils/PropertyMap.hpp" #include "utils/LocalIndexManager.hpp" #include "nonbonded/SwitchingFunction.hpp" @@ -90,13 +91,9 @@ namespace OpenMD{ /** * Constructor of SimInfo * - * @param molStampPairs MoleculeStamp Array. The first element of - * the pair is molecule stamp, the second element is the total - * number of molecules with the same molecule stamp in the system + * @param ff pointer to a concrete ForceField instance * - * @param ff pointer of a concrete ForceField instance - * - * @param simParams + * @param simParams pointer to the simulation parameters in a Globals object */ SimInfo(ForceField* ff, Globals* simParams); virtual ~SimInfo(); @@ -107,7 +104,7 @@ namespace OpenMD{ * @return return true if adding successfully, return false if the * molecule is already in SimInfo * - * @param mol molecule to be added + * @param mol Molecule to be added */ bool addMolecule(Molecule* mol); @@ -165,6 +162,9 @@ namespace OpenMD{ unsigned int getNAtoms() { return nAtoms_; } + + /** Returns the number of effective cutoff groups on local processor */ + unsigned int getNLocalCutoffGroups(); /** Returns the number of local bonds */ unsigned int getNBonds(){ @@ -219,11 +219,21 @@ namespace OpenMD{ */ Molecule* nextMolecule(MoleculeIterator& i); + /** Returns the total number of fluctuating charges that are present */ + int getNFluctuatingCharges() { + return nGlobalFluctuatingCharges_; + } + /** Returns the number of degrees of freedom */ int getNdf() { return ndf_ - getFdf(); } + /** Returns the number of degrees of freedom (LOCAL) */ + int getNdfLocal() { + return ndfLocal_; + } + /** Returns the number of raw degrees of freedom */ int getNdfRaw() { return ndfRaw_; @@ -272,30 +282,7 @@ namespace OpenMD{ Globals* getSimParams() { return simParams_; } - - /** Returns the velocity of center of mass of the whole system.*/ - Vector3d getComVel(); - - /** Returns the center of the mass of the whole system.*/ - Vector3d getCom(); - /** Returns the center of the mass and Center of Mass velocity of - the whole system.*/ - void getComAll(Vector3d& com,Vector3d& comVel); - /** Returns intertia tensor for the entire system and system - Angular Momentum.*/ - void getInertiaTensor(Mat3x3d &intertiaTensor,Vector3d &angularMomentum); - - /** Returns system angular momentum */ - Vector3d getAngularMomentum(); - - /** Returns volume of system as estimated by an ellipsoid defined - by the radii of gyration*/ - void getGyrationalVolume(RealType &vol); - /** Overloaded version of gyrational volume that also returns - det(I) so dV/dr can be calculated*/ - void getGyrationalVolume(RealType &vol, RealType &detI); - void update(); /** * Do final bookkeeping before Force managers need their data. @@ -394,7 +381,6 @@ namespace OpenMD{ /** * Sets GlobalGroupMembership - * @see #SimCreator::setGlobalIndex */ void setGlobalGroupMembership(const vector& globalGroupMembership) { assert(globalGroupMembership.size() == static_cast(nGlobalAtoms_)); @@ -403,7 +389,6 @@ namespace OpenMD{ /** * Sets GlobalMolMembership - * @see #SimCreator::setGlobalIndex */ void setGlobalMolMembership(const vector& globalMolMembership) { assert(globalMolMembership.size() == static_cast(nGlobalAtoms_)); @@ -513,6 +498,7 @@ namespace OpenMD{ int nIntegrableObjects_; /**< number of integrable objects in local processor */ int nCutoffGroups_; /**< number of cutoff groups in local processor */ int nConstraints_; /**< number of constraints in local processors */ + int nFluctuatingCharges_; /**< number of fluctuating charges in local processor */ /// Counts of global objects int nGlobalMols_; /**< number of molecules in the system (GLOBAL) */ @@ -520,9 +506,12 @@ namespace OpenMD{ int nGlobalCutoffGroups_; /**< number of cutoff groups in this system (GLOBAL) */ int nGlobalIntegrableObjects_; /**< number of integrable objects in this system */ int nGlobalRigidBodies_; /**< number of rigid bodies in this system (GLOBAL) */ + int nGlobalFluctuatingCharges_;/**< number of fluctuating charges in this system (GLOBAL) */ + /// Degress of freedom int ndf_; /**< number of degress of freedom (excludes constraints) (LOCAL) */ + int ndfLocal_; /**< number of degrees of freedom (LOCAL, excludes constraints) */ int fdf_local; /**< number of frozen degrees of freedom (LOCAL) */ int fdf_; /**< number of frozen degrees of freedom (GLOBAL) */ int ndfRaw_; /**< number of degress of freedom (includes constraints), (LOCAL) */ @@ -534,6 +523,7 @@ namespace OpenMD{ bool usesDirectionalAtoms_; /**< are there atoms with position AND orientation? */ bool usesMetallicAtoms_; /**< are there transition metal atoms? */ bool usesElectrostaticAtoms_; /**< are there electrostatic atoms? */ + bool usesFluctuatingCharges_; /**< are there fluctuating charges? */ bool usesAtomicVirial_; /**< are we computing atomic virials? */ bool requiresPrepair_; /**< does this simulation require a pre-pair loop? */ bool requiresSkipCorrection_; /**< does this simulation require a skip-correction? */ @@ -542,7 +532,7 @@ namespace OpenMD{ public: bool usesElectrostaticAtoms() { return usesElectrostaticAtoms_; } bool usesDirectionalAtoms() { return usesDirectionalAtoms_; } - bool usesMetallicAtoms() { return usesMetallicAtoms_; } + bool usesFluctuatingCharges() { return usesFluctuatingCharges_; } bool usesAtomicVirial() { return usesAtomicVirial_; } bool requiresPrepair() { return requiresPrepair_; } bool requiresSkipCorrection() { return requiresSkipCorrection_;} @@ -598,8 +588,13 @@ namespace OpenMD{ vector massFactors_; public: vector getMassFactors() { return massFactors_; } - private: + PairList* getExcludedInteractions() { return &excludedInteractions_; } + PairList* getOneTwoInteractions() { return &oneTwoInteractions_; } + PairList* getOneThreeInteractions() { return &oneThreeInteractions_; } + PairList* getOneFourInteractions() { return &oneFourInteractions_; } + + private: /// lists to handle atoms needing special treatment in the non-bonded interactions PairList excludedInteractions_; /**< atoms excluded from interacting with each other */ @@ -666,7 +661,6 @@ namespace OpenMD{ /** * Set MolToProcMap array - * @see #SimCreator::divideMolecules */ void setMolToProcMap(const vector& molToProcMap) { molToProcMap_ = molToProcMap;