Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
SfamParameterParser.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_SFAMPARAMETERPARSER_H
9 #define MOLECULARMECHANICS_SFAMPARAMETERPARSER_H
10 
11 #include <istream>
12 #include <memory>
13 #include <regex>
14 #include <string>
15 #include <vector>
16 
17 namespace Scine {
18 namespace MolecularMechanics {
19 class SfamParameters;
20 class AtomTypesHolder;
21 
29  public:
33  SfamParameterParser(std::string filename, const AtomTypesHolder& atomTypes);
34 
38  std::unique_ptr<SfamParameters> parseParameters();
39 
40  private:
41  bool parse(SfamParameters& parameters);
42  bool parseBonds(std::istream& in, SfamParameters& parameters);
43  bool parseAngles(std::istream& in, SfamParameters& parameters);
44  bool parseDihedrals(std::istream& in, SfamParameters& parameters);
45  bool parseImproperDihedrals(std::istream& in, SfamParameters& parameters);
46  bool parseCharges(std::istream& in, SfamParameters& parameters);
47  bool parseNonCovalentParameters(std::istream& in, SfamParameters& parameters);
48  bool parseC6Parameters(std::istream& in, SfamParameters& parameters);
49 
50  // Checks whether a regex iterator is valid; throws exception if not.
51  void checkIter(const std::sregex_token_iterator& iter);
52 
53  std::string parameterFile_;
54  int nAtoms_;
55  const AtomTypesHolder& atomTypes_;
56 };
57 
58 } // namespace MolecularMechanics
59 } // namespace Scine
60 
61 #endif // MOLECULARMECHANICS_SFAMPARAMETERPARSER_H
SfamParameterParser(std::string filename, const AtomTypesHolder &atomTypes)
Constructor from filename of parameter file and atom types of the system.
Definition: SfamParameterParser.cpp:20
std::unique_ptr< SfamParameters > parseParameters()
Parse the parameters.
Definition: SfamParameterParser.cpp:24
Class containing the MM atom types of the atoms in a molecular system.
Definition: AtomTypesHolder.h:21
This class reads in the SFAM parameters from the parameter file. The parsing relies on Qt and the con...
Definition: SfamParameterParser.h:28
Class containing the parameters for SFAM&#39;s MM model obtained after parsing a SFAM parameter file...
Definition: SfamParameters.h:37