CodeEntropy.levels.search module

These functions find neighbors.

There are different functions for different types of neighbor searching. Currently RAD is the default with grid as an alternative.

class CodeEntropy.levels.search.Search[source]

Bases: object

Class for functions to find neighbors.

get_RAD_neighbors(universe, mol_id, frame_source, frame_index)[source]

Find RAD neighbours of a molecule at one selected frame.

Parameters:
  • universe – MDAnalysis universe object for the active analysis system.

  • mol_id – Index of the central molecule.

  • frame_source – FrameSource controlling selected trajectory access.

  • frame_index – Frame index in the active analysis-universe index space.

Returns:

Indices of neighbouring molecules identified by RAD.

get_grid_neighbors(universe, mol_id, highest_level, frame_source, frame_index)[source]

Find neighbours using MDAnalysis grid search at one selected frame.

Parameters:
  • universe – MDAnalysis universe object for the active analysis system.

  • mol_id – Index of the molecule of interest.

  • highest_level – Molecule level, e.g. "united_atom" or "residue".

  • frame_source – FrameSource controlling selected trajectory access.

  • frame_index – Frame index in the active analysis-universe index space.

Returns:

Fragment indices of neighbouring molecules.