Class EnvironmentIndexer

EnvironmentIndexer links environment index and structure/atom indexes

Environments can be either full structures or centered on a specific atom. This class makes the link between two representations: a single, global, environment index, used by the map; and the structure/atom pair, used by the structure viewer and the general information panel.

Constructors

Methods

  • Get the indexes of atoms actually part of the environments for this structure

    Parameters

    • structure: number

    Returns number[]

  • Get the indexes of structure containing at least one atoms in the set of active environments for this structure

    Returns number[]

  • Get the total number of atom in the structure with given index

    Parameters

    • structure: number

    Returns number

  • Get a full set of indexes from the global environment index

    Parameters

    • environment: number

      global index of an environment

    • target: DisplayTarget

      display target, either structure or atom

    Returns Indexes

    full Indexes, containing the corresponding structure / atom indexes

  • Finds the first atom in the given structure that has associated data

    Parameters

    • structure: number

      index of the structure to search the corresponding Indexes

    • target: DisplayTarget

      display target (atom or structure)

    Returns undefined | Indexes

  • Get a full set of indexes from the structure/atom indexes

    Parameters

    • target: DisplayTarget

      display target, either atom or structure

    • structure: number

      index of the structure in the full structure list

    • Optionalatom: number

      index of the atom in the structure

    Returns undefined | Indexes

    an Indexes instance, containing the global environment index; or undefined if there is no environment corresponding to the given atom in the given structure

  • Does this Indexer knows about atom-centered environments?

    Returns boolean

  • Get the total number of structures we know about

    Returns number