Contribution of potentials for coarse-grained PLUM protein model

I have implemented two potentials from the PLUM model and would like to contribute these back to LAMMPS.

One potential is six-bodied, and I have not calculated the virial coefficients. So, it’s applicable to NVT and NVE only. In its current state, would this be of any interest to the LAMMPS developers?

Best regards,

Gil Rutter

hi gil,

I have implemented two potentials from the PLUM model and would like to
contribute these back to LAMMPS.

this is much appreciated.

One potential is six-bodied, and I have not calculated the virial
coefficients. So, it's applicable to NVT and NVE only. In its current state,
would this be of any interest to the LAMMPS developers?

the requirements to including potentials in LAMMPS are fairly low, if
you are willing to have them added to the USER-MISC package. the code
needs to compile and run without negatively impacting other LAMMPS
features (usually not a problem with pair styles), and it needs to
have a documentation .txt file similar the ones in the doc folder
(.html files are automatically generated from .txt files).

the issue with the lack of a virial can be handled by inserting code
that prints a suitable warning when the virial is requested.

axel.

Gil - thanks for implementing this for LAMMPS.

Actually, it will be nearly every simulation that
wants a virial. This is b/c pressures are
almost always computed. LAMMPS can often
compute the global virial automatically if you
add one line at the bottom of the compute function in
the pair style. Have you tried that?

For per-atom energy and per-atom stress you typically
need to just add 1/2 lines in various places where contributions
to the energy/force on one or more atoms is calculated.
See any anybody potential for examples, e.g. pair terse
or pair airebo (another 6-body potential). We can help
with this part if needed.

Steve

Thanks Axel. I am working on getting the code into the required state. I have added an error when the virial is requested:

if (vflag)
{
error->all(FLERR,“Cannot compute virial coefficients for pair style PLUM/HB: Not implemented”);
}

Currently placed in the compute method.

However, this error is triggered even with a very simple input script which uses nothing more than atom_style molecular, read_data, pair commands, and run. What conditions do I need to be aware of to ensure vflag is not on?

Thanks Axel. I am working on getting the code into the required state. I
have added an error when the virial is requested:

if (vflag)
{
   error->all(FLERR,"Cannot compute virial coefficients for pair style
PLUM/HB: Not implemented");
}

Currently placed in the compute method.

However, this error is triggered even with a very simple input script which
uses nothing more than atom_style molecular, read_data, pair commands, and
run. What conditions do I need to be aware of to ensure vflag is not on?

steve already pointed out that the (global) virial is requested by
many parts in LAMMPS and in practice cannot be avoided.

this is why i suggested to print a warning (and there should be a flag
that the warning is only printed once).

axel.