Hi Noel,

Many thanks for your answer which is exactly what I'm looking for. However,
for some reason the hydrogens are still not being added when I use the
command. I've attached the CIF file in case I have missed something.

Thanks,

Scott

On 10 September 2012 22:46, Noel O'Boyle <baoille...@gmail.com> wrote:

> (Forgot to cc to the list)
>
> Hi Scott,
>
> The missing information is what bonds connect the heavy atoms as
> without this it's not possible to deduce where (and how many) the
> hydrogens are. But there should be no need to worry about this. Just
> use Open Babel to convert the cif file and add hydrogens:
>
> obabel myfile.cif -O myfile.xyz -h
>
> Behind the scenes, OB determines (i.e. wise guesses) the bond orders
> (i.e. single, double, etc.), and then "-h" tells it to add hydrogens.
> These are added in 3D space based on the coodinates of the
> neighbouring atoms.
>
>
> On 8 September 2012 18:01, scott_m <js...@cam.ac.uk> wrote:
> > I have a problem with the following smiles [O][N][C]([C])[C] and related
> > smiles. When I try to add hydrogens nothing happens. The correct formula
> is
> > C3H7NO. It looks to be some problem with the square brackets but I don't
> > know how to automatically adjust the smiles so that it will add the right
> > amount of H's to match the chemical formula.
> >
> > Background: I have a number of CIF files and I want to extract the 3D
> > coordinate information of the molecules but the H's are not always
> listed in
> > the coordinate section (despite being in the formula). To fix this I was
> > hoping to add hydrogens with openbabel.
> >
> > Thanks,
> >
> > Scott
> >
> >
> >
> > --
> > View this message in context:
> http://forums.openbabel.org/Adding-Hydrogens-not-working-tp4655446.html
> > Sent from the General discussion mailing list archive at Nabble.com.
> >
> >
> ------------------------------------------------------------------------------
> > 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
>
>

Attachment: ACEOXM.cif
Description: Binary data

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