2 #include "../utils/fwd_declares.hpp" 5 #include <EASTL/bitset.h> 10 #ifndef INDIGOX_CLASSES_FORCEFIELD_HPP 11 #define INDIGOX_CLASSES_FORCEFIELD_HPP 16 using FFParam = std::initializer_list<double>;
25 template <
typename Archive>
26 void serialise(Archive &archive,
const uint32_t version);
44 int32_t
GetID()
const;
55 std::shared_ptr<Impl> m_data;
89 Store_ForceConstant = 0,
90 Store_IdealLength = 1,
95 using AllowedMask = eastl::bitset<num_allow_positions, uint8_t>;
98 using DataStore = std::array<double, STORE_SIZE>;
101 template <
typename Archive>
102 void serialise(Archive &archive,
const uint32_t version);
135 int32_t
GetID()
const;
147 std::shared_ptr<Impl> m_data;
173 Store_ForceConstant = 0,
174 Store_IdealAngle = 1,
179 using DataStore = std::array<double, STORE_SIZE>;
181 using AllowedMask = eastl::bitset<num_allow_positions, uint8_t>;
184 template <
typename Archive>
185 void serialise(Archive &archive,
const uint32_t version);
218 int32_t
GetID()
const;
230 std::shared_ptr<Impl> m_data;
266 Store_PhaseShift = 0,
267 Store_ForceConstant = 1,
268 Store_Multiplicity = 2,
269 Store_IdealAngle = 0,
274 using DataStore = std::array<double, STORE_SIZE>;
276 using AllowedMask = eastl::bitset<num_allow_positions>;
279 template <
typename Archive>
280 void serialise(Archive &archive,
const uint32_t version);
323 int32_t
GetID()
const;
329 std::shared_ptr<Impl> m_data;
345 using AtomTypes = std::vector<FFAtom>;
347 using BondTypes = std::map<BondType, std::vector<FFBond>>;
349 using AngleTypes = std::map<AngleType, std::vector<FFAngle>>;
351 using DihedralTypes = std::map<DihedralType, std::vector<FFDihedral>>;
368 template <
typename Archive>
369 void serialise(Archive &archive,
const uint32_t version);
414 FFBond NewBondType(
BondType type, int32_t
id,
double a,
double b);
586 std::shared_ptr<Impl> m_data;
FFAtom NewAtomType(int32_t id, std::string name, const Element &element)
Add a new atom type to the forcefield.
Definition: forcefield.hpp:18
void ReserveAngleTypes(AngleType type, size_t size)
Reserve space for angle types.
Definition: forcefield.hpp:58
size_t NumBondTypes() const
Get the total number of bond types in the forcefield.
#define INDIGOX_GENERIC_PIMPL_CLASS_DEFAULTS(class_name)
Definition: fwd_declares.hpp:18
int32_t GetID() const
Get the ID for this type.
Type GetType() const
Get the potential energy function type.
Family
Enum for the different families of forcefields.
Definition: forcefield.hpp:341
int32_t GetID() const
Get the ID for this type.
Type
Enum for the different function types a dihedral term can have.
Definition: forcefield.hpp:244
int32_t GetMultiplicity() const
Get the multiplicity.
void LinkBondTypes(const FFBond &a, const FFBond &b)
Link together two equivalent bond types.
FFAngle GetAngleType(AngleType type, int32_t id) const
Get the type of angle with the given id.
An empty bond type with no parameters.
Definition: forcefield.hpp:234
friend class cereal::access
Friendship allows serialisation.
Definition: forcefield.hpp:156
std::string GetName() const
Get the name for this type.
double GetIdealAngle() const
Get the ideal angle (in degrees).
Forcefield GetForcefield() const
double GetIdealLength() const
Get the ideal angle (in degrees).
FFAngle GetLinkedType() const
Get the linked type for this type.
double GetForceConstant() const
Get the force constant.
Namespace for all graph related functionality.
Definition: access.hpp:7
FFBond GetBondType(BondType type, int32_t id) const
Get the type of bond with the given id.
double GetIdealAngle() const
Get the ideal angle (in degrees).
Forcefield GetForcefield() const
size_t NumAtomTypes() const
Get the number of atom types in the forcefield.
friend class cereal::access
Friendship allows serialisation.
Definition: forcefield.hpp:335
int32_t GetID() const
Get the ID for this type.
Forcefield GetForcefield() const
Type GetType() const
Get the potential energy function type.
size_t NumDihedralTypes() const
Get the number of dihedral types in the forcefield.
int32_t GetID() const
Get the ID for this type.
Element GetElement() const
Type GetType() const
Get the potential energy function type.
friend class cereal::access
Friendship allows serialisation.
Definition: forcefield.hpp:63
Family GetFamily() const
Get the family of the forcefield.
Type
Enum for the different function types a bond term can have.
Definition: forcefield.hpp:68
double GetPhaseShift() const
Get the phase shift (in degrees).
FFDihedral GetDihedralType(DihedralType type, int32_t id) const
Get the type of dihedral with the given id.
FFAtom GetAtomType(std::string name) const
Get the AtomType with the given name.
Forcefield GetForcefield() const
friend class cereal::access
Friendship allows serialisation.
Definition: forcefield.hpp:239
Read only class for storing elemental information.
Definition: periodictable.hpp:28
void ReserveAtomTypes(size_t size)
Reserve space for atom types.
void LinkAngleTypes(const FFAngle &a, const FFAngle &b)
Link together two equivalent angle types.
Type
Enum for the different function types a angle term can have.
Definition: forcefield.hpp:161
#define INDIGOX_GENERIC_PIMPL_CLASS_OPERATORS(class_name, short_name)
Definition: fwd_declares.hpp:26
Definition: forcefield.hpp:333
double GetForceConstant() const
Get the force constant.
std::initializer_list< double > FFParam
type for collection of parameter inputs
Definition: forcefield.hpp:16
void ReserveBondTypes(BondType type, size_t size)
Reserve space for bond types.
std::ostream & operator<<(std::ostream &os, const Dihedral &dhd)
size_t NumAngleTypes() const
Get the number of angle types in the forcefield.
void ReserveDihedralTypes(DihedralType type, size_t size)
Reserve space for dihedral types.
Definition: forcefield.hpp:151
FFBond GetLinkedType() const
Get the linked type for this type.
double GetForceConstant() const
Get the force constant.
std::string GetName() const
Get the name of the forcefield.
friend class cereal::access
Friendship allows serialisation.
Definition: forcefield.hpp:20
Forcefield GenerateGROMOS54A7()