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

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

Collaboration diagram for BendPotential:

Public Member Functions

 BendPotential ()
 Default constructor for BendPotential.
 
 BendPotential (std::array< std::size_t, 3 > identifiers, BendType type, std::vector< double > vector_parameters)
 
 BendPotential (std::array< std::size_t, 3 > identifiers, const BendType type)
 Constructs a BendPotential with specified type and bend IDs.
 
bool operator== (BendPotential const &) const =default
 
std::string print () const
 Generates a string representation of the bend potential.
 
double generateBendAngle (RandomNumber &random, double beta) const
 
double calculateEnergy (const double3 &posA, const double3 &posB, const double3 &posc, const std::optional< const double3 > &posD) const
 
std::tuple< double, std::array< double3, 3 >, double3x3 > potentialEnergyGradientStrain (const double3 &posA, const double3 &posB, const double3 &posC) const
 

Public Attributes

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

Static Public Attributes

static std::array< std::size_t, 11 > numberOfBendParameters {1, 2, 2, 4, 4, 2, 3, 3, 1, 2, 2}
 Number of parameters required for each bend type.
 
static std::map< std::string, BendType, caseInsensitiveComparator > definitionForString
 Mapping of bend type strings to BendType enums.
 

Friends

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

Detailed Description

Represents a bend potential between two particles.

The BendPotential struct encapsulates the type of bend and associated parameters between two particles. It includes versioning for serialization, bend type, identifiers of bended particles, and bend parameters.

Constructor & Destructor Documentation

◆ BendPotential() [1/2]

BendPotential::BendPotential ( )
inline

Default constructor for BendPotential.

Initializes a BendPotential object with Undefined bend type and zeroed bend IDs.

◆ BendPotential() [2/2]

BendPotential::BendPotential ( std::array< std::size_t, 3 >  identifiers,
const BendType  type 
)
inline

Constructs a BendPotential with specified type and bend IDs.

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

Member Function Documentation

◆ print()

std::string BendPotential::print ( ) const

Generates a string representation of the bend potential.

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

Returns
A string describing the bend potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, BendType, caseInsensitiveComparator> BendPotential::definitionForString
inlinestatic
Initial value:
{
{"RIGID", BendType::Rigid},
{"FIXED", BendType::Fixed},
{"HARMONIC", BendType::Harmonic},
{"CORE_SHELL", BendType::CoreShell},
{"QUARTIC", BendType::Quartic},
{"CFF_QUARTIC", BendType::CFF_Quartic},
{"HARMONIC_COSINE", BendType::HarmonicCosine},
{"COSINE", BendType::Cosine},
{"TAFIPOLSKY", BendType::Tafipolsky},
{"MM3", BendType::MM3},
{"MM3_INPLANE", BendType::MM3_inplane}}

Mapping of bend type strings to BendType enums.

A static map that associates bend type names with their corresponding BendType enumeration values.

◆ numberOfBendParameters

std::array<std::size_t, 11> BendPotential::numberOfBendParameters {1, 2, 2, 4, 4, 2, 3, 3, 1, 2, 2}
inlinestatic

Number of parameters required for each bend type.

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


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