Adding attributes to an new atom style

I wanted to add an attribute to the sphere style, a per atom scaling factor for the radius. To do so I created a new particle style. However to get proper access to the attribute I had to also add it to the atom base class and set class.

Is that correct way or is there another way that avoid changing the atom and set classes.

Thanks in advance,


If the way you are planning to use the additional info is compatible with fix property/atom, then that is usually the simplest way to go. This fix simply stores per-atom data and makes sure it is communicated properly across processors etc…
The code that needs this per-atom property can then grab this data by extracting the data from the fix.