On 11/07/2012 18:51, James Jack wrote:
>
> When I convert this to a 3D molfile with "add explicit H" checked in the
> OpenBabel GUI or I try the same in code the OH seems to become O- (O
> with a negative charge).
>
In the GUI you need to check "Add hydrogens (make explicit)" but have 
the editbox labelled "Add hydrogens appropriate for this pH" on the next 
line empty.

In code something like
  pMol->AddHydrogens(false, false);

But this may not be necessary.

If you use "Generate 3D coordinates" in the GUI or something like
  OBOp* pOp = OBOp::FindType("gen3D");
  if(pOp)
   pOp->Do(pMol);
in code, explicit hydrogens are added automatically.

Chris

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to