Change of bond representations by addExplicitHydrogens

User f05f6b8c05

16-01-2013 12:41:00

 


Hi,


 


In order to standardize drawings, I perform these commands on all user structures:


 


mol.addExplicitHydrogens(0);


mol.implicitizeHydrogens(MolAtom.ALL_H & ~MolAtom.LONELY_H & ~MolAtom.ISOTOPE_H & ~MolAtom.CHARGED_H & ~MolAtom.RADICAL_H & ~MolAtom.MAPPED_H & ~MolAtom.HCONNECTED_H & ~MolAtom.CTSPECIFIC_H  );


 


I call addExplicitHydrogens(0) in case user draw already as implicit any H's I would prefer to be explicit.


 


However, addExplicitHydrogens(0) (and also Marvin) can change bond representation (see attached pdf).


 


Is there a way to prevent the change in bond representation?


 


Thank you for any advice.


 


Best regards,


 


Andrew


 


 

ChemAxon e49cf225c6

16-01-2013 14:26:01

Hi,


Try calling mol.addExplicitHydrogens(0) with MoleculeGraph.OMIT_POSTCLEAN instead of 0.


http://www.chemaxon.com/marvin/help/developer/core/hydrogens.html


 


I hope that will work for you.

User f05f6b8c05

16-01-2013 14:45:52

Yes, that works well!  Thank you!