xh s
2017-04-25 21:26:07 UTC
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
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