Informatics
Molecular Revised Autocorrelations
- molSimplify.Informatics.lacRACAssemble.generate_all_ligand_autocorrelation_derivatives_lac(mol, loud=False, depth=4, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
Utility for generating all ligand-based autocorrelation derivatives for a complex.
- Parameters:
mol (mol3D) – Molecule to get lc-RAC derivatives for.
loud (bool, optional) – Print debugging information, by default False.
depth (int, optional) – Depth of RACs to calculate, by default 4.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
custom_ligand_dict (bool, optional) – Dict of ligands if passed - see generate_descriptor_vector, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
- Returns:
results_dictionary – Dictionary of all geo-based ligand product descriptor derivatives (both full and connecting atom scopes) {‘colnames’: colnames, ‘result_ax_full’: result_ax_full, ‘result_eq_full’: result_eq_full, ‘result_ax_con’: result_ax_con, ‘result_eq_con’: result_eq_con}.
- Return type:
- molSimplify.Informatics.lacRACAssemble.generate_all_ligand_autocorrelations_lac(mol, loud=False, depth=4, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False, use_dist=False, size_normalize=False, custom_property_dict={})[source]
Utility for generating all ligand-based product autocorrelations for a complex.
- Parameters:
mol (mol3D) – Molecule to get lc-RACs for.
loud (bool, optional) – Print debugging information, by default False.
depth (int, optional) – Depth of RACs to calculate, by default 4.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
custom_ligand_dict (bool, optional) – Dict of ligands if passed - see generate_descriptor_vector, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
- Returns:
results_dictionary – Dictionary of all geo-based ligand product descriptors (both full and connecting atom scopes) - {‘colnames’: colnames, ‘result_ax_full’: result_ax_full, ‘result_eq_full’: result_eq_full, ‘result_ax_con’: result_ax_con, ‘result_eq_con’: result_eq_con}.
- Return type:
- molSimplify.Informatics.lacRACAssemble.generate_all_ligand_deltametric_derivatives_lac(mol, loud=False, depth=4, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
Utility for generating all ligand-based deltametric derivatives for a complex.
- Parameters:
mol (mol3D) – Molecule to get lc-RAC deltametric derivatives for.
loud (bool, optional) – Print debugging information, by default False.
depth (int, optional) – Depth of RACs to calculate, by default 4.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
custom_ligand_dict (bool, optional) – Dict of ligands if passed - see generate_descriptor_vector, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
- Returns:
results_dictionary – Dictionary of all geo-based ligand deltametric descriptor derivatives (both full and connecting atom scopes) - {‘colnames’: colnames, ‘result_ax_con’: result_ax_con, ‘result_eq_con’: result_eq_con}.
- Return type:
- molSimplify.Informatics.lacRACAssemble.generate_all_ligand_deltametrics_lac(mol, loud=False, depth=4, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False, use_dist=False, size_normalize=False, custom_property_dict={}, non_trivial=False)[source]
Utility for generating all ligand-based deltametric autocorrelations for a complex.
- Parameters:
mol (mol3D) – Molecule to get D_lc-RACs for.
loud (bool, optional) – Print debugging information, by default False.
depth (int, optional) – Depth of RACs to calculate, by default 4.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
custom_ligand_dict (bool, optional) – Dict of ligands if passed - see generate_descriptor_vector, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of atom from original, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
non_trivial (bool, optional) – Flag to exclude difference RACs of I, and depth zero difference RACs. These RACs are always zero. By default False.
- Returns:
results_dictionary – Dictionary of all geo-based ligand deltametric descriptors (both full and connecting atom scopes) - {‘colnames’: colnames, ‘result_ax_con’: result_ax_con, ‘result_eq_con’: result_eq_con}.
- Return type:
- molSimplify.Informatics.lacRACAssemble.generate_all_ligand_misc(mol, loud=False, custom_ligand_dict=False, smiles_charge=False)[source]
Get the ligand_misc_descriptors (axial vs. equatorial charge (from OBMol) and denticity).
custom_ligand_dict.keys() must be eq_ligands_list, ax_ligand_list ax_con_int_list, eq_con_int_list
- Parameters:
mol (mol3D) – Molecule to get the ligand_misc descriptors from.
loud (bool, optional) – Print debugging information, by default False.
custom_ligand_dict (bool, optional) – custom_ligand_dictionary if passed, by default False.
smiles_charge (bool, optional) – Whether or not to use the smiles charge assignment, default is False.
- Returns:
results_dictionary – Labels and results of ligand_misc RACs - {‘colnames’: colnames, ‘result_ax’: result_ax, ‘result_eq’: result_eq}. Ax. vs eq. charge (from OBMol) and denticity.
- Return type:
- molSimplify.Informatics.lacRACAssemble.get_descriptor_derivatives(this_complex, custom_ligand_dict=False, ox_modifier=False, lacRACs=True, depth=4, loud=False)[source]
Calculate and return all derivatives of RACs for a given octahedral complex.
- Parameters:
this_complex (mol3D) – Transition metal complex to be featurized.
custom_ligand_dict (bool, optional) – Custom ligand dictionary to evaluate for complex if passed, by default False. Skip the ligand breakdown steps - in cases where 3D geo is not correct/formed custom_ligand_dict.keys() must be eq_ligands_list, ax_ligand_list, ax_con_int_list, and eq_con_int_list, with types: eq/ax_ligand_list list of mol3D eq/ax_con_int_list list of list/tuple of int e.g., [[1,2] [1,2]]
ox_modifier (bool, optional) – dict, used to modify prop vector (e.g., for adding ONLY used with ox_nuclear_charge ox or charge) {“Fe”:2, “Co”: 3} etc., by default False.
lacRACs (bool, optional) – Use ligand_assign_consistent (lac) to assign ligands as equatorial and axial. if False, use ligand_assign_original (older), default True.
depth (int, optional) – Depth of RACs to calculate, by default 4.
loud (bool, optional) – Print debugging information, by default False.
- Returns:
descriptor_derivative_names (list) – Compiled list (matrix) of descriptor derivative names
descriptor_derivatives (list) – Derivatives of RACs w.r.t atomic props (matrix)
- molSimplify.Informatics.lacRACAssemble.get_descriptor_vector(this_complex, custom_ligand_dict=False, ox_modifier=False, NumB=False, Gval=False, lacRACs=True, loud=False, smiles_charge=False, eq_sym=False, use_dist=False, size_normalize=False, alleq=False, custom_property_dict={}, depth=3, non_trivial=False)[source]
Calculate and return all geo-based RACs for a given octahedral TM complex (featurize).
- Parameters:
this_complex (mol3D) – Transition metal complex to be featurized.
custom_ligand_dict (bool, optional) – Custom ligand dictionary to evaluate for complex if passed, by default False. Skip the ligand breakdown steps - in cases where 3D geo is not correct/formed custom_ligand_dict.keys() must be eq_ligands_list, ax_ligand_list, ax_con_int_list, and eq_con_int_list, with types: eq/ax_ligand_list list of mol3D eq/ax_con_int_list list of list/tuple of int e.g., [[1,2] [1,2]]
ox_modifier (bool, optional) – dict, used to modify prop vector (e.g., for adding ONLY used with ox_nuclear_charge ox or charge) {“Fe”: 2, “Co”: 3} etc., by default False.
NumB (bool, optional) – Use Number of Bonds as an atomic property, by default False.
Gval (bool, optional) – Use group number as an atomic property, by default False.
lacRACs (bool, optional) – Use ligand_assign_consistent (lac) to assign ligands as equatorial and axial. If False, use ligand_assign_original (older), default True.
loud (bool, optional) – Print debugging information, by default False.
smiles_charge (bool, optional) – Use obmol conversion through smiles to assign ligand_misc_charges, by default False.
eq_sym (bool, optional) – Enforce equatorial plane to have connecting atoms with same symbol. Default is False.
use_dist (bool, optional) – Whether or not CD-RACs used.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms.
alleq (bool, optional) – Whether or not all ligands are equatorial.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
depth (int, optional) – The maximum depth of the RACs (how many bonds out the RACs go). For example, if set to 3, depths considered will be 0, 1, 2, and 3.
non_trivial (bool, optional) – Flag to exclude difference RACs of I, and depth zero difference RACs. These RACs are always zero. By default False.
- Returns:
descriptor_names (list of str) – Compiled list of descriptor names.
descriptors (list of float) – Compiled list of descriptor values.
- molSimplify.Informatics.autocorrelation.append_descriptor_derivatives(descriptor_derivative_names, descriptor_derivatives, mat_of_names, dmat, prefix, suffix)[source]
Utility to build standardly formatted RACs derivatives.
- Parameters:
- Returns:
descriptor_derivative_names (list) – Compiled list (matrix) of descriptor derivative names.
descriptor_derivatives (list) – Derivatives of RACs w.r.t atomic props (matrix).
- molSimplify.Informatics.autocorrelation.append_descriptors(descriptor_names, descriptors, list_of_names, list_of_props, prefix, suffix, no_suffix=False)[source]
Utility to build standardly formatted RACs.
- Parameters:
descriptor_names (list) – Descriptors names list to be appended to.
descriptors (list) – Descriptors list to be appended to.
list_of_names (list) – Names to be added.
list_of_props (list) – Types of RACs.
prefix (str) – Prefix to be added to names.
suffix (str) – Suffix to be added to names.
no_suffix (bool) – Flag indicating whether to include suffix.
- Returns:
descriptor_names (list) – Compiled list of descriptor names.
descriptors (list) – Compiled list of descriptor values.
- molSimplify.Informatics.autocorrelation.atom_only_autocorrelation(mol, prop, d, atomIdx, oct=True, use_dist=False, size_normalize=False, custom_property_dict={})[source]
Calculate product autocorrelation vectors from a given atom or list of atoms.
- Parameters:
mol (mol3D) – Molecule to calculate atom-only autocorrelations from.
prop (str) – Property to evaluate.
d (int) – Maximum depth to calculate autocorrelation over. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
atomIdx (int or list of int) – Atoms from which the autocorrelation vector should be started. List of indices or a single index.
oct (bool, optional) – Use octahedral flag, by default True.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
- Returns:
autocorrelation_vector – List of atom-only autocorrelations.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.atom_only_autocorrelation_derivative(mol, prop, d, atomIdx, oct=True)[source]
Calculate product autocorrelation derivative vectors from a given atom or list of atoms (e.g., up to depth 4 from the connecting atoms).
- Parameters:
mol (mol3D) – Molecule to calculate atom-only autocorrelation derivatives from.
prop (str) – Property to evaluate.
d (int) – Maximum depth to calculate derivatives over. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
atomIdx (int or list of int) – Atoms from which the autocorrelation vector should be centered. List of indices or a single index.
oct (bool, optional) – Use octahedral flag, by default True.
- Returns:
autocorrelation_derivative_mat – List of atom-only autocorrelation derivatives.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.atom_only_deltametric(mol, prop, d, atomIdx, oct=True, modifier=False, use_dist=False, size_normalize=False, custom_property_dict={})[source]
Calculate deltametric autocorrelation vectors from a given atom or list of atoms.
- Parameters:
mol (mol3D) – Molecule to calculate atom-only deltametrics from.
prop (str) – Property to evaluate.
d (int) – Maximum depth to calculate deltametric over. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
atomIdx (int or list of int) – Atoms from which the autocorrelation vector should be started. List of indices or a single index.
oct (bool, optional) – Use octahedral flag, by default True.
modifier (bool, optional) – Use ox modifier, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
- Returns:
deltametric_vector – List of atom-only deltametric autocorrelations.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.atom_only_deltametric_derivative(mol, prop, d, atomIdx, oct=True, modifier=False)[source]
Calculate deltametric autocorrelation derivative vectors from a given atom or list of atoms (e.g., up to depth 4 from the connecting atoms).
- Parameters:
mol (mol3D) – Molecule to calculate atom-only deltametric autocorrelation derivatives from.
prop (str) – Property to evaluate.
d (int) – Maximum depth to calculate derivatives over. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
atomIdx (int or list of int) – Atoms from which the autocorrelation vector should be centered. List of indices or a single index.
oct (bool, optional) – Use octahedral flag, by default True.
modifier (bool, optional) – Use ox_modifier, by default False.
- Returns:
deltametric_derivative_mat – Matrix of atom-only deltametric autocorrelation derivatives.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.atom_only_ratiometric(mol, prop_num, prop_den, d, atomIdx, oct=True)[source]
- molSimplify.Informatics.autocorrelation.atom_only_summetric(mol, prop, d, atomIdx, oct=True)[source]
- molSimplify.Informatics.autocorrelation.autocorrelation(mol, prop_vec, orig, d, oct=True, use_dist=False, size_normalize=False)[source]
Calculate and return the products autocorrelation.
- Parameters:
mol (mol3D) – mol3D object to calculate autocorrelation over.
prop_vec (np.array) – Property of atoms in mol in order of index.
orig (int) – Zero-indexed starting atom.
d (int) – Maximum number of hops to travel. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Flag is octahedral complex, by default True.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
- Returns:
result_vector – Assembled products autocorrelations.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.autocorrelation_catoms(mol, prop_vec, orig, d, oct=True, catoms=None)[source]
- molSimplify.Informatics.autocorrelation.autocorrelation_derivative(mol, prop_vec, orig, d, oct=True)[source]
Returns derivative vector of products autocorrelations.
- Parameters:
mol (mol3D) – mol3D object to calculate derivatives over.
prop_vec (np.array) – Property of atoms in mol in order of index.
orig (int) – Zero-indexed starting atom.
d (int) – Maximum number of hops to travel. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Flag is octahedral complex, by default True.
- Returns:
derivative_mat – RAC derivatives matrix.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.construct_property_vector(mol, prop, oct=True, modifier=False, custom_property_dict={}, transition_metals_only=True)[source]
Assigns the value of property for atom i (zero index) in mol to position i in returned vector.
- Parameters:
mol (mol3D) – Molecule to generate property vector for.
prop (str) – Property to generate vector for - Acceptable prop values: [‘electronegativity’, ‘nuclear_charge’, ‘ident’, ‘topology’, ‘ox_nuclear_charge’, ‘size’, ‘vdwrad’, ‘group_number’, ‘polarizability’, ‘bondvalence’, ‘num_bonds’, ‘bondvalence_devi’, ‘bodavrg’, ‘bodstd’, ‘charge’]
oct (bool, optional) – Flag if octahedral complex, by default True.
modifier (bool, optional) – If passed - dict, used to modify prop vector (e.g., for adding ONLY used with ox_nuclear_charge ox or charge) {“Fe”:2, “Co”: 3} etc., by default False.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
w – Property vector for mol by atom.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.deltametric(mol, prop_vec, orig, d, oct=True, use_dist=False, size_normalize=False)[source]
Returns the deltametric autocorrelation.
- Parameters:
mol (mol3D) – mol3D object to calculate deltametric autocorrelation over.
prop_vec (np.array) – Property of atoms in mol in order of index.
orig (int) – Zero-indexed starting atom.
d (int) – Maximum number of hops to travel. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Flag is octahedral complex, by default True.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
- Returns:
results_vector – Deltametric autocorrelations.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.deltametric_catoms(mol, prop_vec, orig, d, oct=True, catoms=None)[source]
- molSimplify.Informatics.autocorrelation.deltametric_derivative(mol, prop_vec, orig, d, oct=True)[source]
Returns the deltametric autocorrelation derivative vector.
- Parameters:
mol (mol3D) – mol3D object to calculate deltametric autocorrelation derivative over.
prop_vec (np.array) – Property of atoms in mol in order of index.
orig (int) – Zero-indexed starting atom.
d (int) – Maximum number of hops to travel. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Flag is octahedral complex, by default True.
- Returns:
derivative_mat – Deltametric autocorrelation derivatives matrix.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.find_ligand_autocorrelation_derivatives_oct(mol, prop, loud, depth, name=False, oct=True, custom_ligand_dict=False)[source]
- molSimplify.Informatics.autocorrelation.find_ligand_autocorrelations_oct(mol, prop, loud, depth, name=False, oct=True, custom_ligand_dict=False)[source]
- molSimplify.Informatics.autocorrelation.find_ligand_autocorrs_and_deltametrics_oct_dimers(mol, prop, depth, name=False, oct=True, custom_ligand_dict=False)[source]
- molSimplify.Informatics.autocorrelation.find_ligand_deltametric_derivatives_oct(mol, prop, loud, depth, name=False, oct=True, custom_ligand_dict=False)[source]
- molSimplify.Informatics.autocorrelation.find_ligand_deltametrics_oct(mol, prop, loud, depth, name=False, oct=True, custom_ligand_dict=False)[source]
- molSimplify.Informatics.autocorrelation.full_autocorrelation(mol, prop, d, oct=True, modifier=False, use_dist=False, size_normalize=False, custom_property_dict={}, transition_metals_only=True)[source]
Calculate full scope product autocorrelations (i.e., start at every atom, and branch out up to depth d).
- Parameters:
mol (mol3D) – Molecule to calculate full scope RAC over.
prop (str) – Property to evaluate.
d (int) – Maximum depth of full scope autocorrelation. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Is octahedral flag, by default True.
modifier (bool, optional) – Use ox modifier, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
autocorrelation_vector – Full scope product autocorrelation values.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.full_autocorrelation_derivative(mol, prop, d, oct=True, modifier=False)[source]
Calculate full scope product autocorrelations derivatives (i.e., start at every atom up to depth d).
- Parameters:
mol (mol3D) – Molecule to calculate full scope RAC over.
prop (str) – Property to evaluate.
d (int) – Maximum depth of scope to evaluate. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Is octahedral flag, by default True.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
modifier (bool, optional) – Use ox modifier, by default False.
- Returns:
autocorrelation_derivative_mat – Full scope autocorrelation derivative matrix.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.generate_all_ligand_autocorrelation_derivatives(mol, loud, depth=4, name=False, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_all_ligand_autocorrelations(mol, loud, depth=4, name=False, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_all_ligand_autocorrs_and_deltametrics_dimers(mol, loud, depth=4, name=False, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_all_ligand_deltametric_derivatives(mol, loud, depth=4, name=False, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_all_ligand_deltametrics(mol, loud, depth=4, name=False, flag_name=False, custom_ligand_dict=False, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_atomonly_autocorrelation_derivatives(mol, atomIdx, depth=4, oct=True, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_atomonly_autocorrelations(mol, atomIdx, depth=4, oct=True, Gval=False, NumB=False, polarizability=False, use_dist=False, size_normalize=False, custom_property_dict={}, flatten=False)[source]
This function gets autocorrelations for a molecule starting from specified indices.
- Parameters:
mol (mol3D) – mol3D molecule to analyze.
atomIdx (int or list of int) – Index or list of indices of atoms to start autocorrelation from.
depth (int, optional) – Maximum depth of autocorrelations. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
Gval (bool, optional) – Use G value as RAC, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
polarizability (bool, optional) – Use polarizability (alpha) as RAC, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
flatten (bool, optional) – Flag to change format of returned dictionary, by default False. Makes values of dictionary not be nested lists.
- Returns:
results_dictionary – Dictionary of atom only RAC names and values. For key colnames, value is list of lists of str. For key results, value is list of np.array.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_atomonly_deltametric_derivatives(mol, atomIdx, depth=4, oct=True, NumB=False, Gval=False)[source]
- molSimplify.Informatics.autocorrelation.generate_atomonly_deltametrics(mol, atomIdx, depth=4, oct=True, Gval=False, NumB=False, polarizability=False, use_dist=False, size_normalize=False, custom_property_dict={}, flatten=False, non_trivial=False)[source]
This function gets deltametrics for a molecule starting from specified indices.
- Parameters:
mol (mol3D) – mol3D molecule to analyze.
atomIdx (int or list of int) – Index or list of indices of atoms to start deltametric from.
depth (int, optional) – Maximum depth of deltametrics. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
Gval (bool, optional) – Use G value as RAC, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
polarizability (bool, optional) – Use polarizability (alpha) as RAC, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
flatten (bool, optional) – Flag to change format of returned dictionary, by default False. Makes values of dictionary not be nested lists.
non_trivial (bool, optional) – Flag to exclude difference RACs of I, and depth zero difference RACs. These RACs are always zero. By default False.
- Returns:
results_dictionary – Dictionary of atom only deltametric names and values. For key colnames, value is list of lists of str. For key results, value is list of np.array.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_full_complex_autocorrelation_derivatives(mol, depth=4, oct=True, flag_name=False, modifier=False, Gval=False, NumB=False)[source]
Utility to manage full complex autocorrelation derivative generation and labeling.
- Parameters:
mol (mol3D) – Molecule used for full scope.
depth (int, optional) – Maximum depth of autocorrelations to evaluate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Is an octahedral complex, by default True.
flag_name (bool, optional) – Prepend “f_all” to results to track full complex, by default False.
modifier (bool, optional) – Use ox_modifier on metal charge, by default False.
Gval (bool, optional) – Use G value as RAC, by default False.
NumB (bool, optional) – Use number of bonds as RAC, by default False.
- Returns:
results_dictionary – Formatted dictionary with {‘colnames’: colnames, ‘results’: result}.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_full_complex_autocorrelations(mol, depth=4, oct=True, flag_name=False, modifier=False, use_dist=False, size_normalize=False, Gval=False, NumB=False, polarizability=False, custom_property_dict={}, transition_metals_only=True, flatten=False)[source]
Utility to manage full complex autocorrelation generation and labeling. Works on any molecule, not just TM complexes.
Use size_normalize=True to average over all start atoms (all atoms in molecule), mimicking behavior of generate_metal_* and generate_atomonly_* functions.
- Parameters:
mol (mol3D) – Molecule used for full scope.
depth (int, optional) – Maximum depth of autocorrelations to evaluate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Is an octahedral complex, by default True.
flag_name (bool, optional) – Prepend “f_all” to results to track full complex, by default False.
modifier (bool, optional) – Use ox_modifier on metal charge, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
Gval (bool, optional) – Use G value as RAC, by default False.
NumB (bool, optional) – Use number of bonds as RAC, by default False.
polarizability (bool, optional) – Use polarizability (alpha) as RAC, by default False.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
flatten (bool, optional) – Flag to change format of returned dictionary, by default False. Makes values of dictionary not be nested lists.
- Returns:
results_dictionary – Formatted dictionary with {‘colnames’: colnames, ‘results’: result}. For key colnames, value is list of lists of str. For key results, value is list of np.array.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_full_complex_coulomb_autocorrelations(mol, depth=3, oct=True, flag_name=False, modifier=False, use_dist=False, transition_metals_only=True)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_autocorrelation_derivatives(mol, depth=4, oct=True, flag_name=False, modifier=False, NumB=False, Gval=False)[source]
Utility for generating all metal-centered product autocorrelation derivatives for a complex.
- Parameters:
mol (mol3D) – Molecule to get mc-RAC derivatives for.
depth (int, optional) – Maximum depth of RACs to calculate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
modifier (bool, optional) – Use ox_modifier for metal, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
- Returns:
results_dictionary – Dictionary of all geo-based MC-RAC product descriptor derivatives {‘colnames’: colnames, ‘results’: result}.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_metal_autocorrelations(mol, depth=4, oct=True, flag_name=False, modifier=False, Gval=False, NumB=False, polarizability=False, use_dist=False, size_normalize=False, custom_property_dict={}, transition_metals_only=True, flatten=False)[source]
Utility for generating all metal-centered product autocorrelations for a complex.
- Parameters:
mol (mol3D) – Molecule to get mc-RACs for.
depth (int, optional) – Maximum depth of RACs to calculate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
modifier (bool, optional) – Use ox_modifier for metal, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
polarizability (bool, optional) – Use polarizability (alpha) as descriptor property, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
flatten (bool, optional) – Flag to change format of returned dictionary, by default False. Makes values of dictionary not be nested lists.
- Returns:
results_dictionary – Dictionary of all geo-based MC-RAC product descriptors - {‘colnames’: colnames, ‘results’: result}. For key colnames, value is list of lists of str. For key results, value is list of np.array.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_metal_deltametric_derivatives(mol, depth=4, oct=True, flag_name=False, modifier=False, NumB=False, Gval=False)[source]
Utility for generating all metal-centered deltametric autocorrelation derivatives for a complex.
- Parameters:
mol (mol3D) – Molecule to get D_mc-RAC derivatives for.
depth (int, optional) – Maximum depth of RACs to calculate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
modifier (bool, optional) – Use ox_modifier for metal, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
- Returns:
results_dictionary – Dictionary of all geo-based MC-RAC deltametric descriptor derivatives - {‘colnames’: colnames, ‘results’: result}.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_metal_deltametrics(mol, depth=4, oct=True, flag_name=False, modifier=False, Gval=False, NumB=False, polarizability=False, use_dist=False, size_normalize=False, custom_property_dict={}, transition_metals_only=True, flatten=False, non_trivial=False)[source]
Utility for generating all metal-centered deltametric autocorrelations for a complex.
- Parameters:
mol (mol3D) – Molecule to get D_mc-RACs for.
depth (int, optional) – Maximum depth of RACs to calculate, by default 4. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral criteria for structure evaluation, by default True. If complex is octahedral, will use better bond checks.
flag_name (bool, optional) – Shift RAC names slightly, by default False.
modifier (bool, optional) – Use ox_modifier for metal, by default False.
Gval (bool, optional) – Use G value as descriptor property, by default False.
NumB (bool, optional) – Use number of bonds as descriptor property, by default False.
polarizability (bool, optional) – Use polarizability (alpha) as descriptor property, by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom. If provided, other property RACs (e.g., Z, S, T) will not be made.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
flatten (bool, optional) – Flag to change format of returned dictionary, by default False. Makes values of dictionary not be nested lists.
non_trivial (bool, optional) – Flag to exclude difference RACs of I, and depth zero difference RACs. These RACs are always zero. By default False.
- Returns:
results_dictionary – Dictionary of all geo-based MC-RAC deltametric descriptors - {‘colnames’: colnames, ‘results’: result}. For key colnames, value is list of lists of str. For key results, value is list of np.array.
- Return type:
- molSimplify.Informatics.autocorrelation.generate_metal_ox_autocorrelation_derivatives(oxmodifier, mol, depth=4, oct=True, flag_name=False)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_ox_autocorrelations(oxmodifier, mol, depth=4, oct=True, flag_name=False, use_dist=False, size_normalize=False)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_ox_deltametric_derivatives(oxmodifier, mol, depth=4, oct=True, flag_name=False)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_ox_deltametrics(oxmodifier, mol, depth=4, oct=True, flag_name=False, use_dist=False, size_normalize=False, non_trivial=False)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_ox_eff_autocorrelations(oxmodifier, mol, depth=4, oct=True, flag_name=False, transition_metals_only=True)[source]
- molSimplify.Informatics.autocorrelation.generate_metal_ox_eff_deltametrics(oxmodifier, mol, depth=4, oct=True, flag_name=False, transition_metals_only=True)[source]
- molSimplify.Informatics.autocorrelation.generate_multiatom_autocorrelations(mol, depth=4, oct=True, flag_name=False, additional_elements=False)[source]
- molSimplify.Informatics.autocorrelation.generate_multiatom_deltametrics(mol, depth=4, oct=True, flag_name=False, additional_elements=False)[source]
- molSimplify.Informatics.autocorrelation.get_metal_index(mol, transition_metals_only=True)[source]
Utility for getting metal index of molecule, and printing warning if more than one metal index found. :param mol: Molecule to get metal index for. :type mol: mol3D :param transition_metals_only: Flag if only transition metals counted as metals, by default True. :type transition_metals_only: bool, optional
- Returns:
f_metal_idx – Index of the first metal atom.
- Return type:
- molSimplify.Informatics.autocorrelation.layer_density_in_3D(mol, prop_vec, orig, d, oct=True)[source]
- molSimplify.Informatics.autocorrelation.metal_only_autocorrelation(mol, prop, d, oct=True, func=<function autocorrelation>, modifier=False, use_dist=False, size_normalize=False, custom_property_dict={}, transition_metals_only=True)[source]
Calculate the metal_only product autocorrelations (e.g., metal-centered atom-only RACs).
Averaged over all metals.
- Parameters:
mol (mol3D) – Molecule with metal to calculate MC product RACs for.
prop (str) – Property to evaluate.
d (int) – Maximum depth of autocorrelation. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral geometry evaluations, by default True.
func (function, optional) – Which function to evaluate mc-racs by, by default autocorrelation.
modifier (bool, optional) – Use ox_modifier, by default False. If passed - dict, used to modify prop vector (e.g., for adding ONLY used with ox_nuclear_charge ox or charge) {“Fe”:2, “Co”: 3} etc., by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
autocorrelation_vector – MC atom-only RACs vector.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.metal_only_autocorrelation_derivative(mol, prop, d, oct=True, func=<function autocorrelation_derivative>, modifier=False, transition_metals_only=True)[source]
Calculate the metal_only product autocorrelation derivatives (e.g., metal-centered atom-only RAC derivatives).
- Parameters:
mol (mol3D) – Molecule with metal to calculate MC product RAC derivatives for.
prop (str) – Property to evaluate.
d (int) – Maximum depth of autocorrelation. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral geometry evaluations, by default True.
func (function, optional) – Which function to evaluate mc-racs by, by default autocorrelation_derivative.
modifier (bool, optional) – Use ox_modifier, by default False.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
autocorrelation_vector – MC atom-only RAC derivatives vector (matrix).
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.metal_only_deltametric(mol, prop, d, oct=True, func=<function deltametric>, modifier=False, use_dist=False, size_normalize=False, custom_property_dict={}, transition_metals_only=True)[source]
Gets the metal atom-only deltametric RAC.
- Parameters:
mol (mol3D) – Molecule with metal to calculate MC deltametric RACs.
prop (str) – Property to evaluate.
d (int) – Maximum depth of deltametric. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral geometry evaluations, by default True.
func (function, optional) – Which function to evaluate mc-racs by, by default deltametric.
modifier (bool, optional) – Use ox_modifier, by default False. If passed - dict, used to modify prop vector (e.g., for adding ONLY used with ox_nuclear_charge ox or charge) {“Fe”:2, “Co”: 3} etc., by default False.
use_dist (bool, optional) – Weigh autocorrelation by physical distance of scope atom from start atom, by default False.
size_normalize (bool, optional) – Whether or not to normalize by the number of atoms in molecule.
custom_property_dict (dict, optional) – Keys are custom property names (str), values are dictionaries mapping atom symbols (str, e.g., “H”, “He”) to the numerical property (float) for that atom.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
deltametric_vector – Metal-centered deltametric RAC vector.
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.metal_only_deltametric_derivative(mol, prop, d, oct=True, func=<function deltametric_derivative>, modifier=False, transition_metals_only=True)[source]
Gets the metal atom-only deltametric derivatives.
- Parameters:
mol (mol3D) – Molecule with metal to calculate MC deltametric RAC derivatives for.
prop (str) – Property to evaluate.
d (int) – Maximum depth of deltametric. For example, if set to 3, depths considered will be 0, 1, 2, and 3.
oct (bool, optional) – Use octahedral geometry evaluations, by default True.
func (function, optional) – Which function to evaluate mc-racs by, by default deltametric_derivative.
modifier (bool, optional) – Use ox_modifier, by default False.
transition_metals_only (bool, optional) – Flag if only transition metals counted as metals, by default True.
- Returns:
deltametric_vector_derivative – Metal-centered deltametric derivatives vector (matrix).
- Return type:
np.array
- molSimplify.Informatics.autocorrelation.multiatom_only_autocorrelation(mol, prop, d, oct=True, func=<function autocorrelation>, modifier=False, additional_elements=False)[source]
- molSimplify.Informatics.autocorrelation.multiatom_only_deltametric(mol, prop, d, oct=True, func=<function deltametric>, modifier=False, additional_elements=False)[source]
- molSimplify.Informatics.autocorrelation.ratiometric(mol, prop_vec_num, prop_vec_den, orig, d, oct=True)[source]
This function returns the ratiometrics for one atom.
- Parameters:
- Returns:
result_vector
- Return type:
vector of prop_vec_num / prop_vec_den
Revised Autocorrelations for MOFs
Documentation for RACs coming soon!