Skip to content

added a new reaction type to allow drawing '=' sign for a Net reaction - #981

Closed
parit wants to merge 2 commits into
cdk:mainfrom
parit:undir-reaction
Closed

added a new reaction type to allow drawing '=' sign for a Net reaction#981
parit wants to merge 2 commits into
cdk:mainfrom
parit:undir-reaction

Conversation

@parit

@parit parit commented Jun 22, 2023

Copy link
Copy Markdown

Currently, cdk doesn't allow to draw "=" to represent a 'Net reaction' as is present in most of the textbooks. This is also used the Rhea database to represent an 'Undirected' reaction. https://www.rhea-db.org/help/reaction-side-direction#Reaction_directions

This patch introduces a new reaction type, purely for the purpose of drawing. Please feel free to review and suggest changes.

@johnmay

johnmay commented Jun 23, 2023

Copy link
Copy Markdown
Member

Do you have any more examples outside of RHEA? I think they just didn’t have the proper arrow types and it does not seem correct to me

@johnmay

johnmay commented Jun 23, 2023

Copy link
Copy Markdown
Member

How many of these (#/%) are these in Rhea?
Can you also give more context on "net reaction" it's not something I'm familiar with.
I somewhat feel like perhaps a single line might be better, or make the '=' shorter by default. Note Rhea use "=>" which would normally be retrosynthetic.

Orthogonal to this we probably need a BIDIRECTIONAL_UNBALANCED, MULTISTEP. The second doesn't really fit as a "direction" but would be useful.

For reference here are ChemDraw's arrows:
Screenshot 2023-06-23 at 08 59 02

@parit

parit commented Jun 23, 2023

Copy link
Copy Markdown
Author

Hello,

In Rhea, there are separate forward, backward, bidirectional and undirected reactions for each transformation. So, for ex:

https://www.rhea-db.org/rhea/23884 (undirected)
https://www.rhea-db.org/rhea/23885 (forward)
https://www.rhea-db.org/rhea/23886 (backward)
https://www.rhea-db.org/rhea/23887 (bi)

All these talk about the same transformation but directions are different.

@johnmay

johnmay commented Jun 23, 2023

Copy link
Copy Markdown
Member

However, it is useful in kinetics to distinguish this from a net reaction, which is written either with two one-sided arrows or an "equal" sign.

I think the two one sided arrow (EQUILIBRIUM) is now preferred there. (I'm on the working group for the new IUPAC reaction standards).

If you make it a bit smaller (i.e. like an equal sign) then I will merge. You should be able to do this by just not drawing the lines to full length.

@redaschi

Copy link
Copy Markdown

Hi John,

neither Parit nor I are chemists, so we may not always use the correct terminology, sorry for that. This isn't about step reactions, overall/net reactions, etc.

Let me try to explain where we are coming from: We are both working on the Rhea and UniProt databases. The Rhea database was originally created to structure the textual representations of the reactions described by the IUBMB (https://iubmb.qmul.ac.uk/), here is an example where you can see that the IUBMB uses the '=' sign: https://iubmb.qmul.ac.uk/enzyme/EC1/1/1/1.html

We have used these IUBMB text representations for many years to annotate enzymes in UniProt, until in 2018 we replaced everything we could with reactions from the Rhea database: https://www.uniprot.org/release-notes/2018-12-05-release. Our interpretation of '=' is not equilibrium, because we do not make a statement about kinetics, we merely want to say that enzyme X catalyzes A + B = C. When we have experimental evidence for the net flow in vivo, we will add that the enzyme catalyzes the forward ('->') or reverse ('<-') direction (or both depending on conditions), but this information is not always available. So for annotating enzymes in UniProt we need '=', '->' and '<-'. For historic reasons unknown to us, Rhea has also what we call bi-directional, but we do not use these in UniProt.

Rhea has currently ~15,000 reactions (https://www.rhea-db.org/) and these are used to annotate enzymes in over 26 mio UniProt records: https://www.uniprot.org/uniprotkb?query=(cc_catalytic_activity:%22rhea:*%22). Look for "Catalytic activity" in https://www.uniprot.org/uniprotkb/Q9BV79/entry to see how this currently loooks. Parit is trying to use CDK to improve the current visualization of these reactions.

I hope this helps to understand our use case.

Regards,
Nicole

@johnmay

johnmay commented Jun 27, 2023

Copy link
Copy Markdown
Member

Yes I understand, I did my PhD in ChEBI :-). I was mere commenting on the linked page you have the following which shows an equilibrium arrow and '=' used interchangeably:

Screenshot 2023-06-27 at 20 53 33

I understand sometimes you don't know which direction it goes and that's useful for Rhea to differentiate that.

Like I said - make it smaller/prettier and I'll merge.

@redaschi

Copy link
Copy Markdown

Yes I understand, I did my PhD in ChEBI :-)

I thought I had heard your name before :-)

Like I said - make it smaller/prettier and I'll merge.

OK, got it. Thanks!

@parit

parit commented Aug 29, 2023

Copy link
Copy Markdown
Author

@johnmay Hi, Sorry for the delay. I made some corrections. Please look at the generated image.

@johnmay

johnmay commented Aug 29, 2023

Copy link
Copy Markdown
Member

No worries, looks good. A lot changed recently in the ReactionDepiction so I need to rebase. Will try and find time today.

@johnmay

johnmay commented Aug 29, 2023

Copy link
Copy Markdown
Member

Alas the recent changes to the reaction drawing to support multi-step depictions were too much to rebase. I've redone the changes on the current main in #1009 and also tweaked the method a little to be a bit cleaner (avoiding the 0.08 fudge that was in there for sizing).

@johnmay

johnmay commented Sep 8, 2023

Copy link
Copy Markdown
Member

Done in #1009

@johnmay johnmay closed this Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants