LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] single function for specific pair style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] single function for specific pair style

From: Huang <nongyanhuang@...223...>
Date: Fri, 18 Aug 2017 04:35:15 +0800 (CST)

Hi Axel,
I see. Thanks!


At 2017-08-18 04:06:06, "Axel Kohlmeyer" <akohlmey@...24...> wrote:

On Thu, Aug 17, 2017 at 4:03 PM, Huang <nongyanhuang@...223...> wrote:
Hi all,
Recently I'm trying to implement a new pair style in LAMMPS. I want to include this pair style in compute group/group. I searched in the mail lists of LAMMPS and knew that I need to write a routine named single() in my own pair style. I looked the codes of pair_lj_cut.cpp and several other pair styles, the structure for these single routines are the same: 
single(int i, int j, int itype, int jtype, double rsq, double factor_coul, double,factor_lj,double &fforce).
But my pair style is a little bit more complicated because the potential is direction dependent, the potential form is E(x,y,z) instead of E(r). So to calculate the energy, the structure of single function for my potential should be like follows:
single(int i, int j, int itype, int jtype, double delx, double dely, double delz, double factor_coul, double,factor_lj,double &fforce)

My question is, can I write the single function as above or it won't work since I changed the structure of it?

it won't work. 

Does anyone have any idea about this question? Thank you in advance!



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.