Scine::Swoose  2.0.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
GaffPotentialTermsGenerator.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_GAFFPOTENTIALTERMSGENERATOR_H
9 #define MOLECULARMECHANICS_GAFFPOTENTIALTERMSGENERATOR_H
10 
11 #include "../Interactions/AngleTerm.h"
12 #include "../Interactions/BondedTerm.h"
13 #include "../Interactions/DihedralTerm.h"
14 #include "../Interactions/ElectrostaticTerm.h"
15 #include "../Interactions/ImproperDihedralTerm.h"
16 #include "../Interactions/LennardJonesTerm.h"
17 #include <vector>
18 
19 namespace Scine {
20 
21 namespace Core {
22 class Log;
23 } // namespace Core
24 
25 namespace MolecularMechanics {
26 class IndexedStructuralTopology;
27 class AtomTypesHolder;
28 class GaffParameters;
29 
38  public:
48  GaffPotentialTermsGenerator(int nAtoms, const AtomTypesHolder& atomTypes, const IndexedStructuralTopology& topology,
49  const GaffParameters& parameters, const Utils::PositionCollection& positions,
50  const double& nonCovalentCutoffRadius, Core::Log& log);
51 
53  std::vector<BondedTerm> getBondedTerms();
55  std::vector<AngleTerm> getAngleTerms();
57  std::vector<DihedralTerm> getDihedralTerms();
59  std::vector<DihedralTerm> getImproperDihedralTerms();
61  std::vector<LennardJonesTerm> getLennardJonesTerms(bool applyCutoff);
63  std::vector<ElectrostaticTerm> getElectrostaticTerms(bool applyCutoff);
64 
65  private:
66  int nAtoms_;
67  const AtomTypesHolder& atomTypesHolder_;
68  const IndexedStructuralTopology& topology_;
69  const GaffParameters& parameters_;
70  const Utils::PositionCollection& positions_;
71  /*
72  * @brief The cutoff radius for the non-covalent interactions.
73  *
74  * It is a pointer so that it is updated with the settings.
75  * This is important since it is passed on from here to the actual DispersionTerms, etc.
76  * A reference does not work because then the assignment operator of DispersionTerms, etc. vanishes.
77  */
78  std::shared_ptr<double> cutoff_;
79  // The logger
80  Core::Log& log_;
81 
82  static constexpr double scalingFactorForElectrostaticOneFourTerms_ = 0.5;
83  static constexpr double scalingFactorForLennardJonesOneFourTerms_ = 0.5;
84 };
85 
86 } // namespace MolecularMechanics
87 } // namespace Scine
88 
89 #endif // MOLECULARMECHANICS_GAFFPOTENTIALTERMSGENERATOR_H
Class containing the structural information about the connectivity of a system.
Definition: IndexedStructuralTopology.h:25
Class containing the parameters for the GAFF model obtained after parsing a GAFF parameter file...
Definition: GaffParameters.h:38
GaffPotentialTermsGenerator(int nAtoms, const AtomTypesHolder &atomTypes, const IndexedStructuralTopology &topology, const GaffParameters &parameters, const Utils::PositionCollection &positions, const double &nonCovalentCutoffRadius, Core::Log &log)
Constructor.
Definition: GaffPotentialTermsGenerator.cpp:19
This class creates the actual potential terms that are employed during a GAFF molecular mechanics cal...
Definition: GaffPotentialTermsGenerator.h:37
std::vector< AngleTerm > getAngleTerms()
Getter for angle terms.
Definition: GaffPotentialTermsGenerator.cpp:37
Class containing the MM atom types of the atoms in a molecular system.
Definition: AtomTypesHolder.h:21
std::vector< ElectrostaticTerm > getElectrostaticTerms(bool applyCutoff)
Getter for electrostatic terms with decision whether to use a cutoff radius.
Definition: GaffPotentialTermsGenerator.cpp:133
std::vector< DihedralTerm > getDihedralTerms()
Getter for dihedral terms.
Definition: GaffPotentialTermsGenerator.cpp:41
std::vector< LennardJonesTerm > getLennardJonesTerms(bool applyCutoff)
Getter for Lennard-Jones terms with decision whether to use a cutoff radius.
Definition: GaffPotentialTermsGenerator.cpp:100
std::vector< BondedTerm > getBondedTerms()
Getter for bonded terms.
Definition: GaffPotentialTermsGenerator.cpp:33
std::vector< DihedralTerm > getImproperDihedralTerms()
Getter for improper dihedral terms. In GAFF, an improper dihedral is treated as a normal dihedral...
Definition: GaffPotentialTermsGenerator.cpp:72