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
Hide impilict hydrogen in Markush structures
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
Dong

Joined: 02 Mar 2010
Posts: 193

View user's profile

Back to top
Link to postPosted: Thu Nov 29, 2012 10:57 pmPost subject: Hide impilict hydrogen in Markush structures Reply with quote

Hi, We have Markush structures from patents stored in database as Blob, these are chemdraw files (.cdx) , I can read these blobs out and using toBinFormat to convert the molecule to png image. However the implicit H attached to C alwyas shown. I attemped to remove them but no success. I am using JChem 5.8.2 API. Following is my code snippet. I also observed that when I load the chemdraw file into Marvin view, initially the H is also shown, and I have to do View->Implicit Hydrogens -> Off to hide them. I have also attached the chemdraw structure I tried. In addition the circles around A, B, C atoms in chemdraw also got remvoed from the image generated from toBinFormat. Can you let me know how I can remove the H's

Dong

My code snippet:

Molecule mol = new Molecule();
Blob cdxBlob = rs.getBlob("file_blob");
Byte[] allBytesInBlob = cdxBlob.getBytes(1, (int) cdxBlob.length());
try {
    MolImporter.importMol(allBytesInBlob, mol);
    Hydrogen.removeAllHatoms(mol); 
} catch (MolFormatException e){
}
     
try {
    indImg = MolExporter.exportToBinFormat(mol, "png:w300,h300,b32,#00ffff00"); 
    } catch (IOException e){
}




 Filename: US20050075367.cdx    Filesize: 4.84 KB    Downloaded: 203 Time(s)
 Description:  original chemdraw with A, B, C are circuled
Dong

Joined: 02 Mar 2010
Posts: 193

View user's profile

Back to top
Link to postPosted: Tue Dec 04, 2012 2:26 pmPost subject: Reply with quote

This is really boiled down to how to prevent the impilict H shows up in the image generated from toBinFormat, does anyone know how to do this through API? As I said in Marvin Viewer you can do View->Impilicit H ->Off to achieve this

Thanks

Dong

bzaicsek
ChemAxon personnel
Joined: 10 Oct 2012
Posts: 266

View user's profile

Back to top
Link to postPosted: Wed Dec 05, 2012 10:37 amPost subject: image export Hydrogen options Reply with quote

Sorry for the late answer.

You can give the hydrogen display options to the Image Export util like this:


  • MolExporter.exportToBinFormat(mol, "png:w300,h300,b32,#00ffff00,H_off");
    • all implicit hydrogens will be hidden
  • MolExporter.exportToBinFormat(mol, "png:w300,h300,b32,#00ffff00,H_hetero");
    • only heteroatoms will have implicit hydrogens
  • MolExporter.exportToBinFormat(mol, "png:w300,h300,b32,#00ffff00,H_heteroterm");
    • only heteroatoms and terminal atoms will show the impicit hydrogens
  • MolExporter.exportToBinFormat(mol, "png:w300,h300,b32,#00ffff00,H_all");
    • every implicit hydrogen will be displayed
I hope it will help you. If you have any fiurther question, please don't hesitate to find us!
Dong

Joined: 02 Mar 2010
Posts: 193

View user's profile

Back to top
Link to postPosted: Mon Dec 10, 2012 12:40 amPost subject: Reply with quote

it works great, now the implicit H are hidden. I am not that familiar with the Marvin format syntax. However the circles around A, B in original ChemDraw files are gone. I suppose Marvin does not suport the shape from ChemDraw. In Markush the circles and eclipse are quite common. It would be nice those lines can be converted by Marvin as well.

Dong

Eufrozina
ChemAxon personnel
Joined: 13 Dec 2010
Posts: 843

View user's profile

Back to top
Link to postPosted: Mon Dec 10, 2012 9:40 amPost subject: Reply with quote

Thank you, for your suggestion. We will consider it.

Best Regards,

Efi

Dong

Joined: 02 Mar 2010
Posts: 193

View user's profile

Back to top
Link to postPosted: Mon Dec 10, 2012 2:38 pmPost subject: Reply with quote

Would it be available in next version of the Marvin? Does it have a ticket number?

Eufrozina
ChemAxon personnel
Joined: 13 Dec 2010
Posts: 843

View user's profile

Back to top
Link to postPosted: Mon Dec 17, 2012 10:46 pmPost subject: Reply with quote

Dear Dong,

Sorry for the late answer, I needed time to think it over.

First, we discussed with the CORE team  that "the circles around A, B in original ChemDraw files are gone" and they agreed: it is a bug occurs during cdx import and they will fix it. The fix is targeted for version 5.12.1.

Concerning drawing and displaying this circles you can draw them, using "Insert">"Graphics">"Ellipse" option from the menu. Please check the attached file. Would this solution work for you?

Best Regards,

Efi








 Filename: circled_atoms.mrv    Filesize: 2.92 KB    Downloaded: 283 Time(s)
 Description:  
Dong

Joined: 02 Mar 2010
Posts: 193

View user's profile

Back to top
Link to postPosted: Tue Dec 18, 2012 9:49 pmPost subject: Reply with quote

Hi Efi,

Thanks for the response. I usually do not draw the funacy stuff in Marvin Sketcher, most of the chemists do that when they describe the reaction schemes. It would be nice if Marvin can transcribe all the information in the drawing. Good to know you added it to the list.

Thanks again!

Dong

Peter
ChemAxon personnel
Joined: 28 Feb 2008
Posts: 310

View user's profile

Back to top
Link to postPosted: Wed Mar 06, 2013 2:54 pmPost subject: Reply with quote

Dear Dong,

I would like to inform you that we managed to fix the missing circles issue and it will be available in 5.12.1.

Regards,

Peter

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