Skip to content
Snippets Groups Projects
Commit d55f7a91 authored by Gareth Tribello's avatar Gareth Tribello
Browse files

Fixed bugs in converting histograms to free energies

parent 0a482834
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@ Action(ao),
stride(1)
{
parse("STRIDE",stride);
log.printf(" with stride %d\n",stride);
if( !keywords.style("STRIDE","hidden") ) log.printf(" with stride %d\n",stride);
}
bool ActionPilot::onStep()const{
......
......@@ -80,10 +80,8 @@ mygrid(NULL)
}
void ActionWithInputGrid::setAnalysisStride( const bool& use_all, const unsigned& astride ){
single_run=use_all;
if( !single_run ){
setStride( astride ); mves->setAnalysisStride( false, getStride() );
}
single_run=use_all; mves->setAnalysisStride( use_all, astride );
if( !single_run ) setStride( astride );
}
void ActionWithInputGrid::update(){
......
......@@ -73,7 +73,9 @@ ActionWithInputGrid(ao)
Keywords keys; GridFunction::registerKeywords( keys );
vesselbase::VesselOptions dar( da, keys );
outgrid = new GridFunction(dar); addVessel( outgrid );
if( mygrid->noDerivatives() ) outgrid->setNoDerivatives();
if( mygrid->noDerivatives() ) outgrid->setNoDerivatives();
std::vector<double> fspacing;
outgrid->setBounds( mygrid->getMin(), mygrid->getMax(), mygrid->getNbin(), fspacing);
resizeFunctions();
simtemp=0.; parse("TEMP",simtemp);
......@@ -96,7 +98,7 @@ unsigned ConvertToFES::getNumberOfQuantities() const {
void ConvertToFES::performOperationsWithGrid( const bool& from_update ){
std::vector<double> fspacing;
outgrid->setBounds( mygrid->getMin(), mygrid->getMax(), mygrid->getNbin(), fspacing);
outgrid->setBounds( mygrid->getMin(), mygrid->getMax(), mygrid->getNbin(), fspacing);
outgrid->clear(); outgrid->setNorm( mygrid->getNorm() ); runAllTasks();
}
......
......@@ -46,7 +46,7 @@ GridVessel(da)
void GridFunction::calculate( const unsigned& current, MultiValue& myvals, std::vector<double>& buffer, std::vector<unsigned>& der_list ) const {
plumed_dbg_assert( myvals.getNumberOfValues()==(nper+1) );
for(unsigned i=0;i<myvals.getNumberOfValues();++i) buffer[bufstart + nper*current + i] += myvals.get(i+1);
for(unsigned i=0;i<nper;++i) buffer[bufstart + nper*current + i] += myvals.get(i+1);
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment