Hi lammps users,

I am trying to implement a new pair potential, and so I am going through

the source code, in particular pair_lj_cut.cpp, pair_tersoff.cpp, and

pair.cpp.

What does eflag and vflag refer to? Also, how is energy summed (i.e. which

variable)?

Thanks for your help

John

Hi lammps users,

I am trying to implement a new pair potential, and so I am going through

the source code, in particular pair_lj_cut.cpp, pair_tersoff.cpp, and

pair.cpp.

you should also have a look at verlet.cpp.

What does eflag and vflag refer to? Also, how is energy summed (i.e. which

variable)?

eflag is true if energies are to be evaluated, vflag if the virial is required.

using the calls to ev_tally*().

axel.

Thanks for the help!

I have another question about the Tersoff.cpp implementation. What is the

attractive() subroutine for? It is called after the energies for Fr(ij)

and b(ij)*Fa(ij) are summed with ev_tally(). It looks like a virial

component but I don't understand how it is applied.

Thanks again,

John

Thanks for the help!

I have another question about the Tersoff.cpp implementation. What is the

attractive() subroutine for? It is called after the energies for Fr(ij)

and b(ij)*Fa(ij) are summed with ev_tally(). It looks like a virial

component but I don't understand how it is applied.

that is part of the 3-body term. i don't know the tersoff implementation

that well, but the virial component is tallied later using v_tally3()

you'll have to read the sources and compare to the documentation

and probably also the reference papers for the tersoff potential...

axel.