[lammps-users] eflag and vflag in definition of potentials, and comments in the code

Hi all,
what is the meaning of eflag and vflag say, for instance, in
pair_lj_cut.cpp in the src dir?
Are variables like these and the methods that use them commented
somewhere in the code?
Thank you, I have just started playing a bit with the source code.

Davide

Hi all,

hi davide!

what is the meaning of eflag and vflag say, for instance, in
pair_lj_cut.cpp in the src dir?

eflag != 0 means: compute energy contributions in this step
vflag != 0 means: compute virial contributions in this step

the exact value indicates whether per atom or total contributions
are supposed to be computed.

Are variables like these and the methods that use them commented
somewhere in the code?

have a look at pair.cpp and the particularly Pair::ev_setup()
and the Pair::ev_tally*() methods.

the in-file documentation is not quite as it should be.
given the way that LAMMPS is structured, it would be
a worthwhile project (particularly for somebody wanting
to learn the code) to convert the sources to doxygen
compatible sources and thus be easily to generate a
"programmers reference" from the code.

ciao,
   axel.