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.
- property assemblies
The structure’s biological assembly instructions.
- Return type
list
- property authors
The structure’s authors.
- Return type
list
- property classification
The structure’s formal classification.
- Return type
str
- property code
The unique database identifer for this structure.
- Return type
str
- property deposition_date
The date the structure was submitted for publication.
- Return type
datetime.date
- property expression_system
The organism the structure was expressed in.
- Return type
float
- property filetype
The filetype that this File was created from, such as .pdb or .cif.
- Return type
str
- generate_assembly(id)[source]
Generates a new model from the existing model using one of the file’s set of assembly instructions (for which you provide the ID).
For example:
>>> import atomium >>> pdb = atomium.fetch('1xda') >>> pdb.model <Model (8 chains, 16 ligands)> >>> pdb.generate_assembly(1) <Model (2 chains, 4 ligands)> >>> pdb.generate_assembly(5) <Model (12 chains, 24 ligands)>
- Parameters
id (int) – the ID of the assembly to generate.
- Return type
Model
- property keywords
The structure’s keyword descriptors.
- Return type
list
- property missing_residues
The residues that should be in the model but aren’t.
- Return type
list
- property model
The structure’s first model (and only model if it has only one).
- Return type
Model
- property models
The structure’s models.
- Return type
list
- property resolution
The structure’s resolution.
- Return type
float
- property rfree
The structure’s R-free value.
- Return type
float
- property rvalue
The structure’s R-value.
- Return type
float
- property source_organism
The structure’s original organism.
- Return type
float
- property technique
The structure’s experimental technique.
- Return type
str
- property 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
orLigand
from some atom-containing dictionary.If there is multiple occupancy, only one position will be used.
- 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