> For example, if I read in a mol2 into OB and wish to delete a carbon atom,
> replace it with an oxygen and re-write that into a new file (that has all the
> carbon’s extra hydrogens deleted and in general a chemically correct
> molecule). Something in those lines.
>
I think that would be something like:
OBMol mol; // read in from mol2 somewhere
OBAtom carbonAtom; // set to particular carbon atom
mol.DeleteHydrogens(carbonAtom);
carbonAtom.SetAtomicNum(8);
mol.AddHydrogens(carbonAtom);
// then write the file
Hope that helps,
-Geoff
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss