--- branches/development/src/UseTheForce/ForceField.hpp 2010/07/09 23:08:25 1465 +++ branches/development/src/brains/ForceField.hpp 2012/05/26 18:13:43 1725 @@ -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). */ /** @@ -55,8 +56,9 @@ #include #include -#include "io/basic_ifstrstream.hpp" +#include "io/ifstrstream.hpp" #include "io/ForceFieldOptions.hpp" +#include "io/SectionParserManager.hpp" #include "utils/TypeContainer.hpp" #include "utils/Tuple.hpp" #include "types/AtomType.hpp" @@ -65,17 +67,12 @@ #include "types/TorsionType.hpp" #include "types/InversionType.hpp" #include "types/NonBondedInteractionType.hpp" -#include "UseTheForce/fForceOptions.h" + namespace OpenMD { - /** - * @class ForceField ForceField.hpp ''UseTheForce/ForceField.hpp" - * @brief - */ class ForceField{ public: - typedef TypeContainer AtomTypeContainer; typedef TypeContainer BondTypeContainer; typedef TypeContainer BendTypeContainer; @@ -83,9 +80,9 @@ namespace OpenMD { typedef TypeContainer InversionTypeContainer; typedef TypeContainer NonBondedInteractionTypeContainer; - ForceField(); + ForceField(std::string ffName); - virtual ~ForceField(); + virtual ~ForceField() {}; std::string getForceFieldFileName() { return forceFieldFileName_; @@ -95,9 +92,10 @@ namespace OpenMD { forceFieldFileName_ = filename; } - virtual void parse(const std::string& filename) = 0; + virtual void parse(const std::string& filename); AtomType* getAtomType(const std::string &at); + AtomType* getAtomType(int ident); BondType* getBondType(const std::string &at1, const std::string &at2); BendType* getBendType(const std::string &at1, const std::string &at2, const std::string &at3); @@ -138,6 +136,14 @@ namespace OpenMD { unsigned int getNAtomType() { return atomTypeCont_.size(); } + + AtomTypeContainer* getAtomTypes() { + return &atomTypeCont_; + } + + NonBondedInteractionTypeContainer* getNonBondedInteractionTypes() { + return &nonBondedInteractionTypeCont_; + } bool addAtomType(const std::string &at, AtomType* atomType); @@ -165,9 +171,6 @@ namespace OpenMD { ForceFieldOptions& getForceFieldOptions() {return forceFieldOptions_;} - void setFortranForceOptions(void); - - protected: AtomTypeContainer atomTypeCont_; @@ -177,12 +180,13 @@ namespace OpenMD { InversionTypeContainer inversionTypeCont_; NonBondedInteractionTypeContainer nonBondedInteractionTypeCont_; ForceFieldOptions forceFieldOptions_; + std::map atypeIdentToName; + SectionParserManager spMan_; + private: - std::string ffPath_; - - std::string wildCardAtomTypeName_; - + std::string ffPath_; + std::string wildCardAtomTypeName_; std::string forceFieldFileName_; };