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

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

Collaboration diagram for UreyBradleyPotential:

Public Member Functions

 UreyBradleyPotential ()
 Default constructor for UreyBradleyPotential.
 
 UreyBradleyPotential (std::array< std::size_t, 2 > identifiers, UreyBradleyType type, std::vector< double > vector_parameters)
 
 UreyBradleyPotential (std::array< std::size_t, 2 > identifiers, const UreyBradleyType type)
 Constructs a UreyBradleyPotential with specified type and ureyBradley IDs.
 
bool operator== (UreyBradleyPotential const &) const =default
 
std::string print () const
 Generates a string representation of the ureyBradley potential.
 
double generateUreyBradleyLength (RandomNumber &random, double beta) const
 
double calculateEnergy (const double3 &posA, const double3 &posB) const
 

Public Attributes

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

Static Public Attributes

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

Friends

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

Detailed Description

Represents a ureyBradley potential between two particles.

The UreyBradleyPotential struct encapsulates the type of ureyBradley and associated parameters between two particles. It includes versioning for serialization, ureyBradley type, identifiers of ureyBradleyed particles, and ureyBradley parameters.

Constructor & Destructor Documentation

◆ UreyBradleyPotential() [1/2]

UreyBradleyPotential::UreyBradleyPotential ( )
inline

Default constructor for UreyBradleyPotential.

Initializes a UreyBradleyPotential object with Undefined ureyBradley type and zeroed ureyBradley IDs.

◆ UreyBradleyPotential() [2/2]

UreyBradleyPotential::UreyBradleyPotential ( std::array< std::size_t, 2 >  identifiers,
const UreyBradleyType  type 
)
inline

Constructs a UreyBradleyPotential with specified type and ureyBradley IDs.

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

Member Function Documentation

◆ print()

std::string UreyBradleyPotential::print ( ) const

Generates a string representation of the ureyBradley potential.

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

Returns
A string describing the ureyBradley potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, UreyBradleyType, caseInsensitiveComparator> UreyBradleyPotential::definitionForString
inlinestatic
Initial value:
{
{"FIXED", UreyBradleyType::Fixed},
{"HARMONIC", UreyBradleyType::Harmonic},
{"CORE_SHELL_SPRING", UreyBradleyType::CoreShellSpring},
{"MORSE", UreyBradleyType::Morse},
{"LJ_12_6", UreyBradleyType::LJ_12_6},
{"LENNARD_JONES", UreyBradleyType::LennardJones},
{"BUCKINGHAM", UreyBradleyType::Buckingham},
{"RESTRAINED_HARMONIC", UreyBradleyType::RestrainedHarmonic},
{"QUARTIC", UreyBradleyType::Quartic},
{"CFF_QUARTIC", UreyBradleyType::CFF_Quartic},
{"MM3", UreyBradleyType::MM3}}

Mapping of ureyBradley type strings to UreyBradleyType enums.

A static map that associates ureyBradley type names with their corresponding UreyBradleyType enumeration values.

◆ numberOfUreyBradleyParameters

std::array<std::size_t, 11> UreyBradleyPotential::numberOfUreyBradleyParameters {1, 2, 1, 3, 2, 2, 3, 3, 4, 4, 2}
inlinestatic

Number of parameters required for each ureyBradley type.

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


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