convert trans double bond to cis

User 870ab5b546

15-10-2007 20:19:25

Hi,





I have a cyclohexene ring; the double bond is obviously cis. I move the atoms around, which makes the double bond trans. After doing some processing, I want to convert the double bond back to cis. I use the MolBond.transformCT() method, and it sets the bond's stereo flag back to cis, but afterwards, a clean2D() on the molecule, instead of making the bond cis, simply sets the flag back to trans! Is there a way to set the bond back to cis without calculating where to move the atoms?





-- Bob

ChemAxon 25dcd765a3

16-10-2007 19:31:04

Hi Bob,


Changing the bond flags to CIS or TRANS has only meaning if the molecule is in 0D. Otherwise the CIS or TRANS information is calculated from the coordinates.


So you should set somewhere in your code the molecule dimension to 0D, and then clean it to 2D or 3D.





Andras

User 870ab5b546

05-11-2007 21:40:29

That works, as long as I use setStereo2Flags(), and not transformCT().





Thanks.

ChemAxon 25dcd765a3

06-11-2007 09:37:39

Hi Bob,





transformCT(..)


does not stores the Cis/Trans information in the flags. It just transforms it to the specified reference frame.


see:


http://www.chemaxon.com/marvin/doc/api/chemaxon/struc/MolBond.html#transformCT(chemaxon.struc.CNode,%20chemaxon.struc.CNode,%20int)





the setStereo2Flags() stores it in the flags that is why it is working.


Andras