[lammps-users] fix_deform

Hi. I am trying to use fix_deform to strain a system at constant volume, as was done by the old fix_uniaxial. The key part of my script is

pair_style lj/cut 2.5
pair_modify shift yes
pair_coeff 1 1 1.0 1.0 2.5
fix 1 all nve
fix 2 all langevin 1 1 1 1299709
fix 3 all deform 1 x erate .001 y volume z volume
thermo_style custom step temp epair ebond pxx pyy pzz lx ly lz
timestep .01
thermo 100
restart 10000 extend.res
run 50

Then, when I run LAMMPS, I get the following error.

LAMMPS (22 Jun 2007)
Reading restart file ...
   orthogonal box = (-11.3768 -11.3768 -11.3768) to (11.3768 11.3768 11.3768)
   1 by 1 by 1 processor grid
   10013 atoms
   478686 bonds
Finding 1-2 1-3 1-4 neighbors ...
   969 = max # of 1-2 neighbors
   969 = max # of special neighbors
Setting up run ...
Memory usage per processor = 255.132 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
        0 1.0062064 -2.66439 -2.4201556 -3.5753867 -0.30668561 11780.137
ERROR: Cannot use neighbor bins - box size << cutoff

This is confusing, since the box size (~22.75) is much larger than the cutoff (2.5). The small strain I am trying to apply to the system, .0005, does not change this. I also tried replacing the ".001" in fix_deform with "0", so the fix should not do anything, but got the same error. However, when I commented out the fix deform command, the simulation ran fine.



Rob, Vikas,

It looks like that the fix deform module multiplies the box size by a far to
small a number. What is the output when you use 'thermo 1' instead of
'thermo 100'? Does it crash even before the output of step 1 or after?


Hi, Pieter. It seems

fix 3 all deform 1 x erate .001 y volume z volume

is trying to compress the y and z directions down to nothing (i. e. zero volume). Here is my log file when I use thermo 1 - the last three numbers on each line are the cell side lengths lx, ly, lz

Step Temp E_pair E_bond Pxx Pyy Pzz Lx Ly Lz
        0 1.0062064 -2.66439 -2.4182979 -0.41309929 -0.16261933 -0.3236876 22.7536 22.7536 22.7536
        1 0.99392579 -2.6553842 -2.4167146 -8.9253769e+264 -2.948905e+264 -8.4775001e+264 22.753828 4.5485921e-132 4.5488403e-132

Curiously it behaves similarly when I set erate to zero, ly and lz still become tiny. Note that the second to last three columns -8.9253769e+264 -2.948905e+264 -8.4775001e+264 are the pressures px py pz which blow up like the inverse volume, yet the pair and bond energies don't blow up like they would if the system were really being compressed that much.


Quoting "Pieter J. in 't Veld" <[email protected]>:


It seems to me that the scaling is done incorrectly within the fix_deform
module: a trajectory is set up at the beginning of the run to project where
each component of the shape matrix or box length is supposed to end. I have
the suspicion that this projection has "issues". Let me see if I can figure
it out.