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

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

Collaboration diagram for BondTorsionPotential:

Public Member Functions

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

Static Public Attributes

static std::array< std::size_t, 1 > numberOfBondTorsionParameters {4}
 Number of parameters required for each bond_torsion type.
 
static std::map< std::string, BondTorsionType, caseInsensitiveComparator > definitionForString
 Mapping of bond_torsion type strings to BondTorsionType enums.
 

Friends

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

Detailed Description

Represents a bond_torsion potential between two particles.

The BondTorsionPotential struct encapsulates the type of bond_torsion and associated parameters between two particles. It includes versioning for serialization, bond_torsion type, identifiers of bond_torsioned particles, and bond_torsion parameters.

Constructor & Destructor Documentation

◆ BondTorsionPotential() [1/2]

BondTorsionPotential::BondTorsionPotential ( )
inline

Default constructor for BondTorsionPotential.

Initializes a BondTorsionPotential object with Undefined bond_torsion type and zeroed bond_torsion IDs.

◆ BondTorsionPotential() [2/2]

BondTorsionPotential::BondTorsionPotential ( std::array< std::size_t, 4 >  identifiers,
const BondTorsionType  type 
)
inline

Constructs a BondTorsionPotential with specified type and bond_torsion IDs.

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

Member Function Documentation

◆ print()

std::string BondTorsionPotential::print ( ) const

Generates a string representation of the bond_torsion potential.

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

Returns
A string describing the bond_torsion potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, BondTorsionType, caseInsensitiveComparator> BondTorsionPotential::definitionForString
inlinestatic
Initial value:
{
{"MM3", BondTorsionType::MM3}}

Mapping of bond_torsion type strings to BondTorsionType enums.

A static map that associates bond_torsion type names with their corresponding BondTorsionType enumeration values.

◆ numberOfBondTorsionParameters

std::array<std::size_t, 1> BondTorsionPotential::numberOfBondTorsionParameters {4}
inlinestatic

Number of parameters required for each bond_torsion type.

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


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