20 #ifndef OST_MM_FORCEFIELD_READER_HH
21 #define OST_MM_FORCEFIELD_READER_HH
25 #include <boost/filesystem.hpp>
26 #include <boost/algorithm/string.hpp>
27 #include <boost/lexical_cast.hpp>
28 #include <boost/unordered_map.hpp>
37 namespace ost {
namespace mol{
namespace mm{
58 boost::unordered_map<String,int> keyword_map_;
59 boost::unordered_map<String, std::vector<std::pair<String,String> > > renaming_to_standard_;
73 boost::unordered_map<String,int> keyword_map_;
82 std::vector<std::vector<String> >
Process(
const String& filename);
86 boost::filesystem::path
GetBasedir() {
return basepath_; }
91 void ResolveIFDEF(std::vector<std::vector<String> >& file_content,
int line_counter);
94 std::vector<std::vector<String> > ReadFile(
const String& filename);
96 std::map<String,std::vector<String> > definitions_;
97 std::set<String> defines_;
98 boost::filesystem::path basepath_;
126 bool type_definition,
130 bool type_definition,
134 bool type_definition,
138 bool type_definition,
142 bool type_definition,
146 bool type_definition,
150 bool type_definition,
154 bool type_definition,
158 bool type_definition,
161 BuildingBlockPtr BlockFromRTP(
const std::vector<std::vector<String> >& data);
163 BuildingBlockPtr BlockFromITP(
const std::vector<std::vector<String> >& data);
167 BlockModifierPtr ParseBlockModifier(
const std::vector<std::vector<String> >& data);
171 void ParseTerminiReplaceRule(
const std::vector<String>& data,
GromacsBlockModifier& constructor);
173 void ParseTerminiAddRule(
const std::vector<String>& data1,
const std::vector<String>& data2,
177 void ParseForcefield(std::vector<std::vector<String> >& content);
178 void ParseAtomTypes(std::vector<std::vector<String> >& content);
181 void ParseCHARMMPRM(std::vector<std::vector<String> >& content);
183 void ParseCHARMMRTF(std::vector<std::vector<String> >& content);
186 void ParseRTP(std::vector<std::vector<String> >& content);
187 void ParseARN(std::vector<std::vector<String> >& content);
188 void ParseHDB(std::vector<std::vector<String> >& content);
189 void ParseNTDB(std::vector<std::vector<String> >& content);
190 void ParseCTDB(std::vector<std::vector<String> >& content);
191 void ParseVSD(std::vector<std::vector<String> >& content);
192 void ParseRtoB(std::vector<std::vector<String> >& content);
194 void ParseITP(std::vector<std::vector<String> >& content);
196 boost::unordered_map<String, std::vector<std::pair<String,String> > > atom_renaming_ff_specific_;
197 boost::unordered_map<String, ResidueNamesPtr> res_renaming_ff_specific_;
199 std::vector<FuncType> ff_bonded_types_;
206 std::vector<FuncType> bonded_types_;
207 std::vector<String> read_residues_;
void ReadCHARMMPRM(const String &basename)
String ConvertToStandard(const String &res_name, const String &atom_name)
void ReadCHARMMRTF(const String &basename)
boost::shared_ptr< Interaction > InteractionPtr
ForcefieldPtr GetForcefield()
void SetPreprocessorDefinition(const String &def)
void ReadITP(const String &basename)
bool ConversionExists(const String &res_name)
boost::shared_ptr< BlockModifier > BlockModifierPtr
void ReadGromacsForcefield()
boost::filesystem::path GetBasedir()
int GetKeywordIndex(const String &keyword)
boost::shared_ptr< CHARMMData > CHARMMDataPtr
std::vector< std::vector< String > > Process(const String &filename)
static GromacsDataPtr Instance()
FFReader(const String &base_dir)
boost::shared_ptr< FFReader > FFReaderPtr
boost::shared_ptr< GromacsData > GromacsDataPtr
boost::shared_ptr< ost::mol::mm::Forcefield > ForcefieldPtr
static CHARMMDataPtr Instance()
int GetKeywordIndex(const String &keyword)
void SetForcefield(ForcefieldPtr ff)
boost::shared_ptr< TerminiConstructor > TerminiConstructorPtr
void ReadResidueDatabase(const String &basename)
MMPreprocessor(const String &basepath)
void SetDefinition(const String &def)
boost::shared_ptr< BuildingBlock > BuildingBlockPtr