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: Gonçalo Paulo <g-spaulo@...8...>
Date: Fri, 4 May 2018 00:33:13 +0000

I'm doing a kuramoto style potential and I dont think I can use the same method as EAM because that density propriety is calculated each time set while I want the phase to be something that carries is altered each time set but that the atom remembers the next one. I dont think I can do that implementing that same comunication can I?

Gonçalo 


De: Axel Kohlmeyer <akohlmey@...24...>
Enviado: 3 de maio de 2018 21:50:43
Para: Gonçalo Paulo
Cc: lammps-users@lists.sourceforge.net
Assunto: Re: [lammps-users] Pair-wise potencials changing custom atom proprieties
 
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
communication.

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.

axel.

>
> Gonçalo Paulo
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users
>



--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.