Hi,
I'm just wondering what's the best way to change the charge of certain atom
in a OBMol.
For example, I want to find a way to represent the reaction [Cl-] + CH3OH
---> [OH-] + CH3Cl. Once I've converted the SMILES [Cl-].CO to a OBMol
through OBConversion, what's the best way to transform it to the products
and also keep track of everything going on in the molecule, such as bonds,
formal charges and all the bookkeeping stuff?
Here's how I do it now (pseudo code):
mol.DeleteBond(C - O);
mol.NewBond(C - Cl);
However this leave me with OH + [CH3Cl]-, i.e. the charge is on the wrong
fragment. Is there a way to fix this? or I should've done it a completely
different way?
Thanks in advance for any help!
Xianghai
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss