X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=blobdiff_plain;f=src%2Fgromacs%2Fapplied_forces%2Fawh%2Fbiasstate.cpp;h=7c8b1d0e2bfa5e1affef6e3cd8299ae39211d4b4;hb=9cf1bd23abe8ac9a4e2638845d34ae1b1ccf19b7;hp=3a43f29db1ff8993ba3d026d39ff3d46d8d70248;hpb=1cec3d370882e309e9955e3c0361b86dd52ed606;p=alexxy%2Fgromacs.git diff --git a/src/gromacs/applied_forces/awh/biasstate.cpp b/src/gromacs/applied_forces/awh/biasstate.cpp index 3a43f29db1..7c8b1d0e2b 100644 --- a/src/gromacs/applied_forces/awh/biasstate.cpp +++ b/src/gromacs/applied_forces/awh/biasstate.cpp @@ -124,7 +124,7 @@ void sumPmf(gmx::ArrayRef pointState, int numSharedUpdate, const Bia buffer[i] = pointState[i].inTargetRegion() ? std::exp(pointState[i].logPmfSum()) : 0; } - biasSharing->sum(gmx::ArrayRef(buffer), biasIndex); + biasSharing->sumOverSharingSimulations(gmx::ArrayRef(buffer), biasIndex); /* Take log again to get (non-normalized) PMF */ double normFac = 1.0 / numSharedUpdate; @@ -671,7 +671,7 @@ void mergeSharedUpdateLists(std::vector* updateList, } /* Sum over the sims to get all the flagged points */ - biasSharing.sum(arrayRefFromArray(numUpdatesOfPoint.data(), numPoints), biasIndex); + biasSharing.sumOverSharingSimulations(arrayRefFromArray(numUpdatesOfPoint.data(), numPoints), biasIndex); /* Collect the indices of the flagged points in place. The resulting array will be the merged update list.*/ updateList->clear(); @@ -790,8 +790,8 @@ void sumHistograms(gmx::ArrayRef pointState, coordVisits[localIndex] = ps.numVisitsIteration(); } - biasSharing->sum(gmx::ArrayRef(weightSum), biasIndex); - biasSharing->sum(gmx::ArrayRef(coordVisits), biasIndex); + biasSharing->sumOverSharingSimulations(gmx::ArrayRef(weightSum), biasIndex); + biasSharing->sumOverSharingSimulations(gmx::ArrayRef(coordVisits), biasIndex); /* Transfer back the result */ for (size_t localIndex = 0; localIndex < localUpdateList.size(); localIndex++) @@ -1025,8 +1025,9 @@ bool BiasState::isSamplingRegionCovered(const BiasParams& params, /* For multiple dimensions this may not be the best way to do it. */ for (int d = 0; d < grid.numDimensions(); d++) { - biasSharing_->sum(gmx::arrayRefFromArray(checkDim[d].covered.data(), grid.axis(d).numPoints()), - params.biasIndex); + biasSharing_->sumOverSharingSimulations( + gmx::arrayRefFromArray(checkDim[d].covered.data(), grid.axis(d).numPoints()), + params.biasIndex); } }