Does the latest version of LAMMPS support adding user-defined atom_style via plugin?

Dear all,

I’m trying to add a user-defined atom_style by way of plugin, the purpose is to add some internal variables to the atom, which need to be updated in the calculation. With the help of this webpage, I am able to emb my own fix and compute style correctly. But when I try to integrate my own class AtomVecMyperi : virtual public AtomVec as a plugin, I get the error “Loading plugins for atom styles not yet implemented”. The relevant registration code in my lammpsplugin_init function looks like

lammpsplugin_t plugin;
auto register_func = (lammpsplugin_regfunc) regfunc;

plugin.version = LAMMPS_VERSION;
plugin.style = "atom";
plugin.name = "mystyle";
...

(*register_func)(&plugin, lmp);

My questions are:

  1. Does the latest version of LAMMPS (“12 Jun 2025”) support adding user-defined atom_style via plugin?
  2. What kind of internal variables need to be put into a AtomVec? Assume a simple situation, each particle owns a “temperature”, which does not affect the force between particles, but needs to transfer part of the temperature (heat) to another particle when a collision occurs (close to each other). How should this routine be implemented?

Thank you for your attention!

My answers are:

  1. No, and it is not likely to happen. See below.

  2. There is a multi-part answer to this:
    a) there is already the edpd atom style in the DPD-MESO package that stores a per-particle temperature and then some.
    b) you can always add custom per-atom properties using fix property/atom
    c) the steps to add a new atom style are documented in the manual: 3.5. Atom styles — LAMMPS documentation

Because there is fix property/atom (which is used by several styles) and many existing atom styles, which can also be combined with a hybrid atom style, the barrier for getting code included into the LAMMPS distribution including a new atom style is higher than what it used to be.

Also, when the per-atom data is maintained by a fix, it is often sufficient to maintain that data within the fix only. Examples are the qeq fixes or the rigid/small fix variants but there are many more.

Update: I just remembered that it is not going to be possible to have plugins for atom styles, since they need changes to the Atom class and that cannot be overridden.

Thank you so much for your prompt and helpful response. I’ll follow your suggestion and believe that it will resolve my issue.