Gromacs
2020.4
|
#include "gmxpre.h"
#include "biasstate.h"
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdrunutility/multisim.h"
#include "gromacs/mdtypes/awh_history.h"
#include "gromacs/mdtypes/awh_params.h"
#include "gromacs/mdtypes/commrec.h"
#include "gromacs/simd/simd.h"
#include "gromacs/simd/simd_math.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/utility/stringutil.h"
#include "grid.h"
#include "pointstate.h"
Implements the BiasState class.
Functions | |
void | gmx::anonymous_namespace{biasstate.cpp}::sumOverSimulations (gmx::ArrayRef< int > arrayRef, const gmx_multisim_t *multiSimComm) |
Sum an array over all simulations on the master rank of each simulation. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::sumOverSimulations (gmx::ArrayRef< double > arrayRef, const gmx_multisim_t *multiSimComm) |
Sum an array over all simulations on the master rank of each simulation. More... | |
template<typename T > | |
void | gmx::anonymous_namespace{biasstate.cpp}::sumOverSimulations (gmx::ArrayRef< T > arrayRef, const t_commrec *commRecord, const gmx_multisim_t *multiSimComm) |
Sum an array over all simulations on all ranks of each simulation. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::sumPmf (gmx::ArrayRef< PointState > pointState, int numSharedUpdate, const t_commrec *commRecord, const gmx_multisim_t *multiSimComm) |
Sum PMF over multiple simulations, when requested. More... | |
double | gmx::anonymous_namespace{biasstate.cpp}::freeEnergyMinimumValue (gmx::ArrayRef< const PointState > pointState) |
Find the minimum free energy value. More... | |
double | gmx::anonymous_namespace{biasstate.cpp}::biasedLogWeightFromPoint (const std::vector< DimParams > &dimParams, const std::vector< PointState > &points, const Grid &grid, int pointIndex, double pointBias, const awh_dvec value) |
Find and return the log of the probability weight of a point given a coordinate value. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::updateTargetDistribution (gmx::ArrayRef< PointState > pointState, const BiasParams ¶ms) |
Updates the target distribution for all points. More... | |
std::string | gmx::anonymous_namespace{biasstate.cpp}::gridPointValueString (const Grid &grid, int point) |
Puts together a string describing a grid point. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::setHistogramUpdateScaleFactors (const BiasParams ¶ms, double newHistogramSize, double oldHistogramSize, double *weightHistScaling, double *logPmfSumScaling) |
Sets the histogram rescaling factors needed to control the histogram size. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::mergeSharedUpdateLists (std::vector< int > *updateList, int numPoints, const t_commrec *commRecord, const gmx_multisim_t *multiSimComm) |
Merge update lists from multiple sharing simulations. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::makeLocalUpdateList (const Grid &grid, const std::vector< PointState > &points, const awh_ivec originUpdatelist, const awh_ivec endUpdatelist, std::vector< int > *updateList) |
Generate an update list of points sampled since the last update. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::sumHistograms (gmx::ArrayRef< PointState > pointState, gmx::ArrayRef< double > weightSumCovering, int numSharedUpdate, const t_commrec *commRecord, const gmx_multisim_t *multiSimComm, const std::vector< int > &localUpdateList) |
Add partial histograms (accumulating between updates) to accumulating histograms. More... | |
void | gmx::anonymous_namespace{biasstate.cpp}::labelCoveredPoints (const std::vector< bool > &visited, const std::vector< bool > &checkCovering, int numPoints, int period, int coverRadius, gmx::ArrayRef< int > covered) |
Label points along an axis as covered or not. More... | |
static void | gmx::normalizeFreeEnergyAndPmfSum (std::vector< PointState > *pointState) |
Normalizes the free energy and PMF sum. More... | |
static int | gmx::countTrailingZeroRows (const double *const *data, int numRows, int numColumns) |
Count trailing data rows containing only zeros. More... | |
static void | gmx::readUserPmfAndTargetDistribution (const std::vector< DimParams > &dimParams, const Grid &grid, const std::string &filename, int numBias, int biasIndex, std::vector< PointState > *pointState) |
Initializes the PMF and target with data read from an input table. More... | |