MolecularDiffusion.utils.xyz2mol.converter¶
Attributes¶
Functions¶
|
implemenation of algorithm shown in Figure 2 |
|
|
|
based on code written by Paolo Toscani |
|
Sanity of bond-orders |
|
|
|
Find and embed chiral information into the model based on the coordinates |
|
This hack should not be needed anymore, but is kept just in case |
|
|
|
|
|
|
|
|
|
|
|
|
|
convert str atom to integer atom |
|
|
|
|
|
The number of radical electrons = absolute atomic charge |
|
convert integer atom to string atom |
|
|
|
Generate a rdkit molobj from atoms, coordinates and a total_charge. |
Module Contents¶
- MolecularDiffusion.utils.xyz2mol.converter.AC2BO(AC, atoms, charge, allow_charged_fragments=True, use_graph=True)¶
implemenation of algorithm shown in Figure 2 UA: unsaturated atoms DU: degree of unsaturation (u matrix in Figure) best_BO: Bcurr in Figure
- MolecularDiffusion.utils.xyz2mol.converter.AC2mol(mol, AC, atoms, charge, allow_charged_fragments=True, use_graph=True)¶
- MolecularDiffusion.utils.xyz2mol.converter.BO2mol(mol, BO_matrix, atoms, atomic_valence_electrons, mol_charge, allow_charged_fragments=True)¶
based on code written by Paolo Toscani
From bond order, atoms, valence structure and total charge, generate an rdkit molecule.
- Parameters:
molecule (mol_charge - total charge of)
molecule
symbols (atoms - list of integer atomic)
molecule
- optional:
allow_charged_fragments - bool - allow charged fragments
- returns
mol - updated rdkit molecule with bond connectivity
- MolecularDiffusion.utils.xyz2mol.converter.BO_is_OK(BO, AC, charge, DU, atomic_valence_electrons, atoms, valences, allow_charged_fragments=True)¶
Sanity of bond-orders
- Parameters:
- (DU)
-
-
-
- optional
allow_charges_fragments -
- Returns:
boolean - true of molecule is OK, false if not
- MolecularDiffusion.utils.xyz2mol.converter.charge_is_OK(BO, AC, charge, DU, atomic_valence_electrons, atoms, valences, allow_charged_fragments=True)¶
- MolecularDiffusion.utils.xyz2mol.converter.chiral_stereo_check(mol)¶
Find and embed chiral information into the model based on the coordinates
- Parameters:
molecule (mol - rdkit)
conformer (with embeded)
- MolecularDiffusion.utils.xyz2mol.converter.clean_charges(mol)¶
This hack should not be needed anymore, but is kept just in case
- MolecularDiffusion.utils.xyz2mol.converter.get_BO(AC, UA, DU, valences, UA_pairs, use_graph=True)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_UA(maxValence_list, valence_list)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_UA_pairs(UA, AC, use_graph=True)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_atomic_charge(atom, atomic_valence_electrons, BO_valence)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_atomic_valences(k)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_bonds(UA, AC)¶
- MolecularDiffusion.utils.xyz2mol.converter.get_proto_mol(atoms)¶
- MolecularDiffusion.utils.xyz2mol.converter.int_atom(atom)¶
convert str atom to integer atom
- MolecularDiffusion.utils.xyz2mol.converter.read_xyz_file(filename, look_for_charge=True)¶
- MolecularDiffusion.utils.xyz2mol.converter.set_atomic_charges(mol, atoms, atomic_valence_electrons, BO_valences, BO_matrix, mol_charge)¶
- MolecularDiffusion.utils.xyz2mol.converter.set_atomic_radicals(mol, atoms, atomic_valence_electrons, BO_valences)¶
The number of radical electrons = absolute atomic charge
- MolecularDiffusion.utils.xyz2mol.converter.str_atom(atom)¶
convert integer atom to string atom
- MolecularDiffusion.utils.xyz2mol.converter.valences_not_too_large(BO, valences)¶
- MolecularDiffusion.utils.xyz2mol.converter.xyz2mol(atoms, coordinates, AC, covalent_factor, charge=0, allow_charged_fragments=True, use_graph=True, use_huckel=False, embed_chiral=True, exportBO=False)¶
Generate a rdkit molobj from atoms, coordinates and a total_charge.
- Parameters:
types (atoms - list of atom)
coordinates (coordinates - 3xN Cartesian)
(default (charge - total charge of the system) –
- optional:
allow_charged_fragments - alternatively radicals are made use_graph - use graph (networkx) use_huckel - Use Huckel method for atom connectivity prediction embed_chiral - embed chiral information to the molecule
- Returns:
mols - list of rdkit molobjects
- MolecularDiffusion.utils.xyz2mol.converter.atomic_valence¶
- MolecularDiffusion.utils.xyz2mol.converter.atomic_valence_electrons¶
- MolecularDiffusion.utils.xyz2mol.converter.av = [3, 4]¶
- MolecularDiffusion.utils.xyz2mol.converter.elemdatabase¶
- MolecularDiffusion.utils.xyz2mol.converter.rdEHTTools = None¶
- MolecularDiffusion.utils.xyz2mol.converter.valence_electrons = []¶