# Huge change in energy and pressure while changing from periodic to non-periodic

Hi all,
For the same structure (cubic cell), when i try to convert it
into a non periodic in z direction, there is a huge change in energy
and pressure of the non periodic system. See below for comparison. I
understand with conversion from periodic to non periodic, there is a
sudden turn off of some of the non bonded interactions with the atoms
in z direction owing to image nonexistence. I can see that 'some'
change in E_pair. But difference in E_mol is huge. Thanks all in
advance for all the help and inputs/suggestions.

NonPeriodic:
Step Temp E_pair E_mol TotEng Press Volume
0 299.60353 -62948.403 2.2278373e+09 2.2278408e+09
-1.1044823e+08 934282.28
Periodic:
Step Temp E_pair E_mol TotEng Press
0 299.60353 -64895 391596.65 393198.09 76.689535

The input file is simple and given below and the only change between
the two runs is commenting and uncommenting the boundary command.

clear
units real
pair_style lj/cut/coul/cut 14
special_bonds lj/coul 0.0 0.0 1.0
atom_style full
bond_style harmonic
dihedral_style harmonic
angle_style harmonic
improper_style cvff
neighbor 2.0 bin
neigh_modify every 2 delay 4 check yes page 100000000
min_style cg
minimize 1.0e-4 1.0e-6 1000 5000

Thanks
Arnab

Hi all,
For the same structure (cubic cell), when i try to convert it
into a non periodic in z direction, there is a huge change in energy
and pressure of the non periodic system. See below for comparison. I
understand with conversion from periodic to non periodic, there is a
sudden turn off of some of the non bonded interactions with the atoms
in z direction owing to image nonexistence. I can see that 'some'
change in E_pair. But difference in E_mol is huge. Thanks all in

the explanation is trivial: apparently you have
bonded interactions that straddle the periodic
boundaries without having the correct image
flags added. with a periodic box LAMMPS picks
the closest image and corrects your mistake;
without periodic boundaries this is no longer
possible and now you have bonds that are
stretched across the box and hence the huge

axel.

Axel,
Thanks for your input. I did see that and identified some
bonds stretching across. However i started with a low density periodic
structure generated from Material Studio (and stretching bond when was
not the problem) and then subjected it to repeated NPT and NVT runs
with compression. In the process such bonds stretching might have
taken place. However, i could never identify that since my structure
was always periodic. Is there any way to identify such things when
this is taking place. On the other hand, i am guessing changing the
box flags/coordinates of the identified atoms carefully will make the
non periodic structure run-able.

Thanks
Arnab

Axel,
Thanks for your input. I did see that and identified some
bonds stretching across. However i started with a low density periodic
structure generated from Material Studio (and stretching bond when was
not the problem) and then subjected it to repeated NPT and NVT runs

with compression. In the process such bonds stretching might have

no. it cannot happen during a simulation, since LAMMPS *does*
update the image flags. so it must have been messed up already
from the beginning or during whatever steps you did in between.

taken place. However, i could never identify that since my structure
was always periodic. Is there any way to identify such things when
this is taking place. On the other hand, i am guessing changing the

visualizing intermediate data files with a viz tool that actually reads
the topology information should easily show the bonds that that
get wrapped around through removing periodicity.

it would also be very straightforward to write a little script/tool
to check this.

axel.

Axel,

no. it cannot happen during a simulation, since LAMMPS *does*
update the image flags. so it must have been messed up already
from the beginning or during whatever steps you did in between.

That was my understanding so far and thanks for solidifying that. The
only other tool being used in between is restart2data tool for
converting restart files to data file from time to time.

taken place. However, i could never identify that since my structure
was always periodic. Is there any way to identify such things when
this is taking place. On the other hand, i am guessing changing the

visualizing intermediate data files with a viz tool that actually reads
the topology information should easily show the bonds that that
get wrapped around through removing periodicity.

it would also be very straightforward to write a little script/tool
to check this.

Yes, i agree. Thanks again.

Arnab