Skip to content

Don't use indexing of AtomTypes for data access #508

@trisyoungs

Description

@trisyoungs

Many aspects of the code, in particular the PartialSets generated by the correlation function modules, rely on accessing square 2D arrays of data where the row/column indices are intended to correspond to the AtomTypes as ordered in an associated AtomTypeList.

This is satisfactory for single-configuration simulations which are, at present, the predominant use case, however such an access mechanism is inherently unreliable going forward, as the ordering (and hence indices) of objects in an AtomTypeList as constructed across different places in the code cannot be guaranteed to be consistent, or indeed complete.

The dependence on AtomType indices should be removed, and a more "dynamic" approach to accessing data in those objects should be considered. Typically, such operations are not used in time-critical portions of code, and so a suitable lookup-style approach should be sufficient.

Related to #289.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Scope: DesignRelated to fundamental code design, algorithm use etc.Type: EnhancementEnhancement for existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions