Kelvin Potential


I would like to add a potential to the lammps code.

I am looking to add a potential which only acts in specified regions, and which takes the relative change in distance between every pair of 2 atoms, of a given type, in the region and creates a force in the opposite direction (this is a type of thermostat to take out relative velocity but not group velocity or relative rotational velocity). I'm quite new to lammps.


You could look at pair dpd/tstat which does something similar.
There are no pair styles in LAMMPS that only operate within a “region”,

but you could add a couple if tests to that kind of pair style

to only invoke it when both atoms were in a region.

Alternatively you could write a fix which is a thermostat and
have it request a neighbor list and do the same kind of
looping over atoms and neighbors that a pair style does.