From 75fefd8e37f4563c0d16efe64bc231dbdb1c2241 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Tue, 18 Dec 2007 16:42:57 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@1264 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_langevin.cpp | 11 +++++++++++ src/fix_langevin.h | 1 + 2 files changed, 12 insertions(+) diff --git a/src/fix_langevin.cpp b/src/fix_langevin.cpp index 7fb556639e..48f7a3c9ea 100644 --- a/src/fix_langevin.cpp +++ b/src/fix_langevin.cpp @@ -197,3 +197,14 @@ void FixLangevin::reset_target(double t_new) { t_start = t_stop = t_new; } + +/* ---------------------------------------------------------------------- */ + +void FixLangevin::reset_dt() +{ + for (int i = 1; i <= atom->ntypes; i++) { + gfactor2[i] = sqrt(atom->mass[i]) * + sqrt(24.0*force->boltz/t_period/update->dt/force->mvv2e) / force->ftm2v; + gfactor2[i] *= 1.0/sqrt(ratio[i]); + } +} diff --git a/src/fix_langevin.h b/src/fix_langevin.h index 9b614e8823..8a8a89aeb8 100644 --- a/src/fix_langevin.h +++ b/src/fix_langevin.h @@ -28,6 +28,7 @@ class FixLangevin : public Fix { void post_force(int); void post_force_respa(int, int, int); void reset_target(double); + void reset_dt(); private: double t_start,t_stop,t_period;