LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] How to access the group averaged position at a certain step?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] How to access the group averaged position at a certain step?


From: "Peter Chu" <bdzhu@...5255...>
Date: Fri, 13 Apr 2018 22:35:00 +0800

Hi All,

       I want to calculate the averaged position of atoms in a group at certain step, and then store them for input of later commands. I try fix ave/atom and reduce them after runs, like:

 

group     He1 id    57086    57087

fix ave He1 ave/atom 1      1    5     x     y     z

run         5

compute 1     He1 reduce   ave f_ave[1]  f_ave[2]  f_ave[3]

variable  xm  equal     c_1[1]

print "The xm is now ${xm}"

 

I got the follow error message:

ERROR: Compute used in variable between runs is not current

 

How to do this right?

-----------------------------------------------------------------

Best Regards,

Bida Zhu

Huazhong University of Science and Technology

Department of Mechanics

China

bdzhu@...5255...