Skip to content

Commit

Permalink
Do not assume a specific energy unit
Browse files Browse the repository at this point in the history
  • Loading branch information
jhenin committed Mar 13, 2017
1 parent 37f5f64 commit 376e173
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion doc/cv_version.tex
@@ -1 +1 @@
\newcommand{\cvversion}{2017-03-10}
\newcommand{\cvversion}{2017-03-13}
6 changes: 3 additions & 3 deletions src/colvar.cpp
Expand Up @@ -394,15 +394,15 @@ int colvar::init_extended_Lagrangian(std::string const &conf)
return INPUT_ERROR;
}
ext_force_k = cvm::boltzmann() * temp / (tolerance * tolerance);
cvm::log("Computed extended system force constant: " + cvm::to_str(ext_force_k) + " kcal/mol/U^2");
cvm::log("Computed extended system force constant: " + cvm::to_str(ext_force_k) + " [E]/U^2");

get_keyval(conf, "extendedTimeConstant", period, 200.0);
if (period <= 0.0) {
cvm::error("Error: \"extendedTimeConstant\" must be positive.\n", INPUT_ERROR);
}
ext_mass = (cvm::boltzmann() * temp * period * period)
/ (4.0 * PI * PI * tolerance * tolerance);
cvm::log("Computed fictitious mass: " + cvm::to_str(ext_mass) + " kcal/mol/(U/fs)^2 (U: colvar unit)");
cvm::log("Computed fictitious mass: " + cvm::to_str(ext_mass) + " [E]/(U/fs)^2 (U: colvar unit)");

{
bool b_output_energy;
Expand All @@ -419,7 +419,7 @@ int colvar::init_extended_Lagrangian(std::string const &conf)
}
if (ext_gamma != 0.0) {
enable(f_cv_Langevin);
ext_gamma *= 1.0e-3; // convert from ps-1 to fs-1
ext_gamma *= 1.0e-3; // correct as long as input is required in ps-1 and cvm::dt() is in fs
ext_sigma = std::sqrt(2.0 * cvm::boltzmann() * temp * ext_gamma * ext_mass / cvm::dt());
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/colvarmodule.h
Expand Up @@ -4,7 +4,7 @@
#define COLVARMODULE_H

#ifndef COLVARS_VERSION
#define COLVARS_VERSION "2017-03-10"
#define COLVARS_VERSION "2017-03-13"
#endif

#ifndef COLVARS_DEBUG
Expand Down

0 comments on commit 376e173

Please sign in to comment.