From 7b64253516e5e7ee47f27c08e4462d4a4d730502 Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 26 Sep 2014 21:28:48 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@12567 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/fix_nh.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index b254636111..a78a109396 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -835,9 +835,17 @@ void FixNH::final_integrate() { nve_v(); + // re-compute temp before nh_v_press() + // only needed for temperature computes with BIAS: + // b/c some biases store per-atom values (e.g. temp/profile) + // per-atom values are invalid if reneigh/comm occurred + // since temp->compute() in initial_integrate() + + if (which == BIAS) t_current = temperature->compute_scalar(); + if (pstat_flag) nh_v_press(); - // compute new T,P + // compute new T,P after velocities rescaled by nh_v_press() // compute appropriately coupled elements of mvv_current t_current = temperature->compute_scalar();