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

Public Member Functions

 Molecule () noexcept=default
 Default constructor for the Molecule struct.
 
 Molecule (double3 centerOfMassPosition, simd_quatd orientation)
 Constructs a Molecule with specified center of mass position and orientation.
 
 Molecule (double3 centerOfMassPosition, simd_quatd orientation, double mass, std::size_t componentId, std::size_t numberOfAtoms)
 
std::string repr () const
 

Public Attributes

double3 centerOfMassPosition
 The center of mass position of the molecule in 3D space.
 
double3 velocity
 The velocity of the molecule.
 
double3 gradient
 The gradient (force) acting on the molecule.
 
simd_quatd orientation
 The orientation of the molecule represented as a quaternion.
 
simd_quatd orientationMomentum
 The angular momentum of the molecule's orientation.
 
simd_quatd orientationGradient
 The gradient (torque) acting on the molecule's orientation.
 
double mass
 Molecular mass.
 
double invMass
 1/mass to save on computing (and set correct size)
 
double padding1
 
double padding2
 
std::size_t atomIndex
 Pointing to the index in the list of atoms.
 
std::size_t numberOfAtoms
 Number of subatoms in this molecule.
 
std::size_t componentId
 Pointing to the index in the components list.
 
std::size_t padding3
 

Friends

Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const Molecule &molecule)
 
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, Molecule &molecule)
 
void to_json (nlohmann::json &, const Molecule &)
 
void from_json (const nlohmann::json &, Molecule &)
 

Constructor & Destructor Documentation

◆ Molecule() [1/2]

Molecule::Molecule ( )
defaultnoexcept

Default constructor for the Molecule struct.

Initializes a Molecule object with default values.

◆ Molecule() [2/2]

Molecule::Molecule ( double3  centerOfMassPosition,
simd_quatd  orientation 
)
inline

Constructs a Molecule with specified center of mass position and orientation.

Initializes a Molecule with the provided center of mass position and orientation. Other members are initialized to zero.

Parameters
centerOfMassPositionThe initial center of mass position of the molecule.
orientationThe initial orientation of the molecule represented as a quaternion.

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