Contains the code for dealing with and defining atomium data dictionaries.[source]

Takes a list of model dictionaries, and for each it goes through the atoms, and creates dictionaries for chains, residues and ligands based on the IDs it finds in the atoms. The model dictionaries are updated in place.

Parameters:models (list) – The list of model dictionaries.[source]

Takes an atomium data dictionary and turns it into a File object.

Parameters:d (dict) – The atomium data dictionary.
Return type:File[source]

Takes an atomium model dictionary, and turns it into a Model object.

Parameters:m (dict) – The dictionary to read.
Return type:Model[source]

Converts an atom dict to a Atom.

Parameters:atom_dict (dict) – The atom dictionary to load.
Return type:Atom, het_dict, model)[source]

Creates either a Residue or Ligand from the relevant dictionary, as well as a source of atom dictionaries and a Model to update.

  • het (dict) – The residue/ligand dictionary to read.
  • atom_dicts (list) – The list of atom dictionaries to look through.
  • model (Model) – The Model to update.
Return type:

Ligand or Residue, connections)[source]

Bonds the atoms of a Model in a sensible way.

  • model (Model) – The Model to be connected up.
  • connections (list) – The list of connections to use., bonds)[source]

Takes some Residue objects and bonds together its atoms internally, using a dict and the residue names as a reference.

  • residues – A collection of Residues.
  • d (dict) – The reference dict[source]

Takes some Residue objects and bonds them together with peptide bonds. If the relevant atoms are more than 5 Angstroms apart, no bond will be made.

Parameters:residues – A collection of Residues.`, connections)[source]

Takes a Model and a connections list and connects the atoms according to the specifications in the list.

  • model (Model) – A Model to connect up.
  • connections (list) – The connections list from a data dictionary