LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] Pairwise force calculation in EAM potential
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] Pairwise force calculation in EAM potential

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 20 Oct 2017 08:57:59 -0400

On Fri, Oct 20, 2017 at 5:24 AM, Xiao Jia <xiaoj@...1508...> wrote:
> Dear LAMMPS users,
> I would like to calculate thermodynamic properties, which need the
> information of interatomic/pairwise force, distance, etc. (not the total
> force on atoms).
> I noticed that in pair_style. cpp, there will be compute() function working
> on calculation of total force on atoms, and the intermediate results like
> delx*fpair are what I want for post-processing in other calculations.
> I want to impose this calculation into a fix.cpp, but I am not sure about
> how to replicate the process of calculating pairwise interaction like
> pair_**.cpp does, more specifically, like pair_eam.cpp does.
> I have done this replication for simple pair style, like pair_morse.cpp. I
> just redefine the parameters, and copy the compute () code whenever I need
> that part.
> But for complicated case like pair_eam. cpp, I found the definition of
> parameters and pre-processing quite complicated. And I am not sure what is
> the procedure of each sub-function for defining parameters.
> Can I just copy the code in compute into fix.cpp? and then how to access all
> the parameters defined in pair_eam.cpp?
> I appreciate any suggestions on either general procedure/idea or specific
> solution.

what you are describing sounds like a bad idea where you are wasting a
lot of programming effort and will create a maintenance nightmare.
why not use the same strategy as in compute group/group? i.e. loop
over a custom neighbor list and call the Pair::single() function for
each pair?


> Thanks!
> ------------------------------------------------------------------------------
> 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.