RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
|
Represents a torsion potential between two particles. More...
Public Member Functions | |
TorsionPotential () | |
Default constructor for TorsionPotential. | |
TorsionPotential (std::array< std::size_t, 4 > identifiers, TorsionType type, std::vector< double > vector_parameters) | |
TorsionPotential (std::array< std::size_t, 4 > identifiers, const TorsionType type) | |
Constructs a TorsionPotential with specified type and torsion IDs. | |
bool | operator== (TorsionPotential const &) const =default |
std::string | print () const |
Generates a string representation of the torsion potential. | |
double | calculateEnergy (const double3 &posA, const double3 &posB, const double3 &posc, const double3 &posD) const |
Static Public Attributes | |
static std::array< std::size_t, 8 > | numberOfTorsionParameters {0, 2, 2, 1, 2, 2, 2, 1} |
Number of parameters required for each torsion type. | |
static std::map< std::string, TorsionType, caseInsensitiveComparator > | definitionForString |
Mapping of torsion type strings to TorsionType enums. | |
Friends | |
Archive< std::ofstream > & | operator<< (Archive< std::ofstream > &archive, const TorsionPotential &b) |
Archive< std::ifstream > & | operator>> (Archive< std::ifstream > &archive, TorsionPotential &b) |
Represents a torsion potential between two particles.
The TorsionPotential struct encapsulates the type of torsion and associated parameters between two particles. It includes versioning for serialization, torsion type, identifiers of torsioned particles, and torsion parameters.
|
inline |
Default constructor for TorsionPotential.
Initializes a TorsionPotential object with Undefined torsion type and zeroed torsion IDs.
|
inline |
Constructs a TorsionPotential with specified type and torsion IDs.
type | The type of torsion potential. |
identifiers | A pair of particle identifiers forming the torsion. |
std::string TorsionPotential::print | ( | ) | const |
Generates a string representation of the torsion potential.
Provides a formatted string containing torsion type, particle IDs, and parameters.
|
inlinestatic |
Mapping of torsion type strings to TorsionType enums.
A static map that associates torsion type names with their corresponding TorsionType enumeration values.
|
inlinestatic |
Number of parameters required for each torsion type.
A static vector indicating the number of parameters needed for each torsion type.