Scine::Swoose  2.1.0
This is the SCINE module Swoose.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
RepulsionTerm.h
Go to the documentation of this file.
1 
8 #ifndef MOLECULARMECHANICS_REPULSIONTERM_H
9 #define MOLECULARMECHANICS_REPULSIONTERM_H
10 
11 #include "InteractionTermBase.h"
12 #include "Repulsion.h"
13 #include "RepulsionParameters.h"
14 
15 namespace Scine {
16 
17 namespace Utils {
18 class AtomCollection;
19 class FullSecondDerivativeCollection;
20 } // namespace Utils
21 
22 namespace MolecularMechanics {
23 
29  public:
30  using AtomIndex = int;
31 
38  RepulsionTerm(AtomIndex firstAtom, AtomIndex secondAtom, const Repulsion& repulsion, std::shared_ptr<double> cutoffRadius);
41 
46  RepulsionParameters& repulsionParameters) const;
47 
49  int getFirstAtom() const;
51  int getSecondAtom() const;
52 
53  private:
54  AtomIndex firstAtom_, secondAtom_;
55  Repulsion repulsion_;
56  // Pointer so that it is updated whenever the settings are updated.
57  // Reference does not work because then the class loses its assignment operator.
58  std::shared_ptr<double> cutoffRadius_;
59 };
60 
61 } // namespace MolecularMechanics
62 } // namespace Scine
63 
64 #endif // MOLECULARMECHANICS_REPULSIONTERM_H
RepulsionTerm(AtomIndex firstAtom, AtomIndex secondAtom, const Repulsion &repulsion, std::shared_ptr< double > cutoffRadius)
Constructor.
Definition: RepulsionTerm.cpp:17
int getSecondAtom() const
Getter for index of second atom.
Definition: RepulsionTerm.cpp:60
Base class for all interaction terms.
Definition: InteractionTermBase.h:18
int getFirstAtom() const
Getter for index of first atom.
Definition: RepulsionTerm.cpp:56
Class handling the parameters needed for the repulsive non-bonded interaction term.
Definition: RepulsionParameters.h:22
Class treating a repulsive non-bonded interaction, based solely on the bond length. (i.e. in 1 dimension)
Definition: Repulsion.h:21
double evaluateRepulsionTerm(const Utils::AtomCollection &structure, Utils::FullSecondDerivativeCollection &derivatives, RepulsionParameters &repulsionParameters) const
Evaluates the energy contribution and adds the derivatives.
Definition: RepulsionTerm.cpp:24
Class evaluating repulsive non-bonded interaction between two atoms.
Definition: RepulsionTerm.h:28