Hello everybody.
I am trying to perform some modification with the simulation box and atoms corrdinates and I get error
ERROR: Variable maxXvalue: Compute used in variable between runs is not current (src/src/variable.cpp:1375)
Last command: displace_atoms atoms move v_shiftX ${shiftY} ${shiftZ} units box
In the beginning when I was using $
instead of v_
(for example ${maxXvalue}
instead of v_maxXvalue
) it also was creating the same issue.
What is the reason? The script is below.
region atoms block ${xl} ${xh} ${yl} ${yh} ${zl} ${zh}
group atoms region atoms
compute myXcoord atoms property/atom x
compute minX atoms reduce min c_myXcoord
compute maxX atoms reduce max c_myXcoord
variable minXvalue equal c_minX
variable maxXvalue equal c_maxX
variable lengthX equal v_maxXvalue-v_minXvalue
variable boxXhi equal v_lengthX*2
variable shiftX equal v_boxXhi*0.4-v_minXvalue
variable shiftY equal 0
variable shiftZ equal 0
displace_atoms atoms move v_shiftX ${shiftY} ${shiftZ} units box
change_box all x final 0 ${boxXhi} remap no
change_box all y final 0 ${yh} remap no
change_box all z final 0 ${zh} remap no