[lammps-users] Anisotropic NPT simulation

I am trying to do an anisotropic NPT simulation.

I am wanting the simulation box dimensions to only change in the z direction, keeping the x & y fixed.

Could someone give me an example of a fix npt statement which would do this. I don't really follow what it says in the documentation, and what I have tried so far doesn't keep the x&y dimensions fixed.

Thanks,
Michael.

Michael:

The examples in the manual should work if you replace the “tri” or “iso” keywords with “z”:

fix ID npt temp Tinit Tfinal Tdamp z Pinit Pfinal Pdamp

However, this will only work if your version is up-to-date (more recent than March or so). If you are using an older version, you will need to specify pressures in each dimension, using NULL for values that you don’t want to change during the course of the simulation. (It should look something like

fix ID npt Tinit Tfinal Tdamp aniso NULL NULL NULL NULL Pzinit Pzfinal Pdamp

but you will have to check in the user’s manual for your version—included in the download—for the exact format.)

–AEI

That is what I have tried to do but it does not work properly.

I run my simulation in 2 steps. First I do an isotropic NPT using:
fix 1 mobile npt 298.15 298.15 1000.0 xyz 0.0 10.0 200.0
run 20000

I then do an anisotropic NPT simulation using:
unfix 1
fix 2 mobile npt 298.15 298.15 1000.0 aniso null null null null 10.0 1.0 200.0
run 40000

to try to get the simulation cell volumes to only change in the z direction.

However, all three dimension vary when I do the second fix, not just the z direction.

I am just testing the system at the moment and will adjusting my runtimes and damping parameters when I can get the system expanding/contracting only in the z direction. I also realise my system hasn’t equilbrated after the 20000 steps, but I am just trying to test the setup at the moment before conducting longer runs.

From the runs I have done, the x& y do vary but do seem to be converging. Is this behaviour correct, or should the dimensions of x&y be rigidly fixed after the second fix statement. I am looking to have a system where my x&y are rigidly fixed as I will be looking at simulations with surfaces soon, so do not want any distortion or rescaling of my surface to occur during the MD simulation.

I’ve linked a couple of plots of the xyz dimensions of my simulation cell.

Thanks, Michael On 25/05/10 10:49, Ahmed E. Ismail wrote:

You may want to consider updating the most recent version of the code. The capabilities and controls for the thermostats and barostats have been significantly upgraded, and this may help to avoid the problem you’ve described.

–AEI

That is what I have tried to do but it does not work properly.

I run my simulation in 2 steps. First I do an isotropic NPT using:
fix 1 mobile npt 298.15 298.15 1000.0 xyz 0.0 10.0 200.0
run 20000

I then do an anisotropic NPT simulation using:
unfix 1
fix 2 mobile npt 298.15 298.15 1000.0 aniso null null null null 10.0
1.0 200.0

please note: null != NULL

null is probably being interpreted as 0.

cheers,
    axel.