RASPA3 3.0.12
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
|
Represents a bond potential between two particles. More...
Public Member Functions | |
BondPotential () | |
Default constructor for BondPotential. | |
BondPotential (std::array< std::size_t, 2 > identifiers, BondType type, std::vector< double > vector_parameters) | |
BondPotential (std::array< std::size_t, 2 > identifiers, const BondType type) | |
Constructs a BondPotential with specified type and bond IDs. | |
bool | operator== (BondPotential const &) const =default |
std::string | print () const |
Generates a string representation of the bond potential. | |
double | generateBondLength (RandomNumber &random, double beta) const |
double | calculateEnergy (const double3 &posA, const double3 &posB) const |
std::tuple< double, std::array< double3, 2 >, double3x3 > | potentialEnergyGradientStrain (const double3 &posA, const double3 &posB) const |
Static Public Attributes | |
static std::array< std::size_t, 12 > | numberOfBondParameters {0, 1, 2, 1, 3, 2, 2, 3, 3, 4, 4, 2} |
Number of parameters required for each bond type. | |
static std::map< std::string, BondType > | definitionForString |
Mapping of bond type strings to BondType enums. | |
Friends | |
Archive< std::ofstream > & | operator<< (Archive< std::ofstream > &archive, const BondPotential &b) |
Archive< std::ifstream > & | operator>> (Archive< std::ifstream > &archive, BondPotential &b) |
Represents a bond potential between two particles.
The BondPotential struct encapsulates the type of bond and associated parameters between two particles. It includes versioning for serialization, bond type, identifiers of bonded particles, and bond parameters.
|
inline |
Default constructor for BondPotential.
Initializes a BondPotential object with Undefined bond type and zeroed bond IDs.
|
inline |
Constructs a BondPotential with specified type and bond IDs.
type | The type of bond potential. |
identifiers | A pair of particle identifiers forming the bond. |
std::string BondPotential::print | ( | ) | const |
Generates a string representation of the bond potential.
Provides a formatted string containing bond type, particle IDs, and parameters.
|
inlinestatic |
Mapping of bond type strings to BondType enums.
A static map that associates bond type names with their corresponding BondType enumeration values.
|
inlinestatic |
Number of parameters required for each bond type.
A static vector indicating the number of parameters needed for each bond type.