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

**URL:** <https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600>\
**Category:** User discussions\
**Created:** [March 13, 2024, 4:40am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600 "2024-03-13T04:40:46Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 13, 2024, 4:40am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/1 "2024-03-13T04:40:46Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 13, 2024, 9:10am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/2 "2024-03-13T09:10:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 13, 2024, 9:31am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/3 "2024-03-13T09:31:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 13, 2024, 1:39pm UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/4 "2024-03-13T13:39:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 13, 2024, 2:31pm UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/5 "2024-03-13T14:31:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [March 14, 2024, 7:50am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/6 "2024-03-14T07:50:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 14, 2024, 10:27am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/7 "2024-03-14T10:27:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Santosh](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Santosh](https://gromacs.bioexcel.eu/u/Santosh)\
**Post date:** [March 17, 2024, 2:34am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/8 "2024-03-17T02:34:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 18, 2024, 5:03am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/9 "2024-03-18T05:03:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Santosh](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Santosh](https://gromacs.bioexcel.eu/u/Santosh)\
**Post date:** [March 18, 2024, 8:14am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/10 "2024-03-18T08:14:54Z")

</div>

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 `editconf`command of GMX to insert this.  
Thanks in advance.

Regards

Dr. Santosh

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 18, 2024, 9:00am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/11 "2024-03-18T09:00:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Santosh](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Santosh](https://gromacs.bioexcel.eu/u/Santosh)\
**Post date:** [March 20, 2024, 4:58pm UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/12 "2024-03-20T16:58:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 21, 2024, 4:16am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/13 "2024-03-21T04:16:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Santosh](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Santosh](https://gromacs.bioexcel.eu/u/Santosh)\
**Post date:** [March 21, 2024, 1:31pm UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/14 "2024-03-21T13:31:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [March 27, 2024, 4:53am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/15 "2024-03-27T04:53:16Z")

</div>

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](http://www.mdtutorials.com/gmx/lysozyme/01_pdb2gmx.html)  
Regards

---

<div class="post-metadata">

**Author:** ![Santosh](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@Santosh](https://gromacs.bioexcel.eu/u/Santosh)\
**Post date:** [April 1, 2024, 6:40am UTC](https://gromacs.bioexcel.eu/t/the-cut-off-length-is-longer-than-half-the-shortest-box-vector-or-longer-than-the-smallest-box-dia/8600/16 "2024-04-01T06:40:57Z")

</div>

Thank You Aishwarya, I will try this.
