--- branches/new_design/OOPSE-4/src/UseTheForce/ForceField.hpp 2004/11/12 17:40:03 1735 +++ branches/new_design/OOPSE-4/src/UseTheForce/ForceField.hpp 2004/11/15 23:00:32 1740 @@ -37,6 +37,7 @@ #define MK_STR(s) # s #define STR_DEFINE(t, s) t = MK_STR(s) +#include #include #include "utils/Tuple.hpp" @@ -62,7 +63,8 @@ class ForceField{ hasVariant_ = true; variant_ = variant; } - virtual void readParams() = 0; + + virtual void parse(const std::string& filename) = 0; AtomType* getAtomType(const std::string &at); BondType* getBondType(const std::string &at1, const std::string &at2); @@ -71,6 +73,8 @@ class ForceField{ TorsionType* getTorsionType(const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4); + //avoid make virtual function public + //Herb Sutter and Andrei Alexandrescu, C++ coding Standards, Addision-Wesley virtual double getRcutFromAtomType(AtomType* at); std::string getWildCard() { @@ -90,9 +94,9 @@ class ForceField{ void addTorsionType(const std::string &at1, const std::string &at2, const std::string &at3, const std::string &at4, TorsionType* torsionType); + ifstrstream* openForceFieldFile(const std::string& filename); private: std::string ffPath_; - ifstrstream forceFile_; bool hasVariant_; std::string variant_;