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: "Diaz,Adrian" <adriandiaz@...1447...>
Date: Fri, 20 Oct 2017 15:41:17 +0000

I assume you're referring to the pair interaction force Fij in the Irving-Kirkwood formalism; the single method programmed into most pair potentials can be called to deliver this. In the case of those without the single method template you need, like many-body potentials which can have an effectively computed pair interaction force, you can define your own version of a pair interaction method as a virtual function in pair that will then be inherited and implemented in the base pair style class. This way you wont need to copy paste anything about the potential parameters or computation outside of the pair style's implementation.

From: Xiao Jia <xiaoj@...33....1508...>
Sent: Friday, October 20, 2017 5:24:31 AM
To: LAMMPS Users Mailing List
Subject: [lammps-users] Pairwise force calculation in EAM potential
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.