Computing the potential energy of atoms along a periodic boundary??

Hi all,

I have been attempting to calculate the per atom PE of an interface (namely a grain boundary), and I know that the potential energy here is higher than the surrounding region (AtomEye, for example, demonstrates this).

I can calculate the PE per atom for the middle grain nboundary, but when I compute the PE of the interface on the PBC and divide it by the number of atoms:

the PE is essentially equivalent (actually less!?!) to the average of the simulation volume??

I have also tried computing the PE of the entire simulation volume, and subtracting the PE of the non-GB regions. This doesn’t work either.

The following script file will spit out AtomEye cfg dumpfiles and necessary thermo outputs… Why is the PE of the interface inaccurately being computed as the same as the simulation volume!?!

Here are the Dumpfile images, to demonstrate that it is, in fact, the PBC region!

bot.0.cfg (335 KB)

mid.0.cfg (613 KB)

top.0.cfg (292 KB)

I simply create a region->group at the top/ bottom of the simulation volume (PBs in Y) and at Middle GB, and compute the sum of the PER atom PE of these groups (e.g compute bottom reduce sum c_pe).

Perhaps you could simply refer to the output?

It is clear that the method worked for the middle GB, but why doesn’t it work for the PBs? These definitely have a different PE (I have imaged them with the PE auxiliary in Atomeye…)

Nathaniel

I simply create a region->group at the top/ bottom of the simulation volume
(PBs in Y) and at Middle GB, and compute the sum of the PER atom PE of these
groups (e.g compute bottom reduce sum c_pe).

Perhaps you could simply refer to the output?

you don't understand. unless you make it dead obvious where your
concern lies or provide proper proof that the problem is with LAMMPS
and not with you, nobody will look into it. the fact, that you don't
get what you expect is not sufficient. that is still your problem.

axel.

The concern is that, according to the cfg dump files, and the Y COORDINATES of the variables which define the regions (v_yP1-v_yP7), I have definitely defined regions which overlap the grain boundaries on the PBs…

However, the potential energy of these atoms is not greater than the average potential energy of the simulation volume.

IT doesn’t matter if you can’t give me advice in this specific case, if you don’t have time to read the entire script. Do you know if it is possible to calculate the PE of the atoms which lie at a periodic boundary??

You will need some sort of defect to prove you have done it… In my case, I am talking about a grain boundary at the PB…

Nathaniel

IT doesn't matter if you can't give me advice in this specific case, if you
don't have time to read the entire script. Do you know if it is possible to
calculate the PE of the atoms which lie at a periodic boundary??

i don't understand the question. you can calculate the PE per atom
anywhere and it should not matter if you move the periodic boundaries
around either, for as long at the atoms stay at the same relative
positions.

as i said, unless you produce a simpler example, this discussion will
go nowhere.

For the last time.

Please provide a simple example and simple explanation and in a way that one fan reproduce it.

Just dumping random files and inputs is not helpful.

You need to properly argue your case. Don't assume that what is obvious to you is obvious to others.

Axel.

You can dump pe/atom into a dump file,
along with coord/atom or some other metric
of whether an atom is at a grain boundary.

Assuming you have built your system properly,
none of those values should have any dependence

on whether the atom is near a periodic boundary.

Try it for the bench/in.eam provided. Try it for
a tiny system with a single GB that you build.

Steve

I noticed you have this comment in your script:

############################Note, that the region overlaps the PBC, and I could not find a #############################way to avoid this, so I simply delete the non-GB section!!

The “displace_atoms” command should be what you need to move the GB away from the PBC boundary.

Carlos

Thanks Steve,

Sorry for the delayed response, I was away from the office for an academic conference. Would it be possible to simply dump:

compute reduce sum c_pe??

How would one do this from a dumpfile, otherwise, for the very specific positions at the PBC?

With regards,
Nathaniel

You should try to break your problem into a few subproblems, like–

1. First create a bicrystal only, and as Steve said, “Assuming you have built your system properly”, none of the properties like pe,coordination number,common neighbour and centrosymmetry parameter must be dependent on PBC. They should be different only at the grain boundary. So in visualization, you should be able to see the “grain boundary only” by dumping any of the above parameters. Do this for a simple system of a bicrystal, and a small one indeed.

2. Once you are done with this, gradually increase your system size, repeat the task and once you are satisfied, perform your original simulation problem. Then calculations of pe etc. is just the work of relatively simple commands available in LAMMPS. They come in handy…!!

P.S: PBC should not cause problems, unless you are building your system correctly. Remember, the problem with PBC and the “orient” command in LAMMPS!

Sagar

Hi Sagar.

I appreciate your intention, but you are completely misunderstanding the problem.

It has nothing to do with the PBC… I am only trying to compute the potential energy of the interface!

With regards,
Nathaniel

Ok Nathaniel.

Your script is a little big. So you want to say that your GB(interface) is at the PBC region…??

Sagar

Hi Sagar.

I appreciate your intention, but you are completely misunderstanding the
problem.

It has nothing to do with the PBC.... I am only trying to compute the
potential energy of the interface!

remember that it was you that brought the PBC topic up in this discussion.

in any case and as steve already pointed out, in order to solve this,
you have to go back to square one and break the problem into smaller
steps. there obviously is something not like you expect, but it
obviously is more likely that you are not using LAMMPS properly than
that there is a bug.

if you do things in smaller steps (and with a smaller system), you can
explain better how you arrive at what is troubling you and it is
easier for people to assess whether there is an issue with your
procedure. just demanding that somebody simply tell you how to get
what you want, is not going work out.

axel.

The result of compute reduce is a single number. You can’t dump it,
since it’s not a per-atom quantity. You can print it with thermo output.

I don’t know what it means to have compute reduce calculated at

“specific positions at the PBC”.

Steve