添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to rewrite rdkit.Chem.Draw import SimilarityMaps

def calcAtomGaussians (mol, a=0.03, step=0.02, weights=None):

As mlab.bivariate_normal​​is deprecated.

I was using latest RDKit 2018.03.1. With anaconda 4.5 in virtual environment. This error exists in rdkit 2017.09.3. And this problem exists for all the functions which use matplotlib 2.2 version. For deprecated functions refer this page

  • RDKit Version: 2018.03.1
  • Platform: Ubuntu 16.04
  • from rdkit.Chem import AllChem as Chem
    # from rdkit.Chem.Draw import IPythonConsole
    from rdkit.Chem.Draw import SimilarityMaps
    DB00641_Simvastatin = "[H][C@]12[C@H](C[C@@H](C)C=C1C=C[C@H](C)[C@@H]2CC[C@@H]1C[C@@H](O)CC(=O)O1)OC(=O)C(C)(C)CC"
    StDB1098_Pravastatin = "CCCCNS(=O)(=O)c1ccccc1"
    mol1 = Chem.MolFromSmiles(DB00641_Simvastatin)
    mol2 = Chem.MolFromSmiles(StDB1098_Pravastatin)
    fig, maxWeight = SimilarityMaps.GetSimilarityMapForFingerprint(mol2, mol1, SimilarityMaps.GetMorganFingerprint)
    

    Running above code would produce this error:

    /home/kiran/anaconda3/envs/rdkit-2018_03_1/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py:285: MatplotlibDeprecationWarning: The bivariate_normal function was deprecated in version 2.2. Z = mlab.bivariate_normal(X, Y, a, a, mol._atomPs[0][0], mol._atomPs[0][1]) * weights[0] /home/kiran/anaconda3/envs/rdkit-2018_03_1/lib/python3.5/site-packages/rdkit/Chem/Draw/__init__.py:287: MatplotlibDeprecationWarning: The bivariate_normal function was deprecated in version 2.2. Zp = mlab.bivariate_normal(X, Y, a, a, mol._atomPs[i][0], mol._atomPs[i][1])
    This is working fine in the RDKit 2016.03.4 version.

    Solution suggestions could be availabe in this thread