peteboyd / lammps_interface

automatic generation of LAMMPS input files for molecular dynamics simulations of MOFs
MIT License
125 stars 63 forks source link

keeping box fixed #43

Closed SimonEnsemble closed 3 years ago

SimonEnsemble commented 3 years ago

awesome tool!

how can we modify the resulting in.mof_name LAMMPS input file to keep the box fixed during the structural relaxation? we tried deleting the lines associated with relax/box, but the box still changed!

thanks!

peteboyd commented 3 years ago

Hi @SimonEnsemble ,

If I type the command lammps-interface -ff UFF --minimize [structure].cif and I comment out the following lines in the input file

min_style       cg
fix             1 all box/relax aniso 0.0 vmax 0.01
minimize        1.0e-15 1.0e-15 10000 100000
unfix           1

The box will not change during a relaxation. You can see how the box changes if you add a few commands to the print statement

print           "${iter},${CellMinStep},${AtomMinStep},${AtomMinStep},$(pe),${min_E},$(vol),$(lx),$(ly),$(lz),$(xy),$(xz),$(yz)" append [structure].min.csv screen no

The variables $(vol),$(lx),$(ly),$(lz),$(xy),$(xz),$(yz) access the lattice parameters from LAMMPS.

If you still see the box changing, then I think there may be something wrong with your LAMMPS version - you may have to contact the LAMMPS developers via their mailing list https://sourceforge.net/p/lammps/mailman/lammps-users/.

ngantzler commented 3 years ago

@peteboyd thank you for the help! This solution has fixed the issue we were having.