RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
Loading...
Searching...
No Matches
TorsionPotential Struct Referenceexport

Represents a torsion potential between two particles. More...

Collaboration diagram for TorsionPotential:

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
 

Public Attributes

std::uint64_t versionNumber {1}
 Version number for serialization.
 
std::array< std::size_t, 4 > identifiers
 Identifiers of the two particles forming the torsion.
 
TorsionType type
 The type of torsion potential.
 
std::array< double, maximumNumberOfTorsionParameters > parameters
 Parameters associated with the torsion potential.
 

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)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ TorsionPotential() [1/2]

TorsionPotential::TorsionPotential ( )
inline

Default constructor for TorsionPotential.

Initializes a TorsionPotential object with Undefined torsion type and zeroed torsion IDs.

◆ TorsionPotential() [2/2]

TorsionPotential::TorsionPotential ( std::array< std::size_t, 4 >  identifiers,
const TorsionType  type 
)
inline

Constructs a TorsionPotential with specified type and torsion IDs.

Parameters
typeThe type of torsion potential.
identifiersA pair of particle identifiers forming the torsion.

Member Function Documentation

◆ print()

std::string TorsionPotential::print ( ) const

Generates a string representation of the torsion potential.

Provides a formatted string containing torsion type, particle IDs, and parameters.

Returns
A string describing the torsion potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, TorsionType, caseInsensitiveComparator> TorsionPotential::definitionForString
inlinestatic
Initial value:
{
{"Fixed", TorsionType::Fixed},
{"HARMONIC", TorsionType::Harmonic},
{"HARMONIC_COSINE", TorsionType::HarmonicCosine},
{"THREE_COSINE", TorsionType::ThreeCosine},
{"SIX_COSINE", TorsionType::RyckaertBellemans},
{"TRAPPE", TorsionType::TraPPE},
{"TRAPPE_EXTENDED", TorsionType::TraPPE_Extended},
{"CVFF", TorsionType::CVFF},
{"CFF", TorsionType::CFF},
{"CFF2", TorsionType::CFF2},
{"OPLS", TorsionType::OPLS},
{"MM3", TorsionType::MM3},
{"FOURIER_SERIES", TorsionType::FourierSeries},
{"FOURIER_SERIES2", TorsionType::FourierSeries2}}

Mapping of torsion type strings to TorsionType enums.

A static map that associates torsion type names with their corresponding TorsionType enumeration values.

◆ numberOfTorsionParameters

std::array<std::size_t, 8> TorsionPotential::numberOfTorsionParameters {0, 2, 2, 1, 2, 2, 2, 1}
inlinestatic

Number of parameters required for each torsion type.

A static vector indicating the number of parameters needed for each torsion type.


The documentation for this struct was generated from the following file: