LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] can new atom's property be calculated using an existing pair_style?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] can new atom's property be calculated using an existing pair_style?

From: Andrew Jewett <jewett@...1937...>
Date: Tue, 24 Oct 2017 14:40:33 -0700

I might not be the best person to reply to this question, but I think I can answer it anyway.

Unless the pair_style you plan to use explicitly takes custom atom properties into account (and I'm not aware of any that do this), you will have to create your own pair style that does.  If this is not possible for whatever reason, you can accomplish the same thing by writing your own fix that loops over all pairs of nearby atoms and applies a force to these atom pairs.  ( opposed to creating a new pair_style.  See fix_bond_create.cpp for an example how to loop over nearby atoms.)

Don't know if I helped.


On Oct 24, 2017 10:57 AM, "Quang Ha" <quang.t.ha.20@...24...> wrote:

I am skeptical this is not possible, but just want to ask before shooting. For the new property, says foo, defined using fix property/atom command, can I allocate an existing pair_style so that the value of foo property can be calculated at each time step? Example: I want to have LJ potential to be applied to foo. Can I called the existing LJ potential pair_style or do I have to write new cpp/h files to define the pair_style for foo?


Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list