atomium.data

Contains logic for turning data dictionaies into a parsed Python objects.

class atomium.data.File(filetype)[source]

When a file is parsed, the result is a File. It contains the structure of interest, as well as meta information.

Parameters:filetype (str) – the type of file that was parsed to make this.
assemblies

The structure’s biological assembly instructions.

Return type:list
authors

The structure’s authors.

Return type:list
classification

The structure’s formal classification.

Return type:str
code

The unique database identifer for this structure.

Return type:str
deposition_date

The date the structure was submitted for publication.

Return type:datetime.date
expression_system

The organism the structure was expressed in.

Return type:float
filetype

The filetype that this File was created from, such as .pdb or .cif.

Return type:str
keywords

The structure’s keyword descriptors.

Return type:list
model

The structure’s first model (and only model if it has only one).

Return type:Model
models

The structure’s models.

Return type:list
resolution

The structure’s resolution.

Return type:float
rfree

The structure’s R-free value.

Return type:float
rvalue

The structure’s R-value.

Return type:float
source_organism

The structure’s original organism.

Return type:float
technique

The structure’s experimental technique.

Return type:str
title

The structure’s text description.

Return type:str
atomium.data.atom_dict_to_atom(d, atom_id)[source]

Creates an Atom from an atom dictionary.

Parameters:
  • d (dict) – the atom dictionary.
  • id (int) – the atom’s ID.
Return type:

Atom

atomium.data.create_chains(model_dict)[source]

Creates a list of Chain objects from a model dictionary.

Parameters:model_dict (dict) – the model dictionary.
Return type:list
atomium.data.create_het(d, id, ligand=False, chain=None, water=False)[source]

Creates a Residue or Ligand from some atom-containing dictionary.

If there is multiple occupancy, only one position will be used.

Parameters:
  • d (dict) – the dictionary to parse.
  • id (str) – the ID of the structure to make.
  • ligand (bool) – if True a ligand will be made, not a residue.
  • chain (Chain) – the Chain to assign if a ligand.
  • water (bool) – if True, the ligand will be a water ligand.
Return type:

Residue or Ligand

atomium.data.create_ligands(model_dict, chains, water=False)[source]

Creates a list of Ligand objects from a model dictionary.

Parameters:
  • model_dict (dict) – the model dictionary.
  • chains (list) – a list of Chain objects to assign by ID.
  • water (bool) – if True`, water ligands will be made.
Return type:

list

atomium.data.data_dict_to_file(data_dict, filetype)[source]

Turns an atomium data dictionary into a File.

Parameters:
  • data_dict (dict) – the data dictionary to parse.
  • filetype (str) – the file type that is being converted.
Return type:

File

atomium.data.model_dict_to_model(model_dict)[source]

Takes a model dictionary and turns it into a fully processed Model object.

Parameters:model_dict (dict) – the model dictionary.
Return type:Model