Dear LAMMPS users,
I’m struggling to understand atom.rmass.
The documentation and a previous thread (https://lammps.sandia.gov/threads/msg22749.html) tell me that it is a per-atom mass, and is used when using atoms of type sphere.
However, when writing a custom pair potential, and applying it to atoms of type sphere, I find that the contents of double *rmass = atom->rmass in the .cpp file, I get an array of what appears to be garbage values.
I am initialising my system by reading from a data file which sets unit densities and varying diameters, before setting the mass in the input file with “set atom * mass 1”, which I believe sets a per-atom mass (https://lammps.sandia.gov/doc/set.html).
If I output the masses in my dump file, I get the masses I am expecting to get, suggesting that rmass is not the relevant mass array in my case. I don’t understand why it isn’t, and would like to remedy this lack of understanding.
I find the same behaviour if I edit the colloid potential to print rmass and run the colloid example.
However, if I print rmass in the granular example, I do not get garbage.
Would someone be able to help me understand what determines which mass array is the relevant mass array?
Best wishes,
Rahul