Simulation box too small error

863 views
Skip to first unread message

Michael Goytia

unread,
Feb 20, 2016, 8:09:44 PM2/20/16
to hoomd-users
Hello,

I am running an optimization of a super cell for a system of rigid bodies.

I have a 250 molecule simulation where the box has and lx ly and lz of 50.0, 23.2, 77.7 respectively and I get this error.

**ERROR**: nlist: Simulation box is too small! Particles would be interacting with themselves.
Traceback (most recent call last):
  File "in_coro.py", line 53, in <module>
    run(2000)
  File "/Users/Michael/miniconda2/lib/python2.7/site-packages/hoomd_script/__init__.py", line 270, in run
    globals.system.run(int(tsteps), callback_period, callback, limit_hours, int(limit_multiple));
RuntimeError: Error updating neighbor list bins

If I make the box larger, the simulation works but then I can't optimize the cell parameters (a,b,c,xz,xy,yz)  for my system or my whole reason of starting from the super cell

I'm wondering what is limiting my simulation from running. I would guess that my box is large enough too not have particles interacting as my cut of distances for both the pair potentials
are 12-15 angstroms(my unit of length or D) as so below. 

lj = pair.lj(r_cut=12.0)
lj.pair_coeff.set('1', '1', epsilon=0.293, sigma=3.55) #C-C
lj.pair_coeff.set('1', '2', epsilon=0.293, sigma=3.55) #C-C
.......
yukawa = pair.yukawa(r_cut=15.0)
yukawa.pair_coeff.set('1', '1', epsilon=0.0, kappa=0.2)
yukawa.pair_coeff.set('1', '2', epsilon=0.0, kappa=0.2)
......

Any explanation for this would be much appreciated,

Thanks,

Michael Goytia
Graduate Student/Department of Chemistry 
University of Utah

Jens Glaser

unread,
Feb 21, 2016, 2:04:41 PM2/21/16
to hoomd...@googlegroups.com
Michael,

you have a length 15 largest distance cutoff and a length 23.2 box length along the y direction. The error message states exactly what the problem is.
Multiply 15 by 2, and it is smaller than the shortest box dimension. You need to either reduce the cut-offs or make the box larger, e.g. use more particles.

Jens

--
You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
To post to this group, send email to hoomd...@googlegroups.com.
Visit this group at https://groups.google.com/group/hoomd-users.
For more options, visit https://groups.google.com/d/optout.

Jens Glaser

unread,
Feb 21, 2016, 2:05:32 PM2/21/16
to hoomd...@googlegroups.com
On Feb 21, 2016, at 2:04 PM, Jens Glaser <jens....@gmail.com> wrote:

Michael,

you have a length 15 largest distance cutoff and a length 23.2 box length along the y direction. The error message states exactly what the problem is.
Multiply 15 by 2, and it is smaller than the shortest box dimension. You need to either reduce the cut-offs or make the box larger, e.g. use more particles.
                                        ^^^^^^

larger

Michael Goytia

unread,
Feb 22, 2016, 12:02:26 PM2/22/16
to hoomd-users
Jens,

Thanks for this!

Michael Goytia

bj

unread,
May 5, 2017, 11:02:03 PM5/5/17
to hoomd-users
Hi,

I am getting the same error as Michael, even though 2rcut<L.

My simulation box is
 Lx=3.78364780108 Ly=3.78364780108 Lz=3.78364780108 xy=0.0 xz=0.0 yz=0.0
dimensions=3
It contains 65 particles.

The potential is set by
NeighborsListLJ = md.nlist.cell()

    myLjPair = md.pair.lj(r_cut=1.8, nlist=NeighborsListLJ)
    myLjPair.pair_coeff.set('A', 'A', epsilon=1,   sigma=1,   r_cut=1.8,  r_on=1.2)
    myLjPair.pair_coeff.set('A', 'B', epsilon=1.5, sigma=0.8, r_cut=1.44, r_on=0.96)
    myLjPair.pair_coeff.set('B', 'B', epsilon=0.5, sigma=0.88,r_cut=1.584,r_on=1.056)
    myLjPair.set_params(mode="xplor")

In this case, 2rcut=3.6<Lx=3.78, but I still get the error


**ERROR**: nlist: Simulation box is too small! Particles would be interacting with themselves.

If I reduce rcut to 1.4, then everything works fine.

Why does this occur, and what can I do to override the problem?

Thanks

Michael Howard

unread,
May 5, 2017, 11:53:57 PM5/5/17
to hoomd-users
You need to have 2*(r_cut + r_buff) be less than the shortest box dimension. You are using the default r_buff for nlist.cell, which is 0.4. Hence the error message. Either increase the size of the simulation box, or decrease r_buff. Note that decreasing r_buff will increase the frequency of neighbor list builds, but for such a small system it hardly matters.

--Mike

bj

unread,
May 8, 2017, 3:42:32 PM5/8/17
to hoomd-users
Thanks, setting r_buff=0 actually solved the problem.
Reply all
Reply to author
Forward
0 new messages