Pairwise interactions that depend explicitly on the Cartesian coordinates

Hello everyone,

I would like to know if it is possible to use pairwise interactions that depend explicitly on the Cartesian coordinates of both atoms.

For example, the potential energy U between two atoms i at (xi,yi,zi) and j at (xj,yj,zj) is a function U(xi,yi,zi,xj,yj,zj).

I only found examples of potentials that depend on rij.

Thanks for the help,
Lucas

Hello everyone,

I would like to know if it is possible to use pairwise interactions that
depend explicitly on the Cartesian coordinates of both atoms.

For example, the potential energy U between two atoms i at (xi,yi,zi) and
j at (xj,yj,zj) is a function U(xi,yi,zi,xj,yj,zj).

I only found examples of potentials that depend on rij.

whether it is possible depends on what you are willing to do to make it
work. most likely you will need to program a custom pair style, but to be
certain, you should first describe in more detail what your potential
function would look like and for what purpose you would need to use the
position dependence

axel.

Hello Axel,

I’m willing to make it work. I’ve been using Lammps for quite some time and would like to use it to solve this problem.

My simulation involves a substrate in the plane xy (at z=0) and atoms in the region z>0. I would like to use the McLachlan’s substrate-mediated potential, which is a pairwise potential.

Let’s consider two atoms A and B. We decompose each position vector into 2 vectors: one normal to the substrate (z direction) and one parallel to the substrate (xy plane).

The potential depends on fixed parameters; the coordinates za and zb; the 2 vectors parallel to the xy plane; and the distance between A and B (the usual r).

When you said “you will need to program a custom pair style” did you mean something like section 10.10 (Pairwise potentials)?
http://lammps.sandia.gov/doc/Section_modify.html#mod_10

Thanks for the quick reply,
Lucas

Hello Axel,

I'm willing to make it work. I've been using Lammps for quite some time
and would like to use it to solve this problem.

My simulation involves a substrate in the plane xy (at z=0) and atoms in
the region z>0. I would like to use the McLachlan's substrate-mediated
potential, which is a pairwise potential.

Let's consider two atoms A and B. We decompose each position vector into 2
vectors: one normal to the substrate (z direction) and one parallel to the
substrate (xy plane).

The potential depends on fixed parameters; the coordinates za and zb; the
2 vectors parallel to the xy plane; and the distance between A and B (the
usual r).

When you said “you will need to program a custom pair style” did you mean
something like section 10.10 (Pairwise potentials)?
http://lammps.sandia.gov/doc/Section_modify.html#mod_10

yes.

It sounds like you just want the potential to act in the z direction.
In which case you might look at fix line force, which will zero out
the components not in a particular direction, or fix set force.
If the McL potential is not in LAMMPS, you might be able
to tabulate it, use pair_style table, then use one of those fixes.

Steve

Hello Steve,

The potential doesn’t act only in the z direction, it’s a pairwise interaction that depends on the coordinate of both atoms and on the x,y components as well.

For example one of the terms of this potential is: k*(za + zb)/(r^3 * R^5), where:

k is a constant
za is the z coordinate of atom A
zb is the z coordinate of atom B
r is the usual distance
and R depends on the projection of the position vectors (of A and B) in the xy plane.

I can’t tabulate it because it depends on z (za and zb), but also on x and y ®.

Thanks for the help,
Lucas

Hello everyone,

I posted this question couple of days ago, but I think that the subject (“Pairwise interactions that depend explicitly on the Cartesian coordinates”) is not entirely accurate.

The potential energy between atoms i and j is:

pergunta.png

So it doesn’t depend explicitly on the Cartesian coordinates, it depends only on 3 differences (delta x, delta y, delta z), a sum (zi+zj) and r.

Is it possible to use an existing pair style? Or I still need to program a custom pair style (section 10.10 - Pairwise potentials)?

Thanks in advance,
Lucas

I doubt it.

Someone may correct me, but MD potentials tend to act either on the center of mass as an external potential or on the pair separation, but not on both.

pergunta.png

Lucas,

Well, delta x, delta y and delta z are distances so they do not depend on coordinates, i.e., where i and j actually are, but R and Z+ do.

However, may I ask what happens when Z_i and Z_j are across the periodic boundary? How do you treat the minimum image convention in this case? Or is your z-direction strictly non-periodic?

In any case, you may have to code up your own pair_style.

Ray

pergunta.png

I like this potential. There is no fundamental problem adding it to LAMMPS. In general, the coordinates x, y, z, in the above formulae must be transformed from the LAMMPS coordinate system to that of the substrate. The simplest way to do this is to require that the substrate be located in the plane z=z_s in LAMMPS coordinates, so z_s is an additional parameter in the potential. You could code this up using pair_lj_cut.cpp as a starting point. You will have to take some care in working out the force terms correctly. For example, the forces on the pair of particles do not sum to zero and do not act along the line joining the centers.

As Ray mentioned, there are some additional complication that can arise if the cell is periodic in z. But for the intended purpose, it will probably suffice to require that all atoms have z > z_s, which will break if the user tries to use periodicity in z.

Aidan

pergunta.png