From c4771291650e032e4b67681a99416ebfc2913c1c Mon Sep 17 00:00:00 2001 From: "Steven J. Plimpton" <sjplimp@singsing.sandia.gov> Date: Fri, 24 Aug 2018 16:17:07 -0600 Subject: [PATCH] real <-> metal unit conversion factors --- src/MESSAGE/fix_client_md.cpp | 7 +++---- src/MESSAGE/server_md.cpp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/MESSAGE/fix_client_md.cpp b/src/MESSAGE/fix_client_md.cpp index b85c7f8f76..97d0436a27 100644 --- a/src/MESSAGE/fix_client_md.cpp +++ b/src/MESSAGE/fix_client_md.cpp @@ -64,13 +64,12 @@ FixClientMD::FixClientMD(LAMMPS *lmp, int narg, char **arg) : // unit conversion factors for REAL // otherwise not needed + // message received in METAL units, convert to local REAL units fconvert = econvert = vconvert = 1.0; if (units == REAL) { - // NOTE: still need to set these - fconvert = 1.0; - econvert = 1.0; - vconvert = 1.0; + fconvert = econvert = 23.06035; + vconvert = 0.986923; } } diff --git a/src/MESSAGE/server_md.cpp b/src/MESSAGE/server_md.cpp index acdc06a0e9..340431021b 100644 --- a/src/MESSAGE/server_md.cpp +++ b/src/MESSAGE/server_md.cpp @@ -55,13 +55,12 @@ ServerMD::ServerMD(LAMMPS *lmp) : Pointers(lmp) // unit conversion factors for REAL // otherwise not needed + // local computation in REAL units, send message in METAL units fconvert = econvert = vconvert = 1.0; if (units == REAL) { - // NOTE: still need to set these - fconvert = 1.0; - econvert = 1.0; - vconvert = 1.0; + fconvert = econvert = 1.0 / 23.06035; + vconvert = 1.0 / 0.986923; } fcopy = NULL; -- GitLab