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

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

Collaboration diagram for BendTorsionPotential:

Public Member Functions

 BendTorsionPotential ()
 Default constructor for BendTorsionPotential.
 
 BendTorsionPotential (std::array< std::size_t, 4 > identifiers, BendTorsionType type, std::vector< double > vector_parameters)
 
 BendTorsionPotential (std::array< std::size_t, 4 > identifiers, const BendTorsionType type)
 Constructs a BendTorsionPotential with specified type and bend_torsion IDs.
 
bool operator== (BendTorsionPotential const &) const =default
 
std::string print () const
 Generates a string representation of the bend_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 bend_torsion.
 
BendTorsionType type
 The type of bend_torsion potential.
 
std::array< double, maximumNumberOfBendTorsionParameters > parameters
 Parameters associated with the bend_torsion potential.
 

Static Public Attributes

static std::array< std::size_t, 8 > numberOfBendTorsionParameters {3, 3, 3, 3, 3, 3, 3, 3}
 Number of parameters required for each bend_torsion type.
 
static std::map< std::string, BendTorsionType, caseInsensitiveComparator > definitionForString
 Mapping of bend_torsion type strings to BendTorsionType enums.
 

Friends

Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const BendTorsionPotential &b)
 
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, BendTorsionPotential &b)
 

Detailed Description

Represents a bend_torsion potential between two particles.

The BendTorsionPotential struct encapsulates the type of bend_torsion and associated parameters between two particles. It includes versioning for serialization, bend_torsion type, identifiers of bend_torsioned particles, and bend_torsion parameters.

Constructor & Destructor Documentation

◆ BendTorsionPotential() [1/2]

BendTorsionPotential::BendTorsionPotential ( )
inline

Default constructor for BendTorsionPotential.

Initializes a BendTorsionPotential object with Undefined bend_torsion type and zeroed bend_torsion IDs.

◆ BendTorsionPotential() [2/2]

BendTorsionPotential::BendTorsionPotential ( std::array< std::size_t, 4 >  identifiers,
const BendTorsionType  type 
)
inline

Constructs a BendTorsionPotential with specified type and bend_torsion IDs.

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

Member Function Documentation

◆ print()

std::string BendTorsionPotential::print ( ) const

Generates a string representation of the bend_torsion potential.

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

Returns
A string describing the bend_torsion potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, BendTorsionType, caseInsensitiveComparator> BendTorsionPotential::definitionForString
inlinestatic
Initial value:
{
{"SMOOTHED", BendTorsionType::Smoothed}, {"SMOOTHED_THREE_COSINE", BendTorsionType::SmoothedThreeCosine},
{"NICHOLAS", BendTorsionType::Nicholas}, {"CFF", BendTorsionType::CFF},
{"SMOOTHED_CFF", BendTorsionType::SmoothedCFF}, {"SMOOTHED_CFF2", BendTorsionType::SmoothedCFF2},
{"SMOOTHED_CFF2", BendTorsionType::SmoothedCFF3}, {"CVFF", BendTorsionType::CVFF}}

Mapping of bend_torsion type strings to BendTorsionType enums.

A static map that associates bend_torsion type names with their corresponding BendTorsionType enumeration values.

◆ numberOfBendTorsionParameters

std::array<std::size_t, 8> BendTorsionPotential::numberOfBendTorsionParameters {3, 3, 3, 3, 3, 3, 3, 3}
inlinestatic

Number of parameters required for each bend_torsion type.

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


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