RASPA3 3.0.22
A molecular simulation code for computing adsorption and diffusion in nanoporous materials
Loading...
Searching...
No Matches
Framework Struct Referenceexport
module framework

Represents a framework in the simulation system. More...

Collaboration diagram for Framework:

Public Member Functions

 Framework ()
 Default constructor for the Framework struct.
 
 Framework (std::size_t componentId, const ForceField &forceField, std::string componentName, SimulationBox simulationBox, std::size_t spaceGroupHallNumber, const std::vector< Atom > &definedAtoms, const std::vector< Atom > &fractionalAtoms, int3 numberOfUnitCells) noexcept(false)
 Constructs a Framework programmatically with specified parameters.
 
void determineUniqueAtomTypes ()
 
void makeSuperCell ()
 Constructs the supercell by replicating the unit cell atoms.
 
std::vector< AtommakeSuperCell (int3 numberOfCells) const
 
std::vector< double3 > fractionalAtomPositionsUnitCell () const
 
std::vector< double3 > cartesianAtomPositionsUnitCell () const
 
std::vector< double2 > atomUnitCellLennardJonesPotentialParameters (const ForceField &forceField) const
 
std::optional< double > computeLargestNonOverlappingFreeRadius (const ForceField &forceField, double3 probe_position, double well_depth_factor) const
 
bool computeVanDerWaalsRadiusOverlap (const ForceField &forceField, double3 probe_position) const
 
bool computeOverlap (const ForceField &forceField, double3 probe_position, double well_depth_factor, std::size_t probe_type, std::make_signed_t< std::size_t > skip) const
 
std::string printStatus (const ForceField &forceField) const
 Generates a string representation of the framework status.
 
std::string printBreakthroughStatus () const
 Generates a string representation of the breakthrough status.
 
nlohmann::json jsonStatus () const
 Generates a JSON representation of the framework status.
 
std::string repr () const
 Returns a string representation of the Framework.
 

Static Public Member Functions

static Framework makeFAU (const ForceField &forceField, int3 replicate={1, 1, 1})
 
static Framework makeITQ29 (const ForceField &forceField, int3 replicate={1, 1, 1})
 
static Framework makeMFI (const ForceField &forceField, int3 replicate={1, 1, 1})
 
static Framework makeCHA (const ForceField &forceField, int3 replicate={1, 1, 1})
 

Public Attributes

std::uint64_t versionNumber {1}
 Version number for serialization purposes.
 
SimulationBox simulationBox
 Simulation box defining the unit cell dimensions.
 
std::size_t spaceGroupHallNumber {1}
 Space group number according to the Hall notation.
 
int3 numberOfUnitCells {1, 1, 1}
 Number of unit cells in each dimension for the supercell.
 
std::size_t frameworkId {0}
 Identifier for the framework.
 
std::string name {}
 Name of the framework component.
 
std::string filename {}
 File name of the framework.
 
std::size_t numberOfComponents {1}
 
bool rigid {true}
 Flag indicating if the framework is rigid.
 
double mass {0.0}
 Total mass of the framework.
 
double unitCellMass {0.0}
 Mass of the unit cell.
 
double netCharge {0.0}
 Net charge of the framework.
 
double smallestCharge {0.0}
 Smallest atomic charge in the framework.
 
double largestCharge {0.0}
 Largest atomic charge in the framework.
 
std::vector< AtomdefinedAtoms {}
 Fractional Atoms defining the unit cell before symmetry operations.
 
std::vector< AtomfractionalUnitCellAtoms
 Fractional atoms in the unit cell after applying symmetry operations.
 
std::vector< AtomunitCellAtoms
 Cartesian atoms in the unit cell after applying symmetry operations.
 
std::vector< Atomatoms {}
 All Cartesian atoms in the framework after constructing the supercell.
 
std::unordered_set< std::size_t > uniqueAtomTypes {}
 
std::vector< std::size_t > chiralCenters {}
 Indices of chiral centers in the framework.
 
std::vector< BondPotentialbonds {}
 Bonds within the framework.
 
std::vector< std::pair< std::size_t, std::size_t > > bondDipoles {}
 Pairs of atoms forming bond dipoles.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t > > bends {}
 Triplets of atoms forming angle bends.
 
std::vector< std::pair< std::size_t, std::size_t > > UreyBradley {}
 Pairs of atoms for Urey-Bradley interactions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > inversionBends {}
 Quartets of atoms for inversion bends.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > Torsion {}
 Quartets of atoms forming torsions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > ImproperTorsions {}
 Quartets of atoms forming improper torsions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t > > bondBonds {}
 Triplets of atoms for bond-bond interactions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t > > stretchBends {}
 Triplets of atoms for stretch-bend interactions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > bendBends {}
 Quartets of atoms for bend-bend interactions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > stretchTorsions {}
 Quartets of atoms for stretch-torsion interactions.
 
std::vector< std::tuple< std::size_t, std::size_t, std::size_t, std::size_t > > bendTorsions {}
 Quartets of atoms for bend-torsion interactions.
 
std::vector< std::pair< std::size_t, std::size_t > > intraVDW {}
 Pairs of atoms for intramolecular van der Waals interactions.
 
std::vector< std::pair< std::size_t, std::size_t > > intraCoulomb {}
 Pairs of atoms for intramolecular Coulomb interactions.
 
std::vector< std::pair< std::size_t, std::size_t > > excludedIntraCoulomb {}
 Pairs of atoms excluded from intramolecular Coulomb interactions.
 

Friends

Archive< std::ofstream > & operator<< (Archive< std::ofstream > &archive, const Framework &c)
 
Archive< std::ifstream > & operator>> (Archive< std::ifstream > &archive, Framework &c)
 

Detailed Description

Represents a framework in the simulation system.

The Framework struct encapsulates the properties and behaviors of a framework (e.g., a solid lattice or crystalline structure) within the simulation. It includes information about the simulation box, atoms within the framework, and various structural and force field parameters. The struct provides constructors for initializing frameworks from files or programmatically, and methods to process and output framework data.

Constructor & Destructor Documentation

◆ Framework() [1/2]

Framework::Framework ( )

Default constructor for the Framework struct.

Initializes an empty Framework object with default values.

◆ Framework() [2/2]

Framework::Framework ( std::size_t  componentId,
const ForceField forceField,
std::string  componentName,
SimulationBox  simulationBox,
std::size_t  spaceGroupHallNumber,
const std::vector< Atom > &  definedAtoms,
const std::vector< Atom > &  fractionalAtoms,
int3  numberOfUnitCells 
)

Constructs a Framework programmatically with specified parameters.

Initializes a Framework using provided simulation box, space group number, defined atoms, and unit cell information, allowing for programmatic creation of frameworks without file input.

Parameters
componentIdIdentifier for the framework component.
forceFieldReference to the force field containing pseudo-atom definitions.
componentNameName of the framework component.
simulationBoxSimulation box defining the unit cell dimensions.
spaceGroupHallNumberSpace group number according to the Hall notation.
definedAtomsVector of atoms defining the positions and types within the unit cell.
numberOfUnitCellsNumber of unit cells in each dimension to construct the supercell.

Member Function Documentation

◆ jsonStatus()

nlohmann::json Framework::jsonStatus ( ) const

Generates a JSON representation of the framework status.

Creates a JSON object containing detailed information about the framework, suitable for serialization or logging.

Returns
A JSON object representing the framework status.

◆ makeSuperCell()

void Framework::makeSuperCell ( )

Constructs the supercell by replicating the unit cell atoms.

Generates the full framework structure by replicating the unit cell atoms according to the specified number of unit cells in each dimension.

◆ printBreakthroughStatus()

std::string Framework::printBreakthroughStatus ( ) const

Generates a string representation of the breakthrough status.

Returns
A string representing the breakthrough status.

◆ printStatus()

std::string Framework::printStatus ( const ForceField forceField) const

Generates a string representation of the framework status.

Creates a formatted string containing detailed information about the framework, including atom types, positions, charges, and bond information.

Parameters
forceFieldReference to the force field containing pseudo-atom definitions.
Returns
A string representing the framework status.

◆ repr()

std::string Framework::repr ( ) const

Returns a string representation of the Framework.

Generates a string that includes the framework's ID, name, number of atoms, net charge, mass, and other relevant information.

Returns
A string representing the Framework.

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