[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

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.

Thanks!

**References**:**[lammps-users] Pairwise force calculation in EAM potential***From:*Xiao Jia <xiaoj@...1508...>

- Prev by Date:
**Re: [lammps-users] Pairwise force calculation in EAM potential** - Next by Date:
**[lammps-users] General Questions Regarding LAMMPS** - Previous by thread:
**Re: [lammps-users] Pairwise force calculation in EAM potential** - Next by thread:
**[lammps-users] Running ADP potentials on GPU** - Index(es):