[lammps-users] box/relax command

Dear all,

I am doing uniaxial compression test on a cubic metal sample at 0K.
To simulate the compression behavior, i specify desired pressure in x direction and zero pressure in the y and z directions by using the following box/relax commands.

fix 1 all box/relax x 10000 nreset 10
fix 2 all box/relax y 0 nreset 10
fix 3 all box/relax z 0 nreset 10

I got the desired pressures in all the directions at the end of the minimization. I want to make sure whether i am correctly using the fix commands to simulate compression behavior. Is it possible to specify different pressure values in the three directions in a single fix command

Thanks in advance

You can do all 3 settings in one command - see the doc page, it
says “one or more”. You can use different pressure values,
though that can make it harder for the minimizer to be successful.
Again see the doc page.