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