Skip to content
Snippets Groups Projects
Commit 39dcda46 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Fixed plumed_cmd("getBias")

Two bugs where there:
1. It was only working with double precision MD codes
2. It was returning energy in PLUMED units and not in MD ones

Both are fixed now
parent ae29225f
No related branches found
No related tags found
No related merge requests found
......@@ -113,6 +113,8 @@ For users:
- Several small fixes in documentation and log file.
For developers:
- Fixed cmd("getBias") to retrieve bias. It was not working with
single precision codes and it was not converting units properly.
- Fixed a regression in 2.0.2 concerning include files from installed plumed
(see commit 562d5ea9dfc3).
- Small fix in tools/Random.cpp that allows Random objects to be
......
......@@ -310,7 +310,8 @@ void PlumedMain::cmd(const std::string & word,void*val){
} else if(word=="getBias"){
CHECK_INIT(initialized,word);
CHECK_NULL(val,word);
*(static_cast<double*>(val))=getBias();
double x=getBias()/(atoms.getMDUnits().getEnergy()/atoms.getUnits().getEnergy());
atoms.double2MD(x,val);
} else {
// multi word commands
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment