I think I'm using the latter and other hydrogens are added, but not the one I 
mentioned.  Using version 2.3.

Best Regards,

James

-----Original Message-----
From: Chris Morley [mailto:c.mor...@gaseq.co.uk]
Sent: 13 July 2012 14:52
To: James Jack
Cc: openbabel-disc...@lists.sf.net
Subject: Re: [Open Babel] (no subject)

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


Accelrys Limited (http://accelrys.com)
Registered office: 334 Cambridge Science Park, Cambridge, CB4 0WN, UK
Registered in England: 2326316


------------------------------------------------------------------------------
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