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()managerpredict_ion()svm_predictionsvm_prediction.i_seqsvm_prediction.pdb_id_strsvm_prediction.atom_info_strsvm_prediction.map_statssvm_prediction.atom_typessvm_prediction.scoressvm_prediction.final_choicesvm_prediction.atom_info_strsvm_prediction.atom_typessvm_prediction.final_choicesvm_prediction.i_seqsvm_prediction.map_statssvm_prediction.pdb_id_strsvm_prediction.scoressvm_prediction.show()svm_prediction.show_brief()
Submodules¶
- mmtbx.ions.build module
- mmtbx.ions.environment module
ChemicalEnvironmentChemicalEnvironment.atomChemicalEnvironment.contactsChemicalEnvironment.contacts_no_altsChemicalEnvironment.chemistryChemicalEnvironment.geometryChemicalEnvironment.atomChemicalEnvironment.chemistryChemicalEnvironment.contactsChemicalEnvironment.contacts_no_altsChemicalEnvironment.geometryChemicalEnvironment.get_valence()
ScatteringEnvironmentScatteringEnvironment.d_minScatteringEnvironment.wavelengethScatteringEnvironment.fpScatteringEnvironment.fppScatteringEnvironment.b_isoScatteringEnvironment.b_mean_hohScatteringEnvironment.occScatteringEnvironment.fo_densityScatteringEnvironment.fofo_densityScatteringEnvironment.anom_densityScatteringEnvironment.paiScatteringEnvironment.anom_densityScatteringEnvironment.b_isoScatteringEnvironment.b_mean_hohScatteringEnvironment.d_minScatteringEnvironment.fo_densityScatteringEnvironment.fofc_densityScatteringEnvironment.fpScatteringEnvironment.fppScatteringEnvironment.occScatteringEnvironment.paiScatteringEnvironment.wavelength
atom_contactatom_contact.atomatom_contact.chargeatom_contact.elementatom_contact.rt_mxatom_contact.site_cartatom_contact.vectoratom_contact.altloc()atom_contact.atomatom_contact.atom_i_seq()atom_contact.atom_id_no_altloc()atom_contact.atom_name()atom_contact.chargeatom_contact.distance()atom_contact.distance_from()atom_contact.elementatom_contact.id_str()atom_contact.is_carboxy_terminusatom_contact.occatom_contact.resname()atom_contact.rt_mxatom_contact.site_cartatom_contact.vector
find_nearby_atoms()
- mmtbx.ions.geometry module
- mmtbx.ions.halides module
- mmtbx.ions.identify module
AtomPropertiesAtomProperties.ANOM_PEAKAtomProperties.BAD_COORD_ATOMAtomProperties.BAD_COORD_RESIDUEAtomProperties.BAD_FPPAtomProperties.BAD_GEOMETRYAtomProperties.BAD_HALIDEAtomProperties.BAD_VALENCESAtomProperties.BAD_VECTORSAtomProperties.CLOSE_CONTACTAtomProperties.COORDING_GEOMETRYAtomProperties.FOFC_HOLEAtomProperties.FOFC_PEAKAtomProperties.HIGH_2FOFCAtomProperties.HIGH_BAtomProperties.HIGH_OCCAtomProperties.LIKE_COORDAtomProperties.LOW_BAtomProperties.LOW_OCCAtomProperties.NO_2FOFC_PEAKAtomProperties.NO_ANOM_PEAKAtomProperties.NO_GEOMETRYAtomProperties.TOO_FEW_COORDAtomProperties.TOO_FEW_NON_WATERSAtomProperties.TOO_MANY_COORDAtomProperties.VERY_BAD_VALENCESAtomProperties.atom_weight()AtomProperties.check_fpp_ratio()AtomProperties.check_ion_environment()AtomProperties.error_strsAtomProperties.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_resultion_result.altlocion_result.atom_selectionion_result.b_isoion_result.chain_idion_result.chem_envion_result.elemention_result.icodeion_result.model_idion_result.nameion_result.occupancyion_result.outlierion_result.resnameion_result.resseqion_result.scatter_envion_result.scoreion_result.segidion_result.show()ion_result.show_brief()ion_result.symopion_result.xyz
managermanager.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:
objectSimple 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')]¶
- get_flag_captions()¶
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_setstateClass 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¶