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

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

Collaboration diagram for CoulombPotential:

Public Member Functions

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

Static Public Attributes

static std::array< std::size_t, 1 > numberOfCoulombParameters {1}
 Number of parameters required for each Coulomb type.
 
static std::map< std::string, CoulombType, caseInsensitiveComparator > definitionForString
 Mapping of Coulomb type strings to CoulombType enums.
 

Friends

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

Detailed Description

Represents a Coulomb potential between two particles.

The CoulombPotential struct encapsulates the type of Coulomb and associated parameters between two particles. It includes versioning for serialization, Coulomb type, identifiers of Coulombed particles, and Coulomb parameters.

Constructor & Destructor Documentation

◆ CoulombPotential() [1/2]

CoulombPotential::CoulombPotential ( )
inline

Default constructor for CoulombPotential.

Initializes a CoulombPotential object with Undefined Coulomb type and zeroed Coulomb IDs.

◆ CoulombPotential() [2/2]

CoulombPotential::CoulombPotential ( std::array< std::size_t, 2 >  identifiers,
const CoulombType  type 
)
inline

Constructs a CoulombPotential with specified type and Coulomb IDs.

Parameters
CoulombTypeThe type of Coulomb potential.
CoulombIdsA pair of particle identifiers forming the Coulomb.

Member Function Documentation

◆ print()

std::string CoulombPotential::print ( ) const

Generates a string representation of the Coulomb potential.

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

Returns
A string describing the Coulomb potential.

Member Data Documentation

◆ definitionForString

std::map<std::string, CoulombType, caseInsensitiveComparator> CoulombPotential::definitionForString
inlinestatic
Initial value:
{
{"COULOMB", CoulombType::Coulomb}}

Mapping of Coulomb type strings to CoulombType enums.

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

◆ numberOfCoulombParameters

std::array<std::size_t, 1> CoulombPotential::numberOfCoulombParameters {1}
inlinestatic

Number of parameters required for each Coulomb type.

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


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