mmtbx.ions package¶
Subpackages¶
- mmtbx.ions.svm package
- Submodules
- Module contents
ion_anomalous_vector()
ion_class()
ion_electron_density_vector()
ion_geometry_vector()
ion_model_vector()
ion_nearby_atoms_vector()
ion_valence_vector()
ion_vector()
manager
predict_ion()
svm_prediction
svm_prediction.i_seq
svm_prediction.pdb_id_str
svm_prediction.atom_info_str
svm_prediction.map_stats
svm_prediction.atom_types
svm_prediction.scores
svm_prediction.final_choice
svm_prediction.atom_info_str
svm_prediction.atom_types
svm_prediction.final_choice
svm_prediction.i_seq
svm_prediction.map_stats
svm_prediction.pdb_id_str
svm_prediction.scores
svm_prediction.show()
svm_prediction.show_brief()
Submodules¶
- mmtbx.ions.build module
- mmtbx.ions.environment module
ChemicalEnvironment
ChemicalEnvironment.atom
ChemicalEnvironment.contacts
ChemicalEnvironment.contacts_no_alts
ChemicalEnvironment.chemistry
ChemicalEnvironment.geometry
ChemicalEnvironment.atom
ChemicalEnvironment.chemistry
ChemicalEnvironment.contacts
ChemicalEnvironment.contacts_no_alts
ChemicalEnvironment.geometry
ChemicalEnvironment.get_valence()
ScatteringEnvironment
ScatteringEnvironment.d_min
ScatteringEnvironment.wavelengeth
ScatteringEnvironment.fp
ScatteringEnvironment.fpp
ScatteringEnvironment.b_iso
ScatteringEnvironment.b_mean_hoh
ScatteringEnvironment.occ
ScatteringEnvironment.fo_density
ScatteringEnvironment.fofo_density
ScatteringEnvironment.anom_density
ScatteringEnvironment.pai
ScatteringEnvironment.anom_density
ScatteringEnvironment.b_iso
ScatteringEnvironment.b_mean_hoh
ScatteringEnvironment.d_min
ScatteringEnvironment.fo_density
ScatteringEnvironment.fofc_density
ScatteringEnvironment.fp
ScatteringEnvironment.fpp
ScatteringEnvironment.occ
ScatteringEnvironment.pai
ScatteringEnvironment.wavelength
atom_contact
atom_contact.atom
atom_contact.charge
atom_contact.element
atom_contact.rt_mx
atom_contact.site_cart
atom_contact.vector
atom_contact.altloc()
atom_contact.atom
atom_contact.atom_i_seq()
atom_contact.atom_id_no_altloc()
atom_contact.atom_name()
atom_contact.charge
atom_contact.distance()
atom_contact.distance_from()
atom_contact.element
atom_contact.id_str()
atom_contact.is_carboxy_terminus
atom_contact.occ
atom_contact.resname()
atom_contact.rt_mx
atom_contact.site_cart
atom_contact.vector
find_nearby_atoms()
- mmtbx.ions.geometry module
- mmtbx.ions.halides module
- mmtbx.ions.identify module
AtomProperties
AtomProperties.ANOM_PEAK
AtomProperties.BAD_COORD_ATOM
AtomProperties.BAD_COORD_RESIDUE
AtomProperties.BAD_FPP
AtomProperties.BAD_GEOMETRY
AtomProperties.BAD_HALIDE
AtomProperties.BAD_VALENCES
AtomProperties.BAD_VECTORS
AtomProperties.CLOSE_CONTACT
AtomProperties.COORDING_GEOMETRY
AtomProperties.FOFC_HOLE
AtomProperties.FOFC_PEAK
AtomProperties.HIGH_2FOFC
AtomProperties.HIGH_B
AtomProperties.HIGH_OCC
AtomProperties.LIKE_COORD
AtomProperties.LOW_B
AtomProperties.LOW_OCC
AtomProperties.NO_2FOFC_PEAK
AtomProperties.NO_ANOM_PEAK
AtomProperties.NO_GEOMETRY
AtomProperties.TOO_FEW_COORD
AtomProperties.TOO_FEW_NON_WATERS
AtomProperties.TOO_MANY_COORD
AtomProperties.VERY_BAD_VALENCES
AtomProperties.atom_weight()
AtomProperties.check_fpp_ratio()
AtomProperties.check_ion_environment()
AtomProperties.error_strs
AtomProperties.get_atom_type()
AtomProperties.has_compatible_ligands()
AtomProperties.identity()
AtomProperties.is_compatible_anomalous_scattering()
AtomProperties.is_compatible_site()
AtomProperties.is_correctly_identified()
AtomProperties.looks_like_nucleotide_phosphate_site()
AtomProperties.number_of_atoms_within_radius()
AtomProperties.number_of_backbone_oxygens()
AtomProperties.number_of_favored_ligand_residues()
AtomProperties.show_ion_results()
AtomProperties.show_properties()
create_manager()
find_anomalous_scatterers()
ion_master_phil()
ion_result
ion_result.altloc
ion_result.atom_selection
ion_result.b_iso
ion_result.chain_id
ion_result.chem_env
ion_result.element
ion_result.icode
ion_result.model_id
ion_result.name
ion_result.occupancy
ion_result.outlier
ion_result.resname
ion_result.resseq
ion_result.scatter_env
ion_result.score
ion_result.segid
ion_result.show()
ion_result.show_brief()
ion_result.symop
ion_result.xyz
manager
manager.analyze_substructure()
manager.analyze_water()
manager.analyze_waters()
manager.find_nearby_atoms()
manager.get_b_iso()
manager.get_fp()
manager.get_fpp()
manager.get_initial_b_iso()
manager.get_map()
manager.get_map_gaussian_fit()
manager.get_map_sphere_variance()
manager.get_strict_valence_flag()
manager.guess_b_iso_real()
manager.guess_molecular_weight()
manager.looks_like_halide_ion()
manager.map_stats()
manager.principal_axes_of_inertia()
manager.refine_anomalous_substructure()
manager.show_current_scattering_statistics()
manager.update_maps()
manager.update_structure()
manager.validate_ion()
manager.validate_ions()
manager.water_selection()
water_result
- mmtbx.ions.utils module
Module contents¶
This package is used to model elemental ions in crystal structures. It handles both identification and building of ions, but relies on the solvent module to flag candidate sites for screening.
Notes
- class mmtbx.ions.atom_type_flags(name)¶
Bases:
object
Simple container for information about the identity of an atom via a set of enumerated boolean flags. The responsibility for toggling these flags based on analysis of the site is left to external code.
- Parameters:
name (element symbol or HOH)
Examples
>>> flags = atom_type_flags("HOH") >>> if (fofc_map_value > 3.0): ... flags.high_fofc = True
- bad_coord_atom¶
- bad_coord_residue¶
- bad_geom¶
- bad_halide¶
- bad_valence¶
- bad_vectors¶
- close_contact¶
- coord_geom¶
- flag_names_and_labels = [('low_b_iso', 'Abnormally low B-factor'), ('high_occ', 'Abnormally high occupancy'), ('high_fofc', 'mFo-DFc peak'), ('high_two_fofc', 'Abnormally high 2mFo-DFc map value'), ('high_anom', 'Anomalous map peak'), ('high_fdp', "Abnormally high refined f''"), ('high_b_iso', 'Abnormally high B-factor'), ('low_occ', 'Abnormally low occupancy'), ('low_two_fofc', 'Low 2mFo-DFc map value'), ('low_fofc', 'mFo-DFc hole'), ('low_anom', 'Poor anomalous map value'), ('low_fdp', "Abnormally low refined f''"), ('bad_geom', 'Unexpected coordination geometry'), ('missing_geom', 'No recognizable coordination geometry'), ('bad_vectors', 'Bad coordination vectors'), ('bad_valence', 'Bad bond valence sum'), ('too_few_non_waters', 'Too few non-water coordinating atoms'), ('too_few_coord', 'Too few coordinating atoms'), ('too_many_coord', 'Too many coordinating atoms'), ('like_coord', 'Coordinating atom of same charge'), ('bad_coord_atom', 'Disallowed or unusual coordinating atom'), ('bad_coord_residue', 'Disallowed or unusual coordinating residue'), ('very_bad_valence', 'Very bad bond valence sum'), ('bad_halide', 'Poor halide site'), ('coord_geom', 'Appears to be coordinating another site with distinct geometry'), ('close_contact', 'Unusually close contact to oxygen atom')]¶
Retrieve a list of strings describing the issues that have been identified. These will have ‘+++’ or ‘—’ appended if they indicate that the actual element is heavier or lighter than the current refined scatterer type.
- high_anom¶
- high_b_iso¶
- high_fdp¶
- high_fofc¶
- high_occ¶
- high_two_fofc¶
- like_coord¶
- low_anom¶
- low_b_iso¶
- low_fdp¶
- low_fofc¶
- low_occ¶
- low_two_fofc¶
- missing_geom¶
- name¶
- show(out=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, prefix='')¶
Print out a list of all issues that have been identified.
- too_few_coord¶
- too_few_non_waters¶
- too_many_coord¶
- very_bad_valence¶
- mmtbx.ions.check_supported(elements)¶
Checks if elements are supported by ion identitication process.
Examples
>>> from mmtbx.ions import check_supported >>> check_supported(["CA", "ZN", "FE"]) True
- class mmtbx.ions.metal_parameters(**keyword_arguments)¶
Bases:
group_args
- scattering_type()¶
Makes a string showing the element and its associated charge. Note that this format is slightly different from the __str__ method, which puts the +/- between the element symbol and the charge number.
- Return type:
Examples
>>> from mmtbx.ions import metal_parameters >>> print metal_parameters(element="FE", charge=3) FE+3 >>> print metal_parameters(element="FE", charge=3).scattering_type() FE3+ >>> print metal_parameters(element="CL", charge=-1).scattering_type() CL1-
- class mmtbx.ions.parameter_server¶
Bases:
slots_getstate_setstate
Class for retrieving information from ion_parameters.cif
- params¶
- Type:
- calculate_valence(ion, donor, distance)¶
Calculates the single valence contribution of one ion donor pair, separated by distance. ion and donor should be AtomGuess objects.
- Parameters:
donor (mmtbx.ions.metal_parameters)
distance (float)
- Return type:
Examples
>>> from mmtbx.ions import server, metal_parameters >>> ion = server.get_metal_parameters("ZN") >>> donor = metal_parameters(element="N", charge="-3") >>> valence = server.calculate_valence(ion, donor, 2.20) >>> print round(valence, 2) 0.31
- calculate_valences(ion, nearby_atoms)¶
Calculates all of the valence contributions between ion and each atom of nearby_atoms, each element of which should be a tuple of an atom and a vector from the ion’s location.
- Parameters:
nearby_atoms (list of mmtbx.ions.environment.atom_contact)
- Returns:
List of vectors, whose magnitudes are equal to the valence contributions from each donor atom.
- Return type:
Examples
>>> from libtbx import group_args >>> from iotbx.pdb.hierarchy import atom >>> from mmtbx.ions import server >>> from mmtbx.ions.environment import atom_contact >>> from scitbx.matrix import rec >>> ion = server.get_metal_parameters("ZN") >>> vector_1 = rec([2.0, 0, 0], [1, 3]) >>> vector_2 = rec([-2.0, 0, 0], [1, 3]) >>> vector_3 = rec([0, 2.0, 0], [1, 3]) >>> vector_4 = rec([0, 0, 2.0], [1, 3]) >>> atom_dummy = atom() >>> atom_dummy.element = "N" >>> atom_dummy.charge = "-3" >>> atom_dummy.occ = 1 >>> atom_dummy.parent = lambda: group_args(atoms=lambda: []) >>> donors = [atom_contact(atom_dummy, vector_1, None, None), ... atom_contact(atom_dummy, vector_2, None, None), ... atom_contact(atom_dummy, vector_3, None, None), ... atom_contact(atom_dummy, vector_4, None, None)] >>> vectors = server.calculate_valences(ion, donors) >>> bvs = sum(abs(i) for i in vectors) >>> print round(bvs, 2) 2.15
- get_charge(atom)¶
Gets the charge associated with an atom or element.
- Parameters:
atom (iotbx.pdb.hierarchy.atom or str)
- Return type:
Examples
>>> from iotbx.pdb.hierarchy import atom >>> from mmtbx.ions import server >>> atom_dummy = atom() >>> atom_dummy.element = "N" >>> atom_dummy.charge = "-3" >>> print server.get_charge(atom_dummy) -3 >>> print server.get_charge("N") -3
- get_charges(atom)¶
Retrieves all charges that are expected to be associated with an atom or element within ion_parameters.cif. This list is manually updated based on the ligand IDs listed by the PDB.
- Parameters:
atom (iotbx.pdb.hierarchy.atom or str)
- Return type:
Examples
>>> from mmtbx.ions import server >>> print server.get_charges("CU") [1, 2, 3] >>> print server.get_charges("ZN") [2]
- get_element(atom)¶
Gets the element associated with an atom.
- Parameters:
atom (iotbx.pdb.hierarchy.atom or str)
- Return type:
- get_metal_parameters(element)¶
Gets all metal parameters associated with an element.
- Parameters:
element (str)
- Return type:
mmtbx.ions.metal_parameters or None
- get_valence_params(atom1, atom2)¶
Gets the valence parameters (r_0 and b) used for calculating valences from bond distances.
- Parameters:
atom1 (mmtbx.ions.metal_parameters)
atom2 (mmtbx.ions.metal_parameters)
- Returns:
float or None – r_0 in the equation exp((r - r_0) / b)
float or None – b in the equation exp((r - r_0) / b)
Examples
>>> from mmtbx.ions import server, metal_parameters >>> zn_params = metal_parameters(element="ZN", charge=2) >>> n_params = metal_parameters(element="N", charge=-3) >>> print server.get_valence_params(zn_params, n_params) (1.77, 0.37)
- is_supported_donor(symbol)¶
Checks if an element is a supported donor atom.
- is_supported_element(symbol)¶
Checks if symbol is a supported element by this parameter server.
- params¶