[lammps-users] question on usage of variable loop and fix uniaxial

I have e-mailed another problem of this run earlier, actually. Again, briefly I deform my box size then relax (minimize) and finally apply npt dynamics. I want to do these three things repedeatly within one input file. Something like

do i =1,6
fix uniaxial
fix npt

I realize I can use the variable loop command but i am not sure if I undertand it right.

variable a loop 6
label loop
fix uniaxial …
minimize …
fix npt …
next a

does this correspond to the above statement? I don’t really have a variable like “a”. I do not use any partition. I think of a as just any string that declares where the loop begins, is this right? And 6 indicades how many times it needs to go over this loop?

Also, I dump some variables between these steps so when it goes throu this loop, it has dump files whose names need to be changed in order not to overwrite.

My other question about fix uniaxial is:
If I want to introduce a deformation in x in total of 2% in two steps (1% increments ever 1ps), which of the following would be correct?

fix all uniaxial 10000 x 1.0009995
timestep 0.1
run 20000

where 1.0009995 is the sqrt(1.002).


fix all uniaxial 10000 x 1.001

What I am wondering really if the last variable in fix command always the multiplication factor of the initial box dimension no matter how many steps we apply uniaxial as in the example of rescaling, the variable takes a ramped value or if it the box size is updatep every 10000 steps (1ps in my case).

I hope I did not write very confusing.

Thanks a lot,

Note: I am having diffucult connecting to LAMMPS website for the past two days. Is there something going on with the www site?

Re: looping. You also need a jump command to do the loop.
The variable command has nothing to do with defining the loop
itself. You should look at the Section_howto.html of the manual
which has several examples of how to write loops.

Re: fix uniaxial - beyond the doc page (or looking at the code),
you could email the author (listed in those files) ... he can
probably answer detailed questions.