Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Should be able to do intramolecular bond breaking in reactions. #58

Closed
acaly opened this issue Jul 3, 2013 · 8 comments
Closed

Should be able to do intramolecular bond breaking in reactions. #58

acaly opened this issue Jul 3, 2013 · 8 comments
Assignees
Milestone

Comments

@acaly
Copy link

acaly commented Jul 3, 2013

I'm using C++ interface.
Reaction: [O:4].[O:2]=[C:1][N:3]>>C:1[O:4].[N:3]
Reactants:
O
C1CCC(=O)NC1
Should give: NCCCCC(=O)O
But rdkit gives: CCCCC(=O)O + CCCCN

Also I want to know how to write a intra-molecule reaction in SMARTS. I tried
(C:1[OH].[N:3])>>[O:2]=[C:1][N:3] and succeeded. Is that right?

@greglandrum
Copy link
Member

On Jul 3, 2013, at 3:53 PM, Wu Zhenwei notifications@github.com wrote:

I'm using C++ interface.
Reaction: [O:4].[O:2]=[C:1][N:3]>>C:1[O:4].[N:3]
Reactants:
O
C1CCC(=O)NC1
Should give: NCCCCC(=O)O
But rdkit gives: CCCCC(=O)O + CCCCN

Also I want to know how to write a intra-molecule reaction in SMARTS. I tried
(C:1[OH].[N:3])>>[O:2]=[C:1][N:3] and succeeded. Is that right?

The first C should be in square brackets, but otherwise that looks right to me.

@acaly
Copy link
Author

acaly commented Jul 4, 2013

Thanks for replying.
Oh that's a mistake. but rdkit still gives the wrong answer when i use
[O:2]=[C:1][N:3].[O:4]>>C:1[OH:4].[N:3]
as the reaction and C1CCC(=O)NC1 + O as the reactants:
CCCCC(=O)O + CCCCN.
I also tried [O:2]=[C:1][N:3].[O:4]>>(C:1[OH:4].[N:3]) which throws a exception when parsing.
so is there a way i can make the intro-molecule hydrolysis reaction working properly?

@greglandrum
Copy link
Member

Problem 1:
You've got O:2 mapped in the reactants, but not in the products. This causes that atom to be removed when you run the reaction.

Problem 2:
You've told the code that you have two products, so you get two products. There's not currently a good way in reaction SMARTS to indicate that a bond is broken but that there may be one or more products.

@acaly
Copy link
Author

acaly commented Jul 4, 2013

I've checked my SMARTS this time. I think there's something wrong in the input box of github...
If there's no direct way, can I break the bond (firstly check if it's in a ring), add flags onto the two atoms and then use a rdkit reaction to change it to what i want?

@greglandrum
Copy link
Member

On Thu, Jul 4, 2013 at 9:23 AM, Wu Zhenwei notifications@github.com wrote:

I've checked my SMARTS this time. I think there's something wrong in the
input box of github...
If there's no direct way, can I break the bond (firstly check if it's in a
ring), add flags onto the two atoms and then use a rdkit reaction to change
it to what i want?

re: text box
you might want to try either indenting the lines by four spaces or
surrounding them with triple quotes (''') so that github treats them as
code snippets.

For the intramolecular case: yes, you could find the bond using a
substructure search, break it (in an RWMol), and then add the O directly to
the RWMol. No need to use a reaction at all.

@greglandrum
Copy link
Member

I'm changing the subject and marking this as an enhancement request: it should be possible to express intramolecular bond breaking reactions in reaction smarts.

One could imagine a syntax like this:
[O:2]=[C:1][N:3]>>([O:2]=[C:1]O.[N:3])

@acaly
Copy link
Author

acaly commented Jul 4, 2013

Thanks a lot.
My English is really poor

@NadineSchneider
Copy link
Contributor

this was done in commit 8aac978

@greglandrum greglandrum added this to the 2014_09_1 milestone Aug 22, 2014
@greglandrum greglandrum self-assigned this Aug 22, 2014
jackzzs pushed a commit to rdkix/rdkix that referenced this issue Mar 20, 2024
Co-authored-by: Create or Update Pull Request Action <create-or-update-pull-request@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants