Merge pull request #36 from akohlmey/small_bugfixes_and_cleanups

Small bugfixes and cleanups
This commit is contained in:
sjplimp
2016-09-16 13:19:39 -06:00
committed by GitHub
4 changed files with 17 additions and 8 deletions

View File

@ -137,6 +137,9 @@ int colvarmodule::parse_config(std::string &conf)
cvm::log("Collective variables module (re)initialized.\n"); cvm::log("Collective variables module (re)initialized.\n");
cvm::log(cvm::line_marker); cvm::log(cvm::line_marker);
// update any necessary proxy data
proxy->setup();
if (cv_traj_os.is_open()) { if (cv_traj_os.is_open()) {
// configuration might have changed, better redo the labels // configuration might have changed, better redo the labels
write_traj_label(cv_traj_os); write_traj_label(cv_traj_os);

View File

@ -4,7 +4,7 @@
#define COLVARMODULE_H #define COLVARMODULE_H
#ifndef COLVARS_VERSION #ifndef COLVARS_VERSION
#define COLVARS_VERSION "2016-09-03" #define COLVARS_VERSION "2016-09-14"
#endif #endif
#ifndef COLVARS_DEBUG #ifndef COLVARS_DEBUG

View File

@ -35,12 +35,13 @@ using namespace LAMMPS_NS;
#define MAXLINE 1024 #define MAXLINE 1024
enum{FCC,BCC,HCP,DIM,DIAMOND,B1,C11,L12,B2}; enum{FCC,BCC,HCP,DIM,DIAMOND,B1,C11,L12,B2};
int nkeywords = 21; static const int nkeywords = 21;
const char *keywords[] = {"Ec","alpha","rho0","delta","lattce", static const char *keywords[] = {
"attrac","repuls","nn2","Cmin","Cmax","rc","delr", "Ec","alpha","rho0","delta","lattce",
"augt1","gsmooth_factor","re","ialloy", "attrac","repuls","nn2","Cmin","Cmax","rc","delr",
"mixture_ref_t","erose_form","zbl", "augt1","gsmooth_factor","re","ialloy",
"emb_lin_neg","bkgd_dyn"}; "mixture_ref_t","erose_form","zbl",
"emb_lin_neg","bkgd_dyn"};
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */

View File

@ -49,7 +49,12 @@ double FixTempCSVR::gamdev(const int ia)
x=1.0; x=1.0;
for (j=1; j<=ia; j++) for (j=1; j<=ia; j++)
x *= random->uniform(); x *= random->uniform();
x = -log(x);
// make certain, that -log() doesn't overflow.
if (x < 2.2250759805e-308)
x = 708.4;
else
x = -log(x);
} else { } else {
restart: restart:
do { do {