mmtbx.ions.utils module¶
- mmtbx.ions.utils.anonymize_ions(pdb_hierarchy, log=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)¶
Convert any elemental ions in the PDB hierarchy to water, resetting the occupancy and scaling the B-factor. The atom segids will be set to the old resname. NOTE: this does not change the corresponding scatterer in the xray structure, but a new xray structure can be obtained by calling hierarchy.extract_xray_structure(crystal_symmetry).
- Parameters:
pdb_hierarchy (iotbx.pdb.hierarchy.root)
log (file, optional)
- Returns:
iotbx.pdb.hierarchy.root – New pdb hierarchy with its ions anonymized
int – Number of atoms that were anonymized.
- mmtbx.ions.utils.collect_ions(pdb_hierarchy)¶
Collects a list of all ions in pdb_hierarchy.
- Parameters:
pdb_hierarchy (iotbx.pdb.hierarchy.root)
- Return type:
- mmtbx.ions.utils.compare_ions(hierarchy, reference_hierarchy, reference_xrs, distance_cutoff=2.0, log=None, ignore_elements=(), only_elements=(), sel_str_base='segid ION')¶
Compares two pdb structures to determine the number of ions that appear in the reference structure and are either matched or missing in the other structure.
- Parameters:
hierarchy (iotbx.pdb.hierarchy.root)
reference_hierarchy (iotbx.pdb.hierarchy.root)
reference_xrs
distance_cutoff (float, optional)
log (file, optional)
ignore_element (iterable, optional)
only_elements (iterable, optional)
sel_str_base (str, optional)
- Returns:
int – Number of ions in reference_hierarchy that were also found in hierarchy.
int – Number of ions in reference_hierarchy that were not found in hierarchy.
- mmtbx.ions.utils.count_coordinating_residues(nearby_atoms, distance_cutoff=3.0)¶
Count the number of residues of each type involved in the coordination sphere. This may yield additional clues to the identity of ions, e.g. only Zn will have 4 Cys residues.
- mmtbx.ions.utils.fit_gaussian(unit_cell, site_cart, real_map, radius=1.6)¶
Fit a gaussian function to the map around a site. Samples points in concentric spheres up to radius away from the site.
f(x) = a * exp(-b * x ** 2)
- Parameters:
- Returns:
float – Height of gaussian curve.
float – Spread of guassian curve.
See also
scitbx.math.gaussian_fit_1d_analytical
- mmtbx.ions.utils.sort_atoms_permutation(pdb_atoms, xray_structure)¶
Creates a list of atoms in pdb_atoms, sorted first by their atomic number, then by occupancy, and finally, by isotropic b-factor.
- Parameters:
pdb_atoms (iotbx.pdb.hierarchy.af_shared_atom)
xray_structure (cctbx.xray.structure.structure)
- Returns:
i_seqs of sorted atoms
- Return type:
flex.size_t of int