peteboyd / lammps_interface

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

Unit cell being expanded when not needed? #57

Open greigcs opened 1 year ago

greigcs commented 1 year ago

Hello,

I may be wrong here, but I think there may be an issue with Lammps interface expanding unit cells to reach a desired cutoff when it is not needed.

My example is using a 2x2x2 supercell of ZIF-8, which has the following unit cell parameters after expansion:

_cell_length_a 29.472600 _cell_length_b 29.560200 _cell_length_c 29.528000 _cell_angle_alpha 109.610200 _cell_angle_beta 109.469200 _cell_angle_gamma 109.356400

I have calculated the perpendicular lengths to be:

ab_perpendicular_length=27.8893 ba_perpendicular_length=27.8067 ac_perpendicular_length=27.8396 ca_perpendicular_length=27.7874 bc_perpendicular_length=27.8153 cb_perpendicular_length=27.8456

From the above, I believe my desired cutoff of 12.8 Angstrom should work without the need for further expansion. However, Lammps Interface subjects it to a further 2x2x2 expansion (= 4x4x4 overall). The message is:

WARNING: unit cell is not large enough to support a non-bonded cutoff of 12.10 Angstroms. Re-sizing to a 2 x 2 x 2 supercell. Prog. = 1/8; cell = 0x0x0 Prog. = 2/8; cell = 0x0x1 Prog. = 3/8; cell = 0x1x0 Prog. = 4/8; cell = 0x1x1 Prog. = 5/8; cell = 1x0x0 Prog. = 6/8; cell = 1x0x1 Prog. = 7/8; cell = 1x1x0 Prog. = 8/8; cell = 1x1x1

As I said, I may have missed something, so please let me know if there is something wrong with my calculations.