Technical Support Forum Index
Technical Support Forum
Access ChemAxon scientists and developers here. For registration and login issues contact website support.

Support Ticket System is replacing forum

This forum was converted into a searchable archive. You cannot add posts here any more. For support please use our new Ticket System.

Create your first ticket
Layout / Clean 2D should consider electron flow arrows
To watch this topic for replies  Register (enables digests) or give email address:
This topic is locked: you cannot edit posts or make replies.
Display posts from previous:   
    View previous topic :: View next topic    
Author Message
Jonathan

Joined: 08 Jan 2007
Posts: 20

View user's profile

Back to top
Link to postPosted: Fri Jul 27, 2007 11:59 pmPost subject: Layout / Clean 2D should consider electron flow arrows Reply with quote

When the system generates a 2D layout for a molecule or reaction, it should consider electron flow arrows, and particularly, any bonds that *will* be formed.

Attached is the file for 2 molecules and the electron flow arrows to indicate a Diels-Alder reaction. The 2 molecules considered independently are layed out well and the arrows all technically have the correct sources and sinks.

Considered altogether however, the layout has issues. It is especially clear as the dashed (forming) bond intersect each other.

I've already thought of and tested a cheap algorithm to get around this, and was going to try hacking it together myself, but it seems like it would be more appropriate to patch the underlying layout engine. The idea is...

(1) Identify where all of the new bonds would be formed by the electron flows (this apparently is already doable since MarvinView knows where to put the dashed bonds)
(2) Actually add explicit "bonds" in place of these forming ones, but set them to some other type (i.e., the "any" bond type).
(3) Run the Clean 2D layout engine on the total diagram, including these formed bonds.
(4) Remove the explicitly added forming bonds, to revert back to a normal state.

The above should produce a decent layout. An example of the above algorithm applied is attached (mockLayout). One remaining issue is that the 2 reacting molecules tend to look too close together. If possible, the explicitly added "forming" bonds should be locked to a bond length of 2.5-3.0 Angstroms before generating the layout to address this issue as well.



 Filename: DielsAlderMechanism.mockLayout.mrv    Filesize: 2.32 KB    Downloaded: 477 Time(s)
 Description:  Adjusted layout using mock bond algorithm

 Filename: DielsAlderMechanism.mrv    Filesize: 2.19 KB    Downloaded: 470 Time(s)
 Description:  Electron flow arrow diagram for a Diels-Alder reaction, but with a messy auto-generated layout
Szilveszter

Joined: 10 Jul 2004
Posts: 243

View user's profile

Back to top
Link to postPosted: Sat Jul 28, 2007 12:22 pmPost subject: Reply with quote

Hello, thank you for the suggestion, I tried with the new version and seems even the new cleaning algorithm is not producing good images. So I forward you request to my colleague who is implementing the cleaning related things.
Jonathan

Joined: 08 Jan 2007
Posts: 20

View user's profile

Back to top
Link to postPosted: Fri Oct 10, 2008 2:10 amPost subject: Reply with quote

I was hoping this feature would be added to the inherent cleaning engine, but it apparently has not yet. I finally went ahead and tried composing my own custom version of the clean function around the standard one which seems to mostly produce the my desired effect.

I attached a code snippet of the method I put together for this purpose. I'm hoping that something comparable can be integrated into the built-in molecule.clean function.



 Filename: clean2DMechanism.java    Filesize: 2.94 KB    Downloaded: 397 Time(s)
 Description:  Code snippet for custom layout cleaning with consideration for mechanism arrows
Volfi
ChemAxon personnel
Joined: 07 Jun 2004
Posts: 996

View user's profile

Back to top
Link to postPosted: Sun Oct 12, 2008 8:18 pmPost subject: Reply with quote

Hi,

Thank you very much for the effort you made to make the cleaning code more correct. I will examine the code and include it to the Clean2D algorithm. I hope I can manage to do it to the next minor release Marvin 5.1.3.

Andras
Volfi
ChemAxon personnel
Joined: 07 Jun 2004
Posts: 996

View user's profile

Back to top
Link to postPosted: Wed Oct 15, 2008 5:17 pmPost subject: Reply with quote

Hi,

I have included your code into the cleaning process.
I really appreciate your important contribution!

Andras
This topic is locked: you cannot edit posts or make replies.
Page 1 of 1


To watch this topic for replies   Register (enables digests) or give email address  
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum