Package lib :: Package structure :: Package internal :: Module coordinates
[hide private]
[frames] | no frames]

Module coordinates

source code

Module for handling atomic coordinate information.

Functions [hide private]
list of str, list of str, list of int, list of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of str, int
assemble_atomic_coordinates(objects=None, object_names=None, molecules=None, models=None, atom_id=None)
Assemble the atomic coordinates of all structures.
source code
numpy rank-3 float64 array, list of str, list of str, list of int, list of str, list of str
assemble_coord_array(atom_pos=None, mol_names=None, res_names=None, res_nums=None, atom_names=None, elements=None, sequences=None, skip=None)
Assemble the atomic coordinates as a numpy array.
source code
str
generate_id(object_id=None, model=None, molecule=None)
Generate a unique ID.
source code
int, int or None, str
loop_coord_structures(objects=None, molecules=None, models=None, atom_id=None)
Generator function for looping over all internal structural objects, models and molecules.
source code
Variables [hide private]
  __package__ = 'lib.structure.internal'

Imports: array, float64, int16, zeros, RelaxFault


Function Details [hide private]

assemble_atomic_coordinates(objects=None, object_names=None, molecules=None, models=None, atom_id=None)

source code 

Assemble the atomic coordinates of all structures.

Parameters:
  • objects (list of str) - The list of internal structural objects to assemble the coordinates from.
  • object_names (list of str) - The list of names for each structural object to use in printouts.
  • models (None or list of lists of int) - The list of models for each structural object. The number of elements must match the objects argument. If set to None, then all models will be used.
  • molecules (None or list of lists of str) - The list of molecules for each structural object. The number of elements must match the objects argument. If set to None, then all molecules will be used.
  • atom_id (None or str) - The molecule, residue, and atom identifier string of the coordinates of interest. This matches the spin ID string format.
Returns: list of str, list of str, list of int, list of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of list of dict of str, list of str, int
The list of structure IDs for each molecule, the object ID list per molecule, the model number list per molecule, the molecule name list per molecule, the atom positions per molecule and per residue, the molecule names per molecule and per residue, the residue names per molecule and per residue, the residue numbers per molecule and per residue, the atom names per molecule and per residue, the atomic elements per molecule and per residue, the one letter codes for the residue sequence, the number of molecules.

assemble_coord_array(atom_pos=None, mol_names=None, res_names=None, res_nums=None, atom_names=None, elements=None, sequences=None, skip=None)

source code 

Assemble the atomic coordinates as a numpy array.

Parameters:
  • sequences (list of str) - The list of residue sequences for the alignment as one letter codes.
Returns: numpy rank-3 float64 array, list of str, list of str, list of int, list of str, list of str
The array of atomic coordinates (first dimension is the model and/or molecule, the second are the atoms, and the third are the coordinates); the common list of molecule names; the common list of residue names; the common list of residue numbers; the common list of atom names; the common list of element names.

generate_id(object_id=None, model=None, molecule=None)

source code 

Generate a unique ID.

Parameters:
  • object_id (str) - The structural object ID.
  • model (int) - The model number.
  • molecule (str) - The molecule name.
Returns: str
The unique ID constructed from the object ID, model number and molecule name.

loop_coord_structures(objects=None, molecules=None, models=None, atom_id=None)

source code 

Generator function for looping over all internal structural objects, models and molecules.

Parameters:
  • objects (list of str) - The list of internal structural objects to loop over.
  • models (None or list of lists of int) - The list of models for each structural object. The number of elements must match the objects argument. If set to None, then all models will be used.
  • molecules (None or list of lists of str) - The list of molecules for each structural object. The number of elements must match the objects argument. If set to None, then all molecules will be used.
  • atom_id (None or str) - The molecule, residue, and atom identifier string of the coordinates of interest. This matches the spin ID string format.
Returns: int, int or None, str
The structural object index, model number, and molecule name.