Gromacs  2020.1
 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


Collect density fitting parameters only available during simulation setup.

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 MdModuleNotifications 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,
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 (PeriodicBoundaryConditionType pbc)
 Set the periodic boundary condition via MdModuleNotifier. More...
int periodicBoundaryConditionType ()
 Get the periodic boundary conditions.
void setSimulationTimeStep (double timeStep)
 Set the simulation time step.
double simulationTimeStep ()
 Return the simulation time step.

Member Function Documentation

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

Return local atom set for density fitting.

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

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.

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

Return reference density.

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

Set the local atom set for the density fitting.

[in]localAtomSetof atoms to be fitted
void gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::setPeriodicBoundaryConditionType ( PeriodicBoundaryConditionType  pbc)

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.

[in]pbcMdModuleNotification class that contains a variable that enumerates the periodic boundary condition.
const TranslateAndScale& gmx::anonymous_namespace{densityfitting.cpp}::DensityFittingSimulationParameterSetup::transformationToDensityLattice ( ) const

Return transformation into density lattice.

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

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