LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Pair-wise potencials changing custom atom proprieties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Pair-wise potencials changing custom atom proprieties

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 3 May 2018 16:50:43 -0400

On Thu, May 3, 2018 at 4:20 PM, Gonçalo Paulo <g-spaulo@...8...> wrote:
> Hi,
> I'm setting up a pair-wise potencial that changes depending on a custom, per
> atom, propriety, and at the same time changes it's value. When I'm using
> only one processor it works ok because it seems I can just ignore the ghost
> atoms because they dont have this custom propriety(it's value is 0 for
> them). Now I want to try to run the script on multiple processors but I've
> run into the issue that I can't do that without the use of ghost atoms. As
> this is done in a pair computation I can't change the compute as I've seen
> sugested and I dont think that there is any pair style that does this. Is
> there way to do this? Should I just use a new atom style that includes this
> variable instead of using the custom arrays to store it? Any help would be
> apreciated.

without knowing the details of the pair style you are working with, it
is only possible to give some generic advice.

what you describe sounds similar to how EAM and related pair styles
work. for EAM, there are two steps.
1) some local property (density from neighbors) is computed for all
pairs and stored in local and ghost atoms. afterwards, a *reverse*
communication is performed to sum the contributions from ghost atoms
to their corresponding local atom. ghost atoms are copies of atoms in
neighboring subdomains.
2) based on the per-atom density information, then some derived
properties are computed to be included in the force computation and
those need to be communicated to ghost atoms. this is done with a
*forward* communication.

to make forward/reverse communication work, you need to provide
routines pack/unpack_forward/reverse_comm() in your pair style and set
how many items per atom are communicated in the pair style
constructor. pair_eam.cpp is the simplest of these styles and a good
place to start reading the source to learn how this works. it is
impossible to say whether you need both or only the forward

for the forward-only case, you could consider using fix property/atom
with one or more custom properties and then look these up inside the
pair style. if you create the fix with the proper keywords added,
forward communication to ghost atoms is included. this is less
programming but also less powerful and more cumbersome to restart.


> Gonçalo Paulo
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites,!
> _______________________________________________
> lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.