Gromacs  2025.0-dev-20241011-013a99c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions
gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup Class Reference

Description

Collect density fitting parameters only available during simulation setup.

Todo:
Implement builder pattern that will not use unqiue_ptr to check if parameters have been set or not.

To build the density fitting force provider during simulation setup, the DensityFitting class needs access to parameters that become available only during simulation setup.

This class collects these parameters via MDModulesNotifiers in the simulation setup phase and provides a check if all necessary parameters have been provided.

Public Member Functions

void setLocalAtomSet (const LocalAtomSet &localAtomSet)
 Set the local atom set for the density fitting. More...
 
const LocalAtomSetlocalAtomSet () const
 Return local atom set for density fitting. More...
 
const TranslateAndScaletransformationToDensityLattice () const
 Return transformation into density lattice. More...
 
basic_mdspan< const float,
dynamicExtents3D
referenceDensity () const
 Return reference density. More...
 
void readReferenceDensityFromFile (const std::string &referenceDensityFileName)
 Reads the reference density from file. More...
 
void normalizeReferenceDensity ()
 Normalize the reference density so that the sum over all voxels is unity.
 
void setPeriodicBoundaryConditionType (const PbcType &pbcType)
 Set the periodic boundary condition via MDModuleNotifier. More...
 
PbcType periodicBoundaryConditionType ()
 Get the periodic boundary conditions.
 
void setSimulationTimeStep (double timeStep)
 Set the simulation time step.
 
double simulationTimeStep () const
 Return the simulation time step.
 

Member Function Documentation

const LocalAtomSet& gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::localAtomSet ( ) const
inline

Return local atom set for density fitting.

Exceptions
InternalErrorif local atom set is not set
Returns
local atom set for density fitting
void gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::readReferenceDensityFromFile ( const std::string &  referenceDensityFileName)
inline

Reads the reference density from file.

Reads and check file, then set and communicate the internal parameters related to the reference density with the file data.

Exceptions
FileIOErrorif reading from file was not successful
basic_mdspan<const float, dynamicExtents3D> gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::referenceDensity ( ) const
inline

Return reference density.

Exceptions
InternalErrorif reference density is not set
Returns
the reference density
void gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::setLocalAtomSet ( const LocalAtomSet localAtomSet)
inline

Set the local atom set for the density fitting.

Parameters
[in]localAtomSetof atoms to be fitted
void gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::setPeriodicBoundaryConditionType ( const PbcType pbcType)
inline

Set the periodic boundary condition via MDModuleNotifier.

The pbc type is wrapped in PeriodicBoundaryConditionType to allow the MDModuleNotifier to statically distinguish the callback function type from other 'int' function callbacks.

Parameters
[in]pbcTypeenumerates the periodic boundary condition.
const TranslateAndScale& gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::transformationToDensityLattice ( ) const
inline

Return transformation into density lattice.

Exceptions
InternalErrorif transformation into density lattice is not set
Returns
transformation into density lattice

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