atomium.files.data

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

atomium.files.data.generate_higher_structures(models)[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.
atomium.files.data.data_dict_to_file(d)[source]

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

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

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

Parameters:m (dict) – The dictionary to read.
Return type:Model
atomium.files.data.atom_dict_to_atom(atom_dict)[source]

Converts an atom dict to a Atom.

Parameters:atom_dict (dict) – The atom dictionary to load.
Return type:Atom
atomium.files.data.create_het(het_atom_dicts, 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.

Parameters:
  • 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

atomium.files.data.bond_atoms(model, connections)[source]

Bonds the atoms of a Model in a sensible way.

Parameters:
  • model (Model) – The Model to be connected up.
  • connections (list) – The list of connections to use.
atomium.files.data.make_intra_residue_bonds(residues, bonds)[source]

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

Parameters:
  • residues – A collection of Residues.
  • d (dict) – The reference dict
atomium.files.data.make_inter_residue_bonds(residues)[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.`
atomium.files.data.make_connections_bonds(model, connections)[source]

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

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