git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@13397 f3b2605a-c512-4ea7-a41b-209d697bcdaa

This commit is contained in:
sjplimp 2015-04-06 15:15:02 +00:00
parent 974e1eb022
commit de291fcc38
2 changed files with 11 additions and 6 deletions

View File

@ -125,6 +125,10 @@ void colvarproxy_lammps::init(const char *conf_file)
cvm::log("Using LAMMPS interface, version "+
cvm::to_str(COLVARPROXY_VERSION)+".\n");
my_angstrom = _lmp->force->angstrom;
my_boltzmann = _lmp->force->boltz;
my_timestep = _lmp->update->dt * _lmp->force->femtosecond;
// TODO move one or more of these to setup() if needed
colvars->read_config_file(conf_file);
colvars->setup_input();
@ -158,6 +162,7 @@ colvarproxy_lammps::~colvarproxy_lammps()
// re-initialize data where needed
void colvarproxy_lammps::setup()
{
my_timestep = _lmp->update->dt * _lmp->force->femtosecond;
colvars->setup();
}

View File

@ -15,7 +15,7 @@
#include <iostream>
#ifndef COLVARPROXY_VERSION
#define COLVARPROXY_VERSION "2015-02-25"
#define COLVARPROXY_VERSION "2015-04-01"
#endif
/* struct for packed data communication of coordinates and forces. */
@ -43,7 +43,7 @@ class colvarproxy_lammps : public colvarproxy {
class LAMMPS_NS::RanPark *_random;
// state of LAMMPS properties
double t_target;
double t_target, my_timestep, my_boltzmann, my_angstrom;
double bias_energy;
int restart_every;
int previous_step;
@ -100,10 +100,10 @@ class colvarproxy_lammps : public colvarproxy {
// implementation of pure methods from base class
public:
inline cvm::real unit_angstrom() { return _lmp->force->angstrom; };
cvm::real boltzmann() { return _lmp->force->boltz; };
cvm::real temperature() { return t_target; };
cvm::real dt() { return _lmp->update->dt * _lmp->force->femtosecond; };
inline cvm::real unit_angstrom() { return my_angstrom; };
inline cvm::real boltzmann() { return my_boltzmann; };
inline cvm::real temperature() { return t_target; };
inline cvm::real dt() { return my_timestep; }; // return _lmp->update->dt * _lmp->force->femtosecond; };
inline size_t restart_frequency() { return restart_every; };