What's new since last year's UGM?

2018 RDKit UGM Edition

Not an exhaustive list, just some examples. Covers 2017.09, 2018.03, and some of the forthcoming 2018.09 release.

Contributors

Not an exhaustive list, covers people who have been acknowledged in the release notes of recent versions or who have contributed code or bug reports to the upcoming release.

  • 'clinntt'
  • 'hjuinj'
  • 'iwatobipen'
  • 'jaechanglim'
  • 'phenethyl'
  • 'xiaotaw'
  • Alain Vaucher
  • Andrew Dalke
  • Axel Pahl
  • Boran Adas
  • Brian Cole
  • Brian Kelley
  • Brian Cole
  • Cameron Pye
  • Chris Morris
  • Christian Ribeaud
  • Dan Nealschneider
  • Francois Berenger
  • Gareth Jones
  • Gregor Simm
  • Guillaume Godin
  • JW Feng
  • Jan Halborg Jensen
  • Jason Biggs
  • Jeff van Santen
  • Jon Sorenson
  • Josh Meyers
  • José Emilio Sánchez Aparicio
  • Karl Leswing
  • Maciej Wójcikowski
  • Malitha Kabir
  • Martin Šícho
  • Matt Swain
  • Matthew O'Meara
  • Nadine Schneider
  • Nicola Zonta
  • Noel O'Boyle
  • Paolo Tosco
  • Patrick Avery
  • Paulo Tosco
  • Pavel Polishchuk
  • Peter Gedeck
  • Richard Hall
  • Rim Shayakhmetov
  • Roger Sayle
  • Sam Webb
  • Sereina Riniker
  • Stephen Roughley
  • Susan Leung
  • Thomas Blaschke
  • Thomas Heavy
  • Tuomo Kalliokoski

Big code changes

Modern C++

(Release 2018.03)

Move to using C++14 (mostly) for the core. In addition to making developers' lives more pleasant, this has resulted in a nice performance boost and reduced memory requirements.

As a little example of how much this changes things, here's what looping over atoms in the molecule used to require:

  ROMol::VERTEX_ITER this_at, end_at;
  boost::tie(this_at, end_at) = mol.getVertices();
  while (this_at != end_at) {
    const Atom *atom = mol[*this_at].get();
    ++this_at;
    <do something with the atom>
  }

and here's what it looks like now:

  for (const auto atom : mol.atoms()) {
    <do something with the atom>
  }

the improvement is hopefully obvious even if you don't know C++. :-)

Sensible defaults

(Release 2018.03)

We made a series of changes to the default values of arguments to RDKit functions in order to make using the toolkit less error prone.

  • MolToSmiles() now generates isomeric SMILES by default.
  • The embedding code now uses the ETKDG method by default. Note this is not yet true from Python.
  • MolToMolBlock() will now by default generate a set of 2D coordinates for molecules when the includeStereo option is set to True. The changes are made to a copy of the molecule; the molecule itself will not be modified.
  • The Mol file (and SDF) parser now determines atomic stereochemisty based on the 3D coordinates provided (if 3D coordinates are provided).
  • The SMILES parser now supports CXSMILES by default (assuming that additional text that looks like CXSMILES extensions is there).

Other backwards incompatible changes

(Ongoing)

We've started to gradually make other changes to the code that may be either backwards incompatible or may change the default results. These will be documented in a section of the release notes and are tagged with Changes Results in github.

Here's an example from the (upcoming) 2019.09 release notes:

## Backwards incompatible changes
This release includes a set of changes to make the default arguments to common
functions less error prone (github #1679).
- GetAtomSmiles() now generates isomeric SMILES by default.
- The ringMatchesRingOnly option to the FindMCS() function now applies to
  atom-atom matches as well as bond-bond matches.

Move from epydoc to sphinx autodoc (affects documentation)

(Release 2018.09)

epydoc is no longer maintained and does not work with Python 3. Sphinx autodoc is under active development, integrates better with the rest of the RDKit documentation system, and looks better. Unfortunately some documentation needs to be reformatted in order to look good; this may take another release. You can help here!

New Features

Some for which the PR is still being reviewed:

  • Reading/writing extended stereochemistry from v3000 mol blocks
  • MolVS integration (GSoC project, more on this from Susan later)
  • Generalized fingerprinter (GSoC project, more on this from Boran later)

Hopefully these will also make it into the 2019.09 release

Coordgen integration

(2018.03 release)

This allows the coordgen library from Nicola Zonta (Schroedinger) to be used to generate 2D coordinates in the RDKit.

In [1]:
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import IPythonConsole
In [2]:
epinephrine = Chem.MolFromSmiles('CNC[C@H](O)c1ccc(O)c(O)c1')
epinephrine
Out[2]:
In [3]:
rdDepictor.SetPreferCoordGen(True)
rdDepictor.Compute2DCoords(epinephrine)
epinephrine
Out[3]:

Something harder:

In [4]:
IPythonConsole.molSize = (350,300)
emodepside = Chem.MolFromSmiles('CC(C)C[C@H]1C(=O)O[C@H](Cc2ccc(N3CCOCC3)cc2)C(=O)N(C)[C@@H](CC(C)C)C(=O)O[C@H](C)C(=O)N(C)[C@@H](CC(C)C)C(=O)O[C@H](Cc2ccc(N3CCOCC3)cc2)C(=O)N(C)[C@@H](CC(C)C)C(=O)O[C@H](C)C(=O)N1C')
rdDepictor.SetPreferCoordGen(False)
rdDepictor.Compute2DCoords(emodepside)
emodepside
Out[4]:
In [5]:
rdDepictor.SetPreferCoordGen(True)
rdDepictor.Compute2DCoords(emodepside)
emodepside
Out[5]:

Fingerprint bit visualization

(2018.09 release)

Nadine Schneider's fingerprint bit visualization code from CheTo has been adapted and added to the RDKit core.

Note: At the moment this code is still in Python. It will be ported to C++ in a future release to allow it to be used more broadly.

In [49]:
from rdkit import Chem
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import Draw
epinephrine = Chem.MolFromSmiles('CNC[C@H](O)c1ccc(O)c(O)c1')
epinephrine
Out[49]:
In [50]:
bi = {}
fp = rdMolDescriptors.GetMorganFingerprintAsBitVect(epinephrine, radius=2, bitInfo=bi)
list(fp.GetOnBits())[:10]
Out[50]:
[1, 80, 227, 315, 589, 606, 632, 807, 875, 1057]
In [51]:
Draw.DrawMorganBit(epinephrine,589,bi)
Out[51]:
In [36]:
Draw.DrawMorganBit(epinephrine,80,bi)
Out[36]:
In [37]:
Draw.DrawMorganBit(epinephrine,589,bi,aromaticColor=None,ringColor=None,extraColor=(.6,.6,.9),centerColor=(.9,.6,.6))
Out[37]:
In [38]:
Draw.DrawMorganBit(epinephrine,589,bi,aromaticColor=None,ringColor=None,extraColor=(.6,.6,.9),centerColor=(.9,.6,.6),baseRad=0.6)
Out[38]:
In [39]:
rdkbi = {}
rdkfp = Chem.RDKFingerprint(epinephrine, maxPath=5, bitInfo=rdkbi)
list(rdkfp.GetOnBits())[:10]
Out[39]:
[93, 103, 112, 122, 148, 149, 161, 166, 194, 208]
In [40]:
Draw.DrawRDKitBit(epinephrine,166,rdkbi)
Out[40]:
In [41]:
Draw.DrawRDKitBit(epinephrine,222,rdkbi)
Out[41]:
In [42]:
Draw.DrawRDKitBit(epinephrine,222,rdkbi,aromaticColor=(.9,.6,.6),nonAromaticColor=(.6,.6,.9))
Out[42]:
In [43]:
Draw.DrawRDKitBit(epinephrine,222,rdkbi,aromaticColor=(.9,.6,.6),nonAromaticColor=(.6,.6,.9),baseRad=.5)
Out[43]:
In [52]:
from ipywidgets import interact,fixed,IntSlider
def renderFpBit(mol,bitIdx,bitInfo,fn):
    bid = bitIdx
    return(display(fn(mol,bid,bitInfo)))
In [53]:
interact(renderFpBit, bitIdx=list(bi.keys()),mol=fixed(epinephrine),bitInfo=fixed(bi),fn=fixed(Draw.DrawMorganBit));
In [46]:
interact(renderFpBit, bitIdx=list(rdkbi.keys()),mol=fixed(epinephrine),bitInfo=fixed(rdkbi),fn=fixed(Draw.DrawRDKitBit));

Molecular interchange format

(2018.03 release)

A JSON-based format derived from CommonChem for exchanging information about molecules between software packages.

In [3]:
from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import rdMolInterchange
import json
In [4]:
doravirine = Chem.MolFromSmiles('Cn1c(n[nH]c1=O)Cn2ccc(c(c2=O)Oc3cc(cc(c3)Cl)C#N)C(F)(F)F')
doravirine
Out[4]:
In [5]:
mjson = rdMolInterchange.MolToJSON(doravirine)
print(json.dumps(json.loads(mjson),indent=4))
{
    "commonchem": {
        "version": 10
    },
    "defaults": {
        "atom": {
            "z": 6,
            "impHs": 0,
            "chg": 0,
            "nRad": 0,
            "isotope": 0,
            "stereo": "unspecified"
        },
        "bond": {
            "bo": 1,
            "stereo": "unspecified"
        }
    },
    "molecules": [
        {
            "atoms": [
                {
                    "impHs": 3
                },
                {
                    "z": 7
                },
                {},
                {
                    "z": 7
                },
                {
                    "z": 7,
                    "impHs": 1
                },
                {},
                {
                    "z": 8
                },
                {
                    "impHs": 2
                },
                {
                    "z": 7
                },
                {
                    "impHs": 1
                },
                {
                    "impHs": 1
                },
                {},
                {},
                {},
                {
                    "z": 8
                },
                {
                    "z": 8
                },
                {},
                {
                    "impHs": 1
                },
                {},
                {
                    "impHs": 1
                },
                {},
                {
                    "impHs": 1
                },
                {
                    "z": 17
                },
                {},
                {
                    "z": 7
                },
                {},
                {
                    "z": 9
                },
                {
                    "z": 9
                },
                {
                    "z": 9
                }
            ],
            "bonds": [
                {
                    "atoms": [
                        0,
                        1
                    ]
                },
                {
                    "atoms": [
                        1,
                        2
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        2,
                        3
                    ]
                },
                {
                    "atoms": [
                        3,
                        4
                    ]
                },
                {
                    "atoms": [
                        4,
                        5
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        5,
                        6
                    ]
                },
                {
                    "atoms": [
                        2,
                        7
                    ]
                },
                {
                    "atoms": [
                        7,
                        8
                    ]
                },
                {
                    "atoms": [
                        8,
                        9
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        9,
                        10
                    ]
                },
                {
                    "atoms": [
                        10,
                        11
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        11,
                        12
                    ]
                },
                {
                    "atoms": [
                        12,
                        13
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        13,
                        14
                    ]
                },
                {
                    "atoms": [
                        12,
                        15
                    ]
                },
                {
                    "atoms": [
                        15,
                        16
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        16,
                        17
                    ]
                },
                {
                    "atoms": [
                        17,
                        18
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        18,
                        19
                    ]
                },
                {
                    "atoms": [
                        19,
                        20
                    ]
                },
                {
                    "bo": 2,
                    "atoms": [
                        20,
                        21
                    ]
                },
                {
                    "atoms": [
                        20,
                        22
                    ]
                },
                {
                    "atoms": [
                        18,
                        23
                    ]
                },
                {
                    "bo": 3,
                    "atoms": [
                        23,
                        24
                    ]
                },
                {
                    "atoms": [
                        11,
                        25
                    ]
                },
                {
                    "atoms": [
                        25,
                        26
                    ]
                },
                {
                    "atoms": [
                        25,
                        27
                    ]
                },
                {
                    "atoms": [
                        25,
                        28
                    ]
                },
                {
                    "atoms": [
                        5,
                        1
                    ]
                },
                {
                    "atoms": [
                        13,
                        8
                    ]
                },
                {
                    "atoms": [
                        21,
                        16
                    ]
                }
            ],
            "extensions": [
                {
                    "name": "rdkitRepresentation",
                    "formatVersion": 1,
                    "toolkitVersion": "2018.09.1dev1",
                    "aromaticAtoms": [
                        1,
                        2,
                        3,
                        4,
                        5,
                        8,
                        9,
                        10,
                        11,
                        12,
                        13,
                        16,
                        17,
                        18,
                        19,
                        20,
                        21
                    ],
                    "aromaticBonds": [
                        1,
                        2,
                        3,
                        4,
                        8,
                        9,
                        10,
                        11,
                        12,
                        16,
                        17,
                        18,
                        19,
                        20,
                        28,
                        29,
                        30
                    ],
                    "cipRanks": [
                        6,
                        19,
                        10,
                        20,
                        21,
                        14,
                        24,
                        7,
                        18,
                        8,
                        0,
                        5,
                        12,
                        13,
                        23,
                        22,
                        11,
                        1,
                        4,
                        2,
                        16,
                        3,
                        26,
                        9,
                        17,
                        15,
                        25,
                        25,
                        25
                    ],
                    "atomRings": [
                        [
                            1,
                            2,
                            3,
                            4,
                            5
                        ],
                        [
                            9,
                            10,
                            11,
                            12,
                            13,
                            8
                        ],
                        [
                            17,
                            18,
                            19,
                            20,
                            21,
                            16
                        ]
                    ]
                }
            ]
        }
    ]
}
In [8]:
nmol = rdMolInterchange.JSONToMols(mjson)[0]
nmol
Out[8]:
In [9]:
Chem.MolToSmiles(nmol)==Chem.MolToSmiles(doravirine)
Out[9]:
True

3D Descriptors

(2017.09 release)

In [54]:
from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import rdMolDescriptors
from rdkit.Chem import AllChem
from rdkit.Chem import Descriptors3D
In [55]:
doravirine = Chem.AddHs(Chem.MolFromSmiles('Cn1c(n[nH]c1=O)Cn2ccc(c(c2=O)Oc3cc(cc(c3)Cl)C#N)C(F)(F)F'))
ps = AllChem.ETKDGv2()
ps.randomSeed = 0xf00d
AllChem.EmbedMolecule(doravirine,ps)
IPythonConsole.drawMol3D(doravirine)

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Dragon-type descriptors:

In [4]:
print("AutoCorr3D:",len(rdMolDescriptors.CalcAUTOCORR3D(doravirine)))
print("Morse:",len(rdMolDescriptors.CalcMORSE(doravirine)))
print("RDF:",len(rdMolDescriptors.CalcRDF(doravirine)))
print("WHIM:",len(rdMolDescriptors.CalcWHIM(doravirine)))
print("GETAWAY:",len(rdMolDescriptors.CalcGETAWAY(doravirine)))
AutoCorr3D: 80
Morse: 224
RDF: 210
WHIM: 114
GETAWAY: 273

Note that a collection of principal moment descriptors is also available (these have been there for a while):

In [9]:
descrs = ('PBF','PMI1','PMI2','PMI3','NPR1','NPR2','RadiusOfGyration','InertialShapeFactor',
          'Eccentricity','Asphericity','SpherocityIndex')
for descr in descrs:
    calc_fn = getattr(rdMolDescriptors,'Calc%s'%descr)
    print(f"{descr} {calc_fn(doravirine):.4f}")
PBF 1.0255
PMI1 2794.9144
PMI2 4918.6167
PMI3 6542.7980
NPR1 0.4272
NPR2 0.7518
RadiusOfGyration 4.0918
InertialShapeFactor 0.0003
Eccentricity 0.9042
Asphericity 0.2086
SpherocityIndex 0.2543

SVGs with chemical metadata

It's now possible to add some RDKit-specific metadata to the SVG output by the MolDraw2DSVG object and construct molecules from that data.

This is still beta level, and we can't guarantee backwards compatibility between releases (though we'll certainly try), but I'd love to get some feedback on whether or not it's useful.

In [56]:
from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
from rdkit.Chem import Draw
from IPython.display import SVG
In [57]:
doravirine = Chem.MolFromSmiles('Cn1c(n[nH]c1=O)Cn2ccc(c(c2=O)Oc3cc(cc(c3)Cl)C#N)C(F)(F)F')
ddoravirine = Draw.PrepareMolForDrawing(doravirine)
In [58]:
d = Draw.MolDraw2DSVG(250,200)
d.DrawMolecule(ddoravirine)
d.AddMoleculeMetadata(ddoravirine)
d.FinishDrawing()
svg = d.GetDrawingText()
SVG(svg)
Out[58]:
N N NH O N O O Cl N F F F
In [59]:
print(svg)
<?xml version='1.0' encoding='iso-8859-1'?>
<svg version='1.1' baseProfile='full'
              xmlns='http://www.w3.org/2000/svg'
                      xmlns:rdkit='http://www.rdkit.org/xml'
                      xmlns:xlink='http://www.w3.org/1999/xlink'
                  xml:space='preserve'
width='250px' height='200px' >
<rect style='opacity:1.0;fill:#FFFFFF;stroke:none' width='250' height='200' x='0' y='0'> </rect>
<path d='M 190.464,96.0401 192.56,104.336' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 192.56,104.336 194.656,112.632' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 192.655,119.52 187.474,125.735' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 187.474,125.735 182.293,131.949' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 198.512,117.271 206.612,120.514' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 206.612,120.514 214.712,123.757' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 182.293,131.949 186.712,138.972' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 186.712,138.972 191.132,145.995' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 187.117,131.854 190.21,136.771' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 190.21,136.771 193.304,141.687' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 182.293,131.949 161.673,130.572' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 196.284,148.685 207.364,145.886' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 213.565,140.933 214.138,132.345' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 214.138,132.345 214.712,123.757' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 215.812,125.506 222.949,121.015' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 222.949,121.015 230.086,116.524' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 213.611,122.008 220.748,117.517' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 220.748,117.517 227.885,113.026' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 161.673,130.572 157.961,123.021' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 157.961,123.021 154.249,115.471' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 154.863,108.582 159.46,101.72' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 159.46,101.72 164.057,94.8574' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 149.57,111.827 140.753,111.238' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 140.753,111.238 131.935,110.65' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 164.057,94.8574 154.94,76.3118' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 158.981,93.8991 152.598,80.9171' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 154.94,76.3118 134.32,74.935' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 134.32,74.935 122.818,92.1039' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 136.028,79.8108 127.977,91.829' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 134.32,74.935 125.202,56.3894' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 122.818,92.1039 131.935,110.65' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 122.818,92.1039 114.116,91.5229' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 114.116,91.5229 105.415,90.942' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 130.219,109.499 125.621,116.362' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 125.621,116.362 121.024,123.224' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 133.652,111.8 129.055,118.662' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 129.055,118.662 124.458,125.524' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 99.8906,94.1715 95.2932,101.034' style='fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 95.2932,101.034 90.6959,107.896' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 90.6959,107.896 70.0761,106.519' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 87.3275,111.814 72.8937,110.85' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 90.6959,107.896 99.8135,126.442' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 70.0761,106.519 58.5739,123.688' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 58.5739,123.688 67.6915,142.234' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 63.6506,124.647 70.033,137.629' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 58.5739,123.688 37.9541,122.311' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 67.6915,142.234 88.3113,143.611' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 88.3113,143.611 99.8135,126.442' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 86.6028,138.735 94.6544,126.717' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 88.3113,143.611 92.0234,151.161' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 92.0234,151.161 95.7356,158.712' style='fill:none;fill-rule:evenodd;stroke:#00CC00;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 37.9541,122.311 29.1368,121.723' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 29.1368,121.723 20.3196,121.134' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 35.5843,118.011 28.0896,117.511' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 28.0896,117.511 20.595,117.01' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 35.0336,126.259 27.5389,125.758' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 27.5389,125.758 20.0443,125.258' style='fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 125.202,56.3894 121.49,48.8387' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 121.49,48.8387 117.778,41.288' style='fill:none;fill-rule:evenodd;stroke:#33CCCC;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 125.202,56.3894 133.212,52.4516' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 133.212,52.4516 141.222,48.5138' style='fill:none;fill-rule:evenodd;stroke:#33CCCC;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 125.202,56.3894 117.193,60.3272' style='fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<path d='M 117.193,60.3272 109.183,64.265' style='fill:none;fill-rule:evenodd;stroke:#33CCCC;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1' />
<text x='192.541' y='119.52' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#0000FF' ><tspan>N</tspan></text>
<text x='190.314' y='152.884' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#0000FF' ><tspan>N</tspan></text>
<text x='207.364' y='147.821' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#0000FF' ><tspan>NH</tspan></text>
<text x='228.986' y='116.195' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O</tspan></text>
<text x='149.57' y='115.471' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#0000FF' ><tspan>N</tspan></text>
<text x='117.216' y='131.263' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O</tspan></text>
<text x='98.9812' y='94.1715' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000' ><tspan>O</tspan></text>
<text x='93.5256' y='165.601' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#00CC00' ><tspan>Cl</tspan></text>
<text x='14.349' y='124.379' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#0000FF' ><tspan>N</tspan></text>
<text x='113.558' y='41.288' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#33CCCC' ><tspan>F</tspan></text>
<text x='141.222' y='50.7161' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#33CCCC' ><tspan>F</tspan></text>
<text x='104.13' y='68.9513' style='font-size:6px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#33CCCC' ><tspan>F</tspan></text>
<metadata>
<rdkit:mol xmlns:rdkit = "http://www.rdkit.org/xml" version="0.9">
<rdkit:atom idx="1" atom-smiles="[CH3]" drawing-x="190.464" drawing-y="96.0401" x="4.34784" y="0.906131" z="0" />
<rdkit:atom idx="2" atom-smiles="[n]" drawing-x="195.526" drawing-y="116.076" x="4.7153" y="-0.548165" z="0" />
<rdkit:atom idx="3" atom-smiles="[c]" drawing-x="182.293" drawing-y="131.949" x="3.75473" y="-1.70026" z="0" />
<rdkit:atom idx="4" atom-smiles="[n]" drawing-x="193.299" drawing-y="149.44" x="4.55361" y="-2.96982" z="0" />
<rdkit:atom idx="5" atom-smiles="[nH]" drawing-x="213.335" drawing-y="144.377" x="6.0079" y="-2.60237" z="0" />
<rdkit:atom idx="6" atom-smiles="[c]" drawing-x="214.712" drawing-y="123.757" x="6.10783" y="-1.1057" z="0" />
<rdkit:atom idx="7" atom-smiles="[O]" drawing-x="232.203" drawing-y="112.751" x="7.3774" y="-0.306824" z="0" />
<rdkit:atom idx="8" atom-smiles="[CH2]" drawing-x="161.673" drawing-y="130.572" x="2.25806" y="-1.60033" z="0" />
<rdkit:atom idx="9" atom-smiles="[n]" drawing-x="152.555" drawing-y="112.026" x="1.59627" y="-0.254211" z="0" />
<rdkit:atom idx="10" atom-smiles="[cH]" drawing-x="164.057" drawing-y="94.8574" x="2.43115" y="0.991977" z="0" />
<rdkit:atom idx="11" atom-smiles="[cH]" drawing-x="154.94" drawing-y="76.3118" x="1.76935" y="2.33809" z="0" />
<rdkit:atom idx="12" atom-smiles="[c]" drawing-x="134.32" drawing-y="74.935" x="0.272687" y="2.43802" z="0" />
<rdkit:atom idx="13" atom-smiles="[c]" drawing-x="122.818" drawing-y="92.1039" x="-0.562188" y="1.19184" z="0" />
<rdkit:atom idx="14" atom-smiles="[c]" drawing-x="131.935" drawing-y="110.65" x="0.0996044" y="-0.154281" z="0" />
<rdkit:atom idx="15" atom-smiles="[O]" drawing-x="120.433" drawing-y="127.818" x="-0.735271" y="-1.40047" z="0" />
<rdkit:atom idx="16" atom-smiles="[O]" drawing-x="102.198" drawing-y="90.7272" x="-2.05886" y="1.29177" z="0" />
<rdkit:atom idx="17" atom-smiles="[c]" drawing-x="90.6959" drawing-y="107.896" x="-2.89373" y="0.0455775" z="0" />
<rdkit:atom idx="18" atom-smiles="[cH]" drawing-x="70.0761" drawing-y="106.519" x="-4.3904" y="0.145507" z="0" />
<rdkit:atom idx="19" atom-smiles="[c]" drawing-x="58.5739" drawing-y="123.688" x="-5.22527" y="-1.10068" z="0" />
<rdkit:atom idx="20" atom-smiles="[cH]" drawing-x="67.6915" drawing-y="142.234" x="-4.56348" y="-2.4468" z="0" />
<rdkit:atom idx="21" atom-smiles="[c]" drawing-x="88.3113" drawing-y="143.611" x="-3.06681" y="-2.54673" z="0" />
<rdkit:atom idx="22" atom-smiles="[cH]" drawing-x="99.8135" drawing-y="126.442" x="-2.23194" y="-1.30054" z="0" />
<rdkit:atom idx="23" atom-smiles="[Cl]" drawing-x="97.4289" drawing-y="162.156" x="-2.40502" y="-3.89284" z="0" />
<rdkit:atom idx="24" atom-smiles="[C]" drawing-x="37.9541" drawing-y="122.311" x="-6.72194" y="-1.00075" z="0" />
<rdkit:atom idx="25" atom-smiles="[N]" drawing-x="17.3343" drawing-y="120.935" x="-8.21861" y="-0.900822" z="0" />
<rdkit:atom idx="26" atom-smiles="[C]" drawing-x="125.202" drawing-y="56.3894" x="-0.389105" y="3.78414" z="0" />
<rdkit:atom idx="27" atom-smiles="[F]" drawing-x="116.085" drawing-y="37.8437" x="-1.0509" y="5.13026" z="0" />
<rdkit:atom idx="28" atom-smiles="[F]" drawing-x="143.748" drawing-y="47.2718" x="0.957012" y="4.44593" z="0" />
<rdkit:atom idx="29" atom-smiles="[F]" drawing-x="106.657" drawing-y="65.507" x="-1.73522" y="3.12235" z="0" />
<rdkit:bond idx="1" begin-atom-idx="1" end-atom-idx="2" bond-smiles="-" />
<rdkit:bond idx="2" begin-atom-idx="2" end-atom-idx="3" bond-smiles="-" />
<rdkit:bond idx="3" begin-atom-idx="3" end-atom-idx="4" bond-smiles="=" />
<rdkit:bond idx="4" begin-atom-idx="4" end-atom-idx="5" bond-smiles="-" />
<rdkit:bond idx="5" begin-atom-idx="5" end-atom-idx="6" bond-smiles="-" />
<rdkit:bond idx="6" begin-atom-idx="6" end-atom-idx="7" bond-smiles="=" />
<rdkit:bond idx="7" begin-atom-idx="3" end-atom-idx="8" bond-smiles="-" />
<rdkit:bond idx="8" begin-atom-idx="8" end-atom-idx="9" bond-smiles="-" />
<rdkit:bond idx="9" begin-atom-idx="9" end-atom-idx="10" bond-smiles="-" />
<rdkit:bond idx="10" begin-atom-idx="10" end-atom-idx="11" bond-smiles="=" />
<rdkit:bond idx="11" begin-atom-idx="11" end-atom-idx="12" bond-smiles="-" />
<rdkit:bond idx="12" begin-atom-idx="12" end-atom-idx="13" bond-smiles="=" />
<rdkit:bond idx="13" begin-atom-idx="13" end-atom-idx="14" bond-smiles="-" />
<rdkit:bond idx="14" begin-atom-idx="14" end-atom-idx="15" bond-smiles="=" />
<rdkit:bond idx="15" begin-atom-idx="13" end-atom-idx="16" bond-smiles="-" />
<rdkit:bond idx="16" begin-atom-idx="16" end-atom-idx="17" bond-smiles="-" />
<rdkit:bond idx="17" begin-atom-idx="17" end-atom-idx="18" bond-smiles="=" />
<rdkit:bond idx="18" begin-atom-idx="18" end-atom-idx="19" bond-smiles="-" />
<rdkit:bond idx="19" begin-atom-idx="19" end-atom-idx="20" bond-smiles="=" />
<rdkit:bond idx="20" begin-atom-idx="20" end-atom-idx="21" bond-smiles="-" />
<rdkit:bond idx="21" begin-atom-idx="21" end-atom-idx="22" bond-smiles="=" />
<rdkit:bond idx="22" begin-atom-idx="21" end-atom-idx="23" bond-smiles="-" />
<rdkit:bond idx="23" begin-atom-idx="19" end-atom-idx="24" bond-smiles="-" />
<rdkit:bond idx="24" begin-atom-idx="24" end-atom-idx="25" bond-smiles="#" />
<rdkit:bond idx="25" begin-atom-idx="12" end-atom-idx="26" bond-smiles="-" />
<rdkit:bond idx="26" begin-atom-idx="26" end-atom-idx="27" bond-smiles="-" />
<rdkit:bond idx="27" begin-atom-idx="26" end-atom-idx="28" bond-smiles="-" />
<rdkit:bond idx="28" begin-atom-idx="26" end-atom-idx="29" bond-smiles="-" />
<rdkit:bond idx="29" begin-atom-idx="6" end-atom-idx="2" bond-smiles="-" />
<rdkit:bond idx="30" begin-atom-idx="14" end-atom-idx="9" bond-smiles="-" />
<rdkit:bond idx="31" begin-atom-idx="22" end-atom-idx="17" bond-smiles="-" />
</rdkit:mol></metadata>
</svg>

In [31]:
nm = Chem.MolFromRDKitSVG(svg)
nm.ClearComputedProps()
Chem.SanitizeMol(nm)
nm
Out[31]:
In [32]:
Chem.MolToSmiles(nm) == Chem.MolToSmiles(doravirine)
Out[32]:
True
In [ ]: