Dear RDKitters,

I have question about rdkit reaction function.
I want to generate molecules using several reaction steps.
I referred rdkit blog post, and wrote following code.
But second step of reaction caused error.
I could not difference about mol and mol2 object.
I wonder if anyone could help me.
Best regards,

Takayuki


In [1]: from rdkit import Chem

In [2]: from rdkit.Chem import AllChem

In [3]: mol = Chem.MolFromSmiles("c1ccc(F)cc1")

In [6]: rxn = AllChem.ReactionFromSmarts('[cH&$(c(c)c):2]>>[c:2][F]')

#first step works fine.

In [7]: ps = rxn.RunReactants((mol,))

#Bud second step did not work...

In [9]: mol2 = ps[0][0]

In [11]: ps = rxn.RunReactants((mol2,))

[22:23:10]


****

Pre-condition Violation

getNumImplicitHs() called without preceding call to calcImplicitValence()

Violation occurred on line 166 in file
/Users/landrgr1/anaconda3/anaconda/conda-bld/work/Code/GraphMol/Atom.cpp

Failed Expression: d_implicitValence>-1

****


---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

<ipython-input-11-9e3b0e79dbd7> in <module>()

----> 1 ps = rxn.RunReactants((mol2,))


RuntimeError: Pre-condition Violation
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to