class rgpot::PotentialBase¶
Overview¶
Abstract base class for all potential energy surfaces. More…
#include <Potential.hpp>
class PotentialBase {
public:
// construction
PotentialBase(PotType inp_type);
virtual ~PotentialBase();
// methods
virtual std::pair<double, AtomMatrix> operator()(const AtomMatrix& positions, const std::vector<int>& atmtypes, const std::array<std::array<double, 3>, 3>& box) = 0;
PotType get_type() const;
};
Detailed Documentation¶
Abstract base class for all potential energy surfaces.
Construction¶
PotentialBase(PotType inp_type)
Constructor for PotentialBase.
Parameters:
inp_type |
The type of the potential. |
virtual ~PotentialBase()
Virtual destructor.
Methods¶
virtual std::pair<double, AtomMatrix> operator()(const AtomMatrix& positions, const std::vector<int>& atmtypes, const std::array<std::array<double, 3>, 3>& box) = 0
Main interface for potential and force calculation.
Parameters:
positions |
The atomic coordinates. |
atmtypes |
The atomic numbers. |
box |
The simulation cell vectors. |
Returns:
A pair containing the energy and the force matrix.
PotType get_type() const
Fetches the potential type.
Returns:
The potential type.