Skip to content

Commit

Permalink
Use 64bit integers to store prev timestep
Browse files Browse the repository at this point in the history
Should fix #639
  • Loading branch information
jhenin committed Dec 5, 2023
1 parent 7934bb6 commit 4bef804
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 11 deletions.
1 change: 0 additions & 1 deletion gromacs/gromacs-2020.x/colvarproxy_gromacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,6 @@ void colvarproxy_gromacs::update_data(const t_commrec *cr, int64_t const step, t
if (first_timestep) {
first_timestep = false;
} else {
// Use the time step number inherited from GROMACS
if ( step - previous_gmx_step == 1 )
colvars->it++;
// Other cases?
Expand Down
2 changes: 1 addition & 1 deletion gromacs/gromacs-2020.x/colvarproxy_gromacs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class colvarproxy_gromacs : public colvarproxy, public gmx::IForceProvider {
bool colvars_restart;
std::string config_file;
size_t restart_frequency_s;
int previous_gmx_step;
int64_t previous_gmx_step;
double bias_energy;

bool gmx_bNS; // Is this a neighbor-search step? Eventually will become unnecessary
Expand Down
1 change: 0 additions & 1 deletion gromacs/gromacs-2021.x/colvarproxy_gromacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ void colvarproxy_gromacs::update_data(const t_commrec *cr, int64_t const step, t
if (first_timestep) {
first_timestep = false;
} else {
// Use the time step number inherited from GROMACS
if ( step - previous_gmx_step == 1 )
colvars->it++;
// Other cases?
Expand Down
2 changes: 1 addition & 1 deletion gromacs/gromacs-2021.x/colvarproxy_gromacs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class colvarproxy_gromacs : public colvarproxy, public gmx::IForceProvider {
bool colvars_restart;
std::string config_file;
size_t restart_frequency_s;
int previous_gmx_step;
int64_t previous_gmx_step;
double bias_energy;

bool gmx_bNS; // Is this a neighbor-search step? Eventually will become unnecessary
Expand Down
1 change: 0 additions & 1 deletion gromacs/gromacs-2022.x/colvarproxy_gromacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ void colvarproxy_gromacs::update_data(const t_commrec *cr, int64_t const step, t
if (first_timestep) {
first_timestep = false;
} else {
// Use the time step number inherited from GROMACS
if ( step - previous_gmx_step == 1 )
colvars->it++;
// Other cases?
Expand Down
2 changes: 1 addition & 1 deletion gromacs/gromacs-2022.x/colvarproxy_gromacs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class colvarproxy_gromacs : public colvarproxy, public gmx::IForceProvider {
bool colvars_restart;
std::string config_file;
size_t restart_frequency_s;
int previous_gmx_step;
int64_t previous_gmx_step;
double bias_energy;

bool gmx_bNS; // Is this a neighbor-search step? Eventually will become unnecessary
Expand Down
1 change: 0 additions & 1 deletion gromacs/gromacs-2023.x/colvarproxy_gromacs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@ void colvarproxy_gromacs::update_data(const t_commrec *cr, int64_t const step, t
if (first_timestep) {
first_timestep = false;
} else {
// Use the time step number inherited from GROMACS
if ( step - previous_gmx_step == 1 )
colvars->it++;
// Other cases?
Expand Down
2 changes: 1 addition & 1 deletion gromacs/gromacs-2023.x/colvarproxy_gromacs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class colvarproxy_gromacs : public colvarproxy, public gmx::IForceProvider {
bool colvars_restart;
std::string config_file;
size_t restart_frequency_s;
int previous_gmx_step;
int64_t previous_gmx_step;
double bias_energy;

bool gmx_bNS; // Is this a neighbor-search step? Eventually will become unnecessary
Expand Down
2 changes: 1 addition & 1 deletion lammps/src/COLVARS/colvarproxy_lammps.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class colvarproxy_lammps : public colvarproxy {

// state of LAMMPS properties
double bias_energy;
int previous_step;
cvm::step_number previous_step;

bool first_timestep;
bool do_exit;
Expand Down
2 changes: 1 addition & 1 deletion namd/src/colvarproxy_namd.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class colvarproxy_namd : public colvarproxy, public GlobalMaster {
Random random;

bool first_timestep;
size_t previous_NAMD_step;
cvm::step_number previous_NAMD_step;

/// Used to submit restraint energy as MISC
SubmitReduction *reduction;
Expand Down
2 changes: 1 addition & 1 deletion src/colvarproxy_tcl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ int colvarproxy_tcl::tcl_run_file(std::string const &fileName)
Tcl_Interp *const interp = get_tcl_interp();
int err = Tcl_EvalFile(interp, fileName.c_str());
if (err != TCL_OK) {
cvm::log("Error while executing Tcl script file" + fileName + ":\n");
cvm::log("Error while executing Tcl script file \"" + fileName + "\":\n");
cvm::error(Tcl_GetStringResult(interp));
return COLVARS_ERROR;
}
Expand Down

0 comments on commit 4bef804

Please sign in to comment.