* \param[in] beta Value for 1/(kB*T).
* \param[in] inputErrorScaling Factor for initial error scaling.
* \param[in] dimensionParameterBuffers Buffers containing the dimension parameters.
+ * \param[in] shareGroup share group for, potentially, sharing the bias between simulations
* \param[in] inputUserData If there is a user provided PMF estimate.
*/
static std::vector<char> awhBiasParamSerialized(AwhHistogramGrowthType eawhgrowth,
double beta,
double inputErrorScaling,
ArrayRef<const std::vector<char>> dimensionParameterBuffers,
+ int shareGroup,
bool inputUserData)
{
int ndim = dimensionParameterBuffers.size();
AwhHistogramGrowthType eGrowth = eawhgrowth;
bool bUserData = inputUserData;
double errorInitial = inputErrorScaling / beta;
- int shareGroup = 0;
bool equilibrateHistogram = false;
gmx::InMemorySerializer serializer;
* \param[in] inputErrorScaling Factor for initial error scaling.
* \param[in] inputSeed Seed value to use.
* \param[in] dimensionParameterBuffers Buffers containing the dimension parameters.
+ * \param[in] biasShareGroup share group for, potentially, sharing the bias over simulations
* \param[in] inputUserData If there is a user provided PMF estimate.
*/
static std::vector<char> awhParamSerialized(AwhHistogramGrowthType eawhgrowth,
double inputErrorScaling,
int64_t inputSeed,
ArrayRef<const std::vector<char>> dimensionParameterBuffers,
+ int biasShareGroup,
bool inputUserData)
{
int numBias = 1;
auto awhParamBuffer = serializer.finishAndGetBuffer();
auto awhBiasBuffer = awhBiasParamSerialized(
- eawhgrowth, beta, inputErrorScaling, dimensionParameterBuffers, inputUserData);
+ eawhgrowth, beta, inputErrorScaling, dimensionParameterBuffers, biasShareGroup, inputUserData);
awhParamBuffer.insert(awhParamBuffer.end(), awhBiasBuffer.begin(), awhBiasBuffer.end());
double beta,
bool useAwhFep,
double inputErrorScaling,
- int numFepLambdaStates)
+ int numFepLambdaStates,
+ int biasShareGroup)
{
double convFactor = 1;
double k = 1000;
int64_t seed = 93471803;
auto awhParamBuffer = awhParamSerialized(
- eawhgrowth, eawhpotential, beta, inputErrorScaling, seed, dimensionParameterBuffers, inputUserData);
+ eawhgrowth, eawhpotential, beta, inputErrorScaling, seed, dimensionParameterBuffers, biasShareGroup, inputUserData);
gmx::InMemoryDeserializer deserializer(awhParamBuffer, false);
AwhTestParameters params(&deserializer);
auto awhDimBuffer = awhDimParamSerialized();
auto awhDimArrayRef = gmx::arrayRefFromArray(&awhDimBuffer, 1);
auto awhBiasBuffer = awhBiasParamSerialized(
- AwhHistogramGrowthType::ExponentialLinear, 0.4, 0.5, awhDimArrayRef, false);
+ AwhHistogramGrowthType::ExponentialLinear, 0.4, 0.5, awhDimArrayRef, 0, false);
gmx::InMemoryDeserializer deserializer(awhBiasBuffer, false);
AwhBiasParams awhBiasParams(&deserializer);
EXPECT_EQ(awhBiasParams.ndim(), 1);
{
auto awhDimBuffer = awhDimParamSerialized();
auto awhDimArrayRef = gmx::arrayRefFromArray(&awhDimBuffer, 1);
- auto awhParamBuffer = awhParamSerialized(
- AwhHistogramGrowthType::ExponentialLinear, AwhPotentialType::Convolved, 0.4, 0.5, 1337, awhDimArrayRef, false);
+ auto awhParamBuffer = awhParamSerialized(AwhHistogramGrowthType::ExponentialLinear,
+ AwhPotentialType::Convolved,
+ 0.4,
+ 0.5,
+ 1337,
+ awhDimArrayRef,
+ 0,
+ false);
gmx::InMemoryDeserializer deserializer(awhParamBuffer, false);
AwhParams awhParams(&deserializer);
EXPECT_EQ(awhParams.numBias(), 1);