# [lammps-users] energy minimization with AIREBO

I'm no longer clear what your question is.

Steve

ok. Now let’s forget the energy minimizing part, only calculating the energy per atom without any atoms moving.
What I got is:
Total atom Energy per atom
4 -7.4750055
8 -7.4660715
12 -7.465088
16 -7.465088
20 -7.465088

Do you think it is all right?
Here I use PBC to study the bulk properties. I have 4 atoms in one layer and use “replicate x y z” command to simulate two layers and more.
The LJ cutoff is 3 times sigma which is 3 layers here. For 3 and more layers the energy is consistent.
So I worried about the system size within LJ cutoff distance.
Below is input and data file:
pe.in

If you have a 4-atom system in a periodic box, I think
you should get the same answer as an 8,12,etc atom
system in a periodic box, if and only if, the 8-atom
system is an exact periodic duplication (2x larger)
of the 4-atom system. "Exact" means to high precision,
e.g. in box size, atom coords.

Steve

steve,

one remark/question. if i remember correctly, AIREBO computes
its own neighbor lists. what if those don't include periodic images
beyond the first shell?

that being said, i find it very peculiar that there should be a need
to require multiple periodic images to be included into a classical
MD code. most classical MD codes stick to minimum image conventions
for the sake of simplicity and _require_ the user to use properly sized
supercells in the first place. after all, the cost for that is negligible
(unlike for quantum chemistry codes, where the situation is different).

cheers,
axel.

one remark/question. if i remember correctly, AIREBO computes
its own neighbor lists. what if those don't include periodic images
beyond the first shell?

My comment was not specific to AIREBO. I simply mean that
if you have a 4-atom unit cell and an infinitely periodic system, then
you should be able to create a LAMMPS simulation box
of any size that is a multiple of that unit cell (4,8,12,256 atoms, etc)
and compute the energy for the initial config and get the same
answer. If that's not the case for AIREBO, then there is
likely some bug with its neighbor lists or boundary conditions
or the like. So that would be good to know. I'm pretty sure
there is no such problem for a large system with AIREBO (i.e. a
1000-atom unit cell),
but maybe there is when you have only a 4 atom system and the cutoff is longer
than the box, etc.

that being said, i find it very peculiar that there should be a need
to require multiple periodic images to be included into a classical
MD code.

I'm not saying it's efficient to run this way, or a good idea to
run dynamics on a 4-atom system with a long cutoff (self-interactions),
but LAMMPS should work in this mode. The cutoff can be many
times the box-length.

Steve

should you be able to do what I said below
(small box, large cutoff) on 1 proc, but
it should also hold true on any number of procs.
In that case, the cutoff can be many, many
times larger than a processor's sub-domain,
and you should still get the same energy/pressure
for the initial periodic config.

There is a known bug with this for bonded
systems with long-range Coulombics:
http://lammps.sandia.gov/unbug.html.

But that is not relevant to AIREBO, so let me
know if what I say is not the case with AIREBO,
as it likely indicates a neighbor list bug of
some kind.

Steve

I only use the 4-atom data file and use “replicate 1 1 2” to simulate the 8-atom system.
I think the replicate command can provide exact duplication, isn’t it?

Jianxin,

It just means your simulation box is too small to get a precise answer at this matter. Because of the long range cutoff ( 3*3.4 in this case) is longer than the box length in 4 atom case (3.4). Therefore, you should not expect to get exactly the same energy per atom for 4, 8, 16, etc systems unless your system is large enough to avoid that cutoff issue.

Best,

AC

Thanks Albert!
I think usually we choose primitive cell in PBC. I didn’t expect such box-size problem with long range interaction.
For graphite, if I chose LJ cutoff as 3*sigma, I have to use three layers of graphene in the PBC box.
the upcoming problems are (1) higher computational cost;
(2) the problem comes from long range interaction or AIREBO only? Should we have the such treatment when simulating other systems that have long range force?

Thanks!
Jianxin

Are you saying if you replicate and then do a 0 timestep run
that the per-atom energy or pressure is different for
different sized systems? If so, is it the same once
you have a big enough system? It is possible
that the QEq part of ReaxFF is not converging to the
exact same answer for larger systems.

Steve

Hi Steve,

I am using AIREBO, not ReaxFF.
For simulation box( all three dimensions ) larger than LJ cutoff, the energy per atom converges.
Otherwise the energy is different for different size systems.( without any other treatments, only calculate the energy).

Thanks!
Jianxin

Found the bug. The interaction of an atom with itself
(only happens when cutoff > box length) wasn't being
handled correctly in AIREBO. I'll post a patch
later today - so try it out.

Thanks,
Steve