示例#1
0
def get3D(m,is3d):
	if not is3d:
		m = Chem.AddHs(m)
		AllChem.EmbedMolecule(m)
		AllChem.MMFFOptimizeMolecule(m)
	r= rdMD.CalcAUTOCORR3D(m)+rdMD.CalcRDF(m)+rdMD.CalcMORSE(m)+rdMD.CalcWHIM(m)+rdMD.CalcGETAWAY(m)
	return r
示例#2
0
def Get3dDescriptor(molObject):
    """
	Get all 3D descriptor
	Args:

	Returns:
		List
	Raise:
		Exceptions
	"""
    value_list = []
    value_list.append(Descriptors3D.Asphericity(molObject))
    value_list.append(Descriptors3D.Eccentricity(molObject))
    value_list.append(Descriptors3D.InertialShapeFactor(molObject))
    value_list.append(Descriptors3D.NPR1(molObject))
    value_list.append(Descriptors3D.NPR2(molObject))
    value_list.append(Descriptors3D.PMI1(molObject))
    value_list.append(Descriptors3D.PMI2(molObject))
    value_list.append(Descriptors3D.PMI3(molObject))
    value_list.append(
        Descriptors3D.RadiusOfGyration(molObject))  # Radius of gyration
    value_list.append(
        Descriptors3D.SpherocityIndex(molObject))  # Spherocity Index
    value_list.append(rdMolDescriptors.CalcPBF(
        molObject))  # Returns the PBF (plane of best fit) descriptor
    value_list += rdMolDescriptors.CalcAUTOCORR3D(molObject)
    value_list += rdMolDescriptors.CalcRDF(molObject)
    value_list += rdMolDescriptors.CalcMORSE(molObject)
    value_list += rdMolDescriptors.CalcWHIM(molObject)
    value_list += rdMolDescriptors.CalcGETAWAY(molObject)

    return value_list
示例#3
0
def get3D(m,is3d):
    if not is3d:
        m = Chem.AddHs(m)
        # define the new code from RDKit Molecule 3D ETKDG.
        ps = AllChem.ETKDG()
        ps.randomSeed = 0xf00d
        AllChem.EmbedMolecule(m,ps)
    r= rdMD.CalcAUTOCORR3D(m)+rdMD.CalcRDF(m)+rdMD.CalcMORSE(m)+rdMD.CalcWHIM(m)+rdMD.CalcGETAWAY(m, precision=0.001)
    return r
示例#4
0
 def get_AUTOCORR3D(x, from_smiles):
     if from_smiles:
         mol = Chem.MolFromSmiles(x)
     else:
         mol = x
     if (mol is None) or (len(mol.GetAtoms()) == 0):
         return [0] * 80
     else:
         mol_3D = Chem.AddHs(mol)
         AllChem.EmbedMolecule(mol_3D)
         AllChem.MMFFOptimizeMolecule(mol_3D)
         return rdMolDescriptors.CalcAUTOCORR3D(mol_3D)