disorderedmaterials / dissolve

Structure refinement software for total scattering data
GNU General Public License v3.0
9 stars 16 forks source link

fix: AtomType Indexing #1938

Closed trisyoungs closed 2 weeks ago

trisyoungs commented 2 weeks ago

This PR starts to touch on the painful world of indices associated to our AtomTypes, relating to #289 and #508.

Here we begin by removing the local index storage from the AtomTypeData class and modify AtomTypeMix to only allow add()ing atom types, prohibiting remove() operations. This indexing is _still_copied over to Atoms making up a Configuration since there is no faster way of accessing the 2D array when computing forces and energies between atoms, but at least we remove one piece of easily-broken storage in a class.

Works towards #289.