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

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

Collaboration diagram for VanDerWaalsPotential:

Public Member Functions

 VanDerWaalsPotential ()
 Default constructor for vanDerWaalsPotential.
 
 VanDerWaalsPotential (std::array< std::size_t, 2 > identifiers, VanDerWaalsType type, std::vector< double > vector_parameters, double shift, double scaling)
 
 VanDerWaalsPotential (std::array< std::size_t, 2 > identifiers, const VanDerWaalsType type)
 Constructs a vanDerWaalsPotential with specified type and vanDerWaals IDs.
 
bool operator== (VanDerWaalsPotential const &) const =default
 
std::string print () const
 Generates a string representation of the vanDerWaals potential.
 
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 vanDerWaals.
 
VanDerWaalsType type
 The type of vanDerWaals potential.
 
double shift
 
double scaling
 
std::array< double, maximumNumberOfVanDerWaalsParameters > parameters
 Parameters associated with the vanDerWaals potential.
 

Static Public Attributes

static std::array< std::size_t, 2 > numberOfVanDerWaalsParameters {2}
 Number of parameters required for each vanDerWaals type.
 
static std::map< std::string, VanDerWaalsType, caseInsensitiveComparator > definitionForString
 Mapping of vanDerWaals type strings to type enums.
 

Friends

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

Detailed Description

Represents a vanDerWaals potential between two particles.

The vanDerWaalsPotential struct encapsulates the type of vanDerWaals and associated parameters between two particles. It includes versioning for serialization, vanDerWaals type, identifiers of vanDerWaalsed particles, and vanDerWaals parameters.

Constructor & Destructor Documentation

◆ VanDerWaalsPotential() [1/2]

VanDerWaalsPotential::VanDerWaalsPotential ( )
inline

Default constructor for vanDerWaalsPotential.

Initializes a vanDerWaalsPotential object with Undefined vanDerWaals type and zeroed vanDerWaals IDs.

◆ VanDerWaalsPotential() [2/2]

VanDerWaalsPotential::VanDerWaalsPotential ( std::array< std::size_t, 2 >  identifiers,
const VanDerWaalsType  type 
)
inline

Constructs a vanDerWaalsPotential with specified type and vanDerWaals IDs.

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

Member Function Documentation

◆ print()

std::string VanDerWaalsPotential::print ( ) const

Generates a string representation of the vanDerWaals potential.

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

Returns
A string describing the vanDerWaals potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, VanDerWaalsType, caseInsensitiveComparator> VanDerWaalsPotential::definitionForString
inlinestatic
Initial value:
{
{"LENNARD_JONES", VanDerWaalsType::LennardJones}}

Mapping of vanDerWaals type strings to type enums.

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

◆ numberOfVanDerWaalsParameters

std::array<std::size_t, 2> VanDerWaalsPotential::numberOfVanDerWaalsParameters {2}
inlinestatic

Number of parameters required for each vanDerWaals type.

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


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