The cut-off length is longer than half the shortest box vector or longer than the smallest box dia

Hello, I am attempting to replicate a study involving the construction of a cyclohexane-water interface using Packmol and GROMACS. The paper describes the insertion of 1784 cyclohexane molecules into a cubic simulation box measuring 6.86×6.86×6.86 nm³. I obtained the cyclohexane structure files (.pdb and .itp) from ATB and used Packmol to create a simulation box containing 1784 cyclohexane molecules with dimensions matching those specified in the paper. However, during the energy minimization step in GROMACS, I encountered an error indicating that
" The cut-off length is longer than half the shortest box vector or
longer than the smallest box diagonal element. Increase the box size or
decrease rlist."
How should I proceed to resolve this issue?

What cut-off did you specify? It must be (too) long considering the box size is 6.86 nm.

Dear @hess , Thank you for your reply. I am giving my minim.mdp file:

; minim.mdp - used as input into grompp to generate em.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 1000.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 500 ; Maximum number of (minimization) steps to perform

; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 1 ; Frequency to update the neighbor list and long range forces
cutoff-scheme = Verlet ; Buffered neighbor searching
ns_type = grid ; Method to determine neighbor list (simple, grid)
coulombtype = cutoff ; Treatment of long range electrostatic interactions
rcoulomb = 1.2 ; Short-range electrostatic cut-off
rvdw = 1.2 ; Short-range Van der Waals cut-off
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions
rlist = 1.2

I have mentioned vdw cut off as 1.2 and short range electrostatic cut off as 1.2. I have tried to decrease the cut off values. still showing the same error

Are you sure your box is 6.86 nm and not, for instance, 6.86 Ångström?

Yes. Since 1nm= 10 A0, I have given box size = 68.6 x 68.6 x 68.6. This is my packmol input:

cyclohexane

tolerance 2.0
filetype pdb
output 8VH4_box.pdb

structure 8VH4.pdb
number 1784
inside box 0. 0. 0. 68.6 68.6 68.6
end structure

Here,8VH4.pdb is the cyclohexane file which is downloaded from ATB. Please help me to solve the issue

I don’t know what packmol does. What is the box in the structure file that you pass to gmx grompp?

Dear @hess thank you for the support. However somehow I have solved it. I don’t know whether its right or not. I modelled 8VH4_box.pdb using packmol and converted to the corresponding .gro using gromacs editconf command. Then I have introduced the .gro file into a new box with same sides 6.86 x 6.86 x 6.86 nm3 box using editconf command. Now energy minimization is running.

Hi Aish,warya,
I am also facing the same EM issue with my DMSO-Water box of Packmol while using GROMACS.
"ERROR: The cut-off length is longer than half the shortest box vector or
longer than the smallest box diagonal element. Increase the box size or
decrease rlist.
Could you plz suggest how to overcome the issue as you have did.

Thanks in Advance.

My minim file is as under.
; minim.mdp - used as input into grompp to generate em.tpr
; Parameters describing what to do, when to stop and what to save
integrator = steep ; Algorithm (steep = steepest descent minimization)
emtol = 100.0 ; Stop minimization when the maximum force < 1000.0 kJ/mol/nm
emstep = 0.01 ; Minimization step size
nsteps = 50000 ; Maximum number of (minimization) steps to perform

; Parameters describing how to find the neighbors of each atom and how to calculate the interactions
nstlist = 1 ; Frequency to update the neighbor list and long range forces
pbc = xyz ; Periodic Boundary Conditions in all 3 dimensions

constraints = h-bonds
cutoff-scheme = Verlet
vdwtype = cutoff
vwd-modifier = force-switch
rlist = 1.2
rvwd = 1.2
rvwd-switch = 1.0
coulombtype = PME
rcoulomb = 1.2
DispCorr = no

I actually modeled the box using Packmol, then converted the .pdb file into .gro format. However, when I attempted to run the minimization, it encountered the error mentioned above. Consequently, I opted for an alternative approach. I converted the Packmol .pdb file into a .gro file and inserted it into a box with the same dimensions using the editconf command in GROMACS. After that, the energy minimization was successfully executed, resolving the error issue.

Dear Aishwarya,
Thanks for your response. I had converted my packmol.pdb file to packmol.gro using command gmx_mpi editconf -bt cubic -f packmol.pdb -o packmol.gro -c -d 1.0. I got the error by using the command gmx_mpi grompp -f 2024_minim.mdp -p topol.top -c protein.gro -o em.tpr. Now to get rid of the error you want to suggest that packmol.gro (output of the above command) should be inserted into a new box. I will be thankful if you could plz share the editconfcommand of GMX to insert this.
Thanks in advance.

Regards

Dr. Santosh

Yeah. First you convert your pdb file into gro file using the command:
gmx editconf -f packmol.pdb -o box.gro
Then insert this gro into a new box using gromacs command:
gmx editconf -f box.gro -o newbox.gro -box 4.30795 4.30795 8.6159 -center 2.153975 2.153975 2.153975
instead of 4.30795 values give the xyz coordinates of sides of the box you want to model and also you have to repace the digit 2.153975 inaccordance of center coordinates of the box

Dear Aishwarya,
Many many thanks for your suggestions and sharing the commands. Both the commands shared by you as well as the commands of em: gmx_mpi grompp -f em.mdp -c protein-ions.gro -o em.tpr -maxwarn 10 and :gmx_mpi mdrun -v -s em.tpr -o em.trr -e em.edr -c protein-em.gro -g em.log executed successfully. I had generated the newbox.gro using your given values i,e “4.30795 4.30795 8.6159 -center 2.153975 2.153975 2.153975” . Could you plz let me know where you get these values from? so that I could find it in mine. However I have checked box.gro but I found 0 0 0 at the last line.

My Packmol values in .inp file are

A mixture of water and DMSO

Dear Santosh,
I am new to Gromacs and now I am learning by replicating one paper. I don’t know how to calculate the values for sides for a box. Now I am refering the Gromacs commands from gromacs tutorials. Hope you will get some idea from there. Thank you

Thank you Aishwarya for your response. Could you plz share the nvt and npt commands which ran successfully in your case , so that I may try that.

Regards

Dr. Santosh

yes sure. Actually I have downloaded all the mdp files from the tutorial for GROMACS. I will share the link. You can download it from here: http://www.mdtutorials.com/gmx/lysozyme/01_pdb2gmx.html
Regards

Thank You Aishwarya, I will try this.

1 Like