Hi I am working with a simulation the requires the use of a LJ 10-4 potential “epsilon*((sigma/r)^10 - (sigma/r)^4)” instead of the 12-6 or 9-6. I saw the files pair_lj_cut.cpp and pair_lj96_cut.cpp. I looked at the functions “PairLJCut::init_one” and “PairLJ96Cut::init_one” and I know how to change the coefficients to obtain L-J 10-4. However, in MPI_Allreduce there are more coefficients and I do not know what they mean. For LJ 9-6 the function looks like this MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); double PI = 4.0*atan(1.0); double sig3 = sigma [j]sigma[j]sigma[j]; double sig6 = sig3sig3; double rc3 = cut[j]cut[j]cut[j]; double rc6 = rc3rc3; etail_ij = 8.0PIall[0]all[1]epsilon[j] * sig6 * (sig3 - 2.0rc3) / (6.0rc6); ptail_ij = 8.0PIall[0]all[1]epsilon[j] * sig6 * (3.0sig3 - 4.0rc3) / (6.0rc6); and for LJ 12- 6 it looks like MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); double PI = 4.0atan(1.0); double sig2 = sigma[j]sigma[j]; double sig6 = sig2sig2sig2; double rc3 = cut[j]cut[j]cut[j]; double rc6 = rc3rc3; double rc9 = rc3rc6; etail_ij = 8.0PIall[0]all[1]epsilon[j] * sig6 * (sig6 - 3.0rc6) / (9.0rc9); ptail_ij = 16.0PIall[0]all[1]epsilon_[j] * sig6 * (2.0sig6 - 3.0rc6) / (9.0*rc9); Can you explain me how do you obtain these coefficients Regards_*

Hi I am working with a simulation the requires the use of a LJ 10-4

potential "epsilon*((sigma/r)^10 - (sigma/r)^4)" instead of the 12-6 or 9-6.

I saw the files pair_lj_cut.cpp and pair_lj96_cut.cpp. I looked at the

functions "PairLJCut::init_one" and "PairLJ96Cut::init_one" and I know how

to change the coefficients to obtain L-J 10-4. However, in MPI_Allreduce

there are more coefficients and I do not know what they mean. For LJ 9-6 the

function looks like this

MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); double PI =

4.0*atan(1.0); double sig3 = sigma[j]*sigma[j]*sigma[j]; double sig6 =

sig3*sig3; double rc3 = cut[j]*cut[j]*cut[j]; double rc6 = rc3*rc3; etail_ij

= 8.0*PI*all[0]*all[1]*epsilon[j] * sig6 * (sig3 - 2.0*rc3) / (6.0*rc6);

ptail_ij = 8.0*PI*all[0]*all[1]*epsilon[j] * sig6 * (3.0*sig3 - 4.0*rc3) /

(6.0*rc6); and for LJ 12- 6 it looks like

MPI_Allreduce(count,all,2,MPI_DOUBLE,MPI_SUM,world); double PI =

4.0*atan(1.0); double sig2 = sigma[j]*sigma[j]; double sig6 =

sig2*sig2*sig2; double rc3 = cut[j]*cut[j]*cut[j]; double rc6 = rc3*rc3;

double rc9 = rc3*rc6; etail_ij = 8.0*PI*all[0]*all[1]*epsilon[j] * sig6 *

(sig6 - 3.0*rc6) / (9.0*rc9); ptail_ij = 16.0*PI*all[0]*all[1]*epsilon[j] *

sig6 * (2.0*sig6 - 3.0*rc6) / (9.0*rc9); Can you explain me how do you

obtain these coefficients Regards

are you using?

pair_modify tail yes

if not, don't worry about those.

axel.

Dr. Kohlmeyer

I am not using pair_modify tail, is “PairLJCut::init_one” the only function that I need to change?

Regards

Dr. Kohlmeyer

I am not using pair_modify tail, is "PairLJCut::init_one" the only function

that I need to change?

to go from 12-6 to 10-4 lennard jones?

no. there is more. this is easiest seen in the

src/USER-CG-CMM/pair_lj_sdk.{cpp,h} files

and src/USER-CG-CMM/lj_sdk_common.h

those support 12-6, 9-6 and 12-4 lennard jones

all in one pair style.

if i were you, i'd probably not program a new pair style

unless i was certain, that the simulation will work, but

would rather first start with generating an input for

pair style table.

if you want to go beyond that, i'd probably extend

lj/sdk to 10-4 rather than writing yet another lj/XXX

pair style. there are too many of those already...

cheers,

axel.

Dr. Kohlmeyer

Ok. I think I will work with pair_style table.

Thank you