Dear LAMMPS user:
I am planning use “fix store/force” to store the group force for “fix print” & “dump” output before modification by “fix setforce” . I wrote these inputs in sequence as below. However, the output is after the “setforce”, not the ones that shall be stored. Please help to advise:
Inputs:
Data output
fix store_f slider_rig store/force
thermo 100
thermo_style custom step temp ke evdwl emol epair pe pzz
fix f_prt all print 100 “………………….”
dump outdata1 all custom 10000 equil.lammpstrj id type mol x y z vx vy vz fx fy fz mol
dump_modify outdata1 format "%4d %d %d %8.4f %8.4f %8.4f %10.4e %10.4e %10.4e %10.4f %10.4f %10.4f %6d "
constrain to top-slider
fix setf_top slider_rig setforce 0.0 NULL NULL
Thanks & Best Regards!
Dai Ling
Scientist
Institue of High Performance Computing, A*STAR
Singapore
Tel: +65-64191428
the output is after the “setforce”
What output? Your dump command is outputting fx,fy,fz
which are not the forces that fix store/force is storing.
Fx,fy,fz are the final force on each atom.
Steve
HI, Steve:
I shall clarify more: There two types of outputs being set, one is the variable (fcm()) output via "fix print", the other is the "dump". My results showed both outputs gave the final force value, not the ones before "fix setforce". Thus, would you suggest how to output the values that stored by " fix store/force", both in fcm() & dump?
variable fxsldrig equal fcm(slider_rig,x)
variable fzsldrig equal fcm(slider_rig,z)
.........
fix store_f slider_rig store/force
..............
fix f_prt all print 100 "\{fxsldrig\} {fzsldrig}"
.........
dump outdata1 all custom 10000 equil.lammpstrj id type mol x y z vx vy vz fx fy fz mol
........
fix setf_top slider_rig setforce 0.0 NULL NULL
I already answered this. If you dump fx,fx,fz you will
get the final force on the atoms. You have to dump the
values stored by fix store/force if you want those values.
See the doc page for fix store/force as to how it stores
its value and see Section 6.15 for an overview of
how fixes and computes store values and how you
can access them.
Steve