Or more succintly, with obabel 2.3.1 I have:

C:\Users\Noel>obabel -:[Al]C#N -oinchi -xK -xX Recmet
==============================
*** Open Babel Warning  in InChI code
  #1 :Metal was disconnected
♥
1 molecule converted

...which is rather sweet, but probably not the desired outcome. :-)

Do you have time to take a look Chris?

- Noel

On 9 December 2011 19:51, Ken Smith <k.w.sm...@qub.ac.uk> wrote:
> Folks
>
> I'm trying to use Openbabel to generate a non-standard InChIKey for a few of
> my metal cyanides and isocyanides (because configurations produce the same
> Standard InChIKey).
>
> Below is my code.  Execution of the code leaving the comments intact yields
> the Standard InChI and Standard InChIKey (with the expected disconnected
> metal warnings).
>
> ==============================
> *** Open Babel Warning  in InChI code
>   #0 :Metal was disconnected
> ==============================
> *** Open Babel Warning  in InChI code
>   #0 :Metal was disconnected
> InChI: InChI=1S/CN.Al/c1-2;
> InChIKey: HWKFKJIIRKPLHF-UHFFFAOYSA-N
>
>
> Removing the comments to add the RecMet option (to reconnect the metal and
> therefore end up with different InChIs and InChIKeys for my cyanide and
> isocyanide species) seems to break the InChIKey part of the code (it's not
> generated).
>
>
> ==============================
> *** Open Babel Warning  in InChI code
>   #0 :Metal was disconnected
> ==============================
> *** Open Babel Warning  in InChI code
>   #0 :Metal was disconnected
> InChI: InChI=1/CN.Al/c1-2;/rCAlN/c2-1-3
> InChIKey:
>
>
>
> Any ideas?  Note that I get similar behaviour if I try to use obabel
> directly.
>
>
>
> Cheers,
>
> Ken
>
>
>
>
> def getInChIAndInChIKey(smilesString):
>
>    inchi = None
>    inchikey = None
>
>    mol = ob.OBMol()
>
>    conv = ob.OBConversion()
>
>    conv.SetInAndOutFormats("smi", "inchi")
>    conv.ReadString(mol, smilesString)
>
>    conv.AddOption("X", conv.OUTOPTIONS, "DoNotAddH")
> #   conv.AddOption("X", conv.OUTOPTIONS, "RecMet")
>
>    inchi = conv.WriteString(mol).rstrip()
>
>    conv.SetOptions("K", conv.OUTOPTIONS)
>    conv.AddOption("X", conv.OUTOPTIONS, "DoNotAddH")
> #   conv.AddOption("X", conv.OUTOPTIONS, "RecMet")
>
>    inchikey = conv.WriteString(mol).rstrip()
>
>    return(inchi, inchikey)
>
>
> ------------------------------------------------------------------------------
> Cloud Services Checklist: Pricing and Packaging Optimization
> This white paper is intended to serve as a reference, checklist and point of
> discussion for anyone considering optimizing the pricing and packaging model
> of a cloud services business. Read Now!
> http://www.accelacomm.com/jaw/sfnl/114/51491232/
> _______________________________________________
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to