Hide impilict hydrogen in Markush structures

User 55ffa2f197

29-11-2012 21:57:18

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){
}

User 55ffa2f197

04-12-2012 13:26:51

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

ChemAxon 2c555f5717

05-12-2012 09:37:23

Sorry for the late answer.


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



I hope it will help you. If you have any fiurther question, please don't hesitate to find us!

User 55ffa2f197

09-12-2012 23:40:25

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

ChemAxon f052bdfe3c

10-12-2012 08:40:36

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


Best Regards,


Efi

User 55ffa2f197

10-12-2012 13:38:36

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

ChemAxon f052bdfe3c

17-12-2012 21:46:08

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







User 55ffa2f197

18-12-2012 20:49:38

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

ChemAxon d26931946c

06-03-2013 13:54:31

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