Hi Greg,

Argh, I’d missed that we hadn’t done the ring calculation on the reagents, and 
had been led astray by Googling the exception message. Adding the ring 
calculation does the trick - thanks very much for the help.

Regards,
Mark


Dr Mark Mackey
Chief Scientific Officer
Cresset



From: Greg Landrum <greg.land...@gmail.com>
Sent: 14 September 2021 06:01
To: Mark Mackey <m...@cresset-group.com>
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Reaction SMARTS ring properties

Hi Mark,

You haven't shown how the molecules in reagentsRdMolList are constructed, but 
from the error message I guess that they have been created without running any 
of the sanitization code.
The example transformation you show includes ring information, so it will 
generate errors if the molecules you run through the reaction don't have the 
ring information pre-computed.
If you don't care about ring size information, the fastest way to get the 
required info is to call MolOps::fastFindRings() on the molecules in 
reagentsRdMolList before passing them to rxn->runReactants().
If you include ring size (or ring count) information in your transformations, 
then using MolOps::symmetrizeSSSR() is a better idea.

I hope that helps,
-greg


On Tue, Sep 14, 2021 at 12:33 AM Mark Mackey via Rdkit-discuss 
<rdkit-discuss@lists.sourceforge.net<mailto:rdkit-discuss@lists.sourceforge.net>>
 wrote:
Hi all,

I’m trying to run some chemical reactions using the C++ API. Doing something 
like

text = “ 
[cH1:1]1:[c:2](-[CH2:7]-[CH2:8]-[NH2:9]):[c:3]:[c:4]:[c:5]:[c:6]:1.[#6:11]-[CH1;R0:10]=[OD1]>>[c:1]12:[c:2](-[CH2:7]-[CH2:8]-[NH1:9]-[C:10]-2(-[#6:11])):[c:3]:[c:4]:[c:5]:[c:6]:1c1cc(CCN)ccc1”;
auto rxn =RDKit::RxnSmartsToChemicalReaction(text, nullptr, false);
rxn->initReactantMatchers();
auto reactionProducts = rxn->runReactants(reagentsRdMolList, 0);

works fine for trivial transformations, but throws “RingInfo not initialized” 
for anything more complex. Googling has shown that the problem is that the ring 
information is not automatically calculated for the SMARTS molecules, but I’m 
failing to work out what I need to call RDKit::MolOps::findSSSR on and when. 
All pointers appreciated.

Regards,
Mark

Dr Mark Mackey
Chief Scientific Officer
Cresset




This email has been sent from Cresset BioMolecular Discovery Limited, 
registered in England and Wales, Company Number: 04151475. The information in 
this email and any attachments are confidential and may be privileged. It is 
intended solely for the addressee and access to this email by anyone else is 
unauthorised. If an addressing or transmission error has misdirected this 
email, please notify the author by replying to this email. If you are not the 
intended recipient you must not use, disclose, distribute, store or copy the 
information in any medium. Although this e-mail and any attachments are 
believed to be free from any virus or other defect which might affect any 
system into which they are opened or received, it is the responsibility of the 
recipient to check that they are virus-free and that they will in no way affect 
systems and data. No responsibility is accepted by Cresset BioMolecular 
Discovery Limited for any loss or damage arising in any way from their receipt, 
opening or use. Privacy notice<https://www.cresset-group.com/privacy/>
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to