Trees | Indices | Help |
|
---|
|
Torsion Fingerprints (Deviation) (TFD) According to a paper from Schulz-Gasch et al., JCIM, 52, 1499-1512 (2012).
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Imports: rdBase, RDConfig, Geometry, Chem, rdchem, rdMolDescriptors, math, os
|
Helper function to check if all atoms in the list are the same Arguments: - inv: atom invariants (used to define equivalence of atoms) - atoms: list of atoms to check Return: boolean |
Helper function to check if all atoms in the list are NOT the same Arguments: - inv: atom invariants (used to define equivalence of atoms) - atoms: list of atoms to check Return: boolean |
Helper function to check if two atoms in the list are the same, and one not Note: Works only for three atoms Arguments: - inv: atom invariants (used to define equivalence of atoms) - atoms: list of atoms to check Return: atom that is different |
Helper function to calculate the atom invariants for each atom with a given radius Arguments: - mol: the molecule of interest - radius: the radius for the Morgan fingerprint Return: list of atom invariants |
Helper function to calculate the number of heavy atom neighbors. Arguments: - atom1: the atom of interest - aid2: atom index that should be excluded from neighbors (default: none) Return: a list of heavy atom neighbors of the given atom |
Helper function to calculate the index of the reference atom for a given atom Arguments: - neighbors: list of the neighbors of the atom - inv: atom invariants Return: list of atom indices as reference for torsion |
Determine the bonds (or pair of atoms treated like a bond) for which torsions should be calculated. Arguments: - refmol: the molecule of interest - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion |
Calculate a list of torsions for a given molecule. For each torsion the four atom indices are determined and stored in a set. Arguments: - mol: the molecule of interest - maxDev: maximal deviation used for normalization 'equal': all torsions are normalized using 180.0 (default) 'spec': each torsion is normalized using its specific maximal deviation as given in the paper - symmRadius: radius used for calculating the atom invariants (default: 2) - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion Return: two lists of torsions: non-ring and ring torsions |
Helper function to retrieve the coordinates of the four atoms in a torsion Arguments: - atoms: list with the four atoms - conf: conformation of the molecule Return: Point3D objects of the four atoms |
Calculate the torsion angles for a list of non-ring and a list of ring torsions. Arguments: - mol: the molecule of interest - tors_list: list of non-ring torsions - tors_list_rings: list of ring torsions - confId: index of the conformation (default: first conformer) Return: list of torsion angles |
Helper function to identify the atoms of the most central bond. Arguments: - mol: the molecule of interest - distmat: distance matrix of the molecule Return: atom indices of the two most central atoms (in order) |
Helper function to calculate the beta for torsion weights according to the formula in the paper. w(dmax/2) = 0.1 Arguments: - mol: the molecule of interest - distmat: distance matrix of the molecule - aid1: atom index of the most central atom Return: value of beta (float) |
Calculate the weights for the torsions in a molecule. By default, the highest weight is given to the bond connecting the two most central atoms. If desired, two alternate atoms can be specified (must be connected by a bond). Arguments: - mol: the molecule of interest - aid1: index of the first atom (default: most central) - aid2: index of the second atom (default: second most central) - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion Return: list of torsion weights (both non-ring and ring) |
Calculate the torsion deviation fingerprint (TFD) given two lists of torsion angles. Arguments: - torsions1: torsion angles of conformation 1 - torsions2: torsion angles of conformation 2 - weights: list of torsion weights (default: None) Return: TFD value (float) |
Generate a new molecule with the atom order of mol1 and coordinates from mol2. Arguments: - mol1: first instance of the molecule of interest - mol2: second instance the molecule of interest Return: RDKit molecule |
Wrapper to calculate the TFD between two list of conformers of a molecule Arguments: - mol: the molecule of interest - confIds1: first list of conformer indices - confIds2: second list of conformer indices - useWeights: flag for using torsion weights in the TFD calculation - maxDev: maximal deviation used for normalization 'equal': all torsions are normalized using 180.0 (default) 'spec': each torsion is normalized using its specific maximal deviation as given in the paper - symmRadius: radius used for calculating the atom invariants (default: 2) - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion Return: list of TFD values |
Wrapper to calculate the TFD between two molecules. Important: The two molecules must be instances of the same molecule Arguments: - mol1: first instance of the molecule of interest - mol2: second instance the molecule of interest - confId1: conformer index for mol1 (default: first conformer) - confId2: conformer index for mol2 (default: first conformer) - useWeights: flag for using torsion weights in the TFD calculation - maxDev: maximal deviation used for normalization 'equal': all torsions are normalized using 180.0 (default) 'spec': each torsion is normalized using its specific maximal deviation as given in the paper - symmRadius: radius used for calculating the atom invariants (default: 2) - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion Return: TFD value |
Wrapper to calculate the matrix of TFD values for the conformers of a molecule. Arguments: - mol: the molecule of interest - useWeights: flag for using torsion weights in the TFD calculation - maxDev: maximal deviation used for normalization 'equal': all torsions are normalized using 180.0 (default) 'spec': each torsion is normalized using its specific maximal deviation as given in the paper - symmRadius: radius used for calculating the atom invariants (default: 2) - ignoreColinearBonds: if True (default), single bonds adjacent to triple bonds are ignored if False, alternative not-covalently bound atoms are used to define the torsion Return: matrix of TFD values Note that the returned matrix is symmetrical, i.e. it is the lower half of the matrix, e.g. for 5 conformers: matrix = [ a, b, c, d, e, f, g, h, i, j] |
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Feb 1 16:13:01 2018 | http://epydoc.sourceforge.net |