This list is closed, nobody may subscribe to it.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(5) |
Jul
(1) |
Aug
|
Sep
|
Oct
(1) |
Nov
(10) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(3) |
Feb
(10) |
Mar
(5) |
Apr
(12) |
May
(8) |
Jun
(9) |
Jul
(3) |
Aug
(11) |
Sep
|
Oct
(26) |
Nov
(21) |
Dec
(20) |
2007 |
Jan
(10) |
Feb
(32) |
Mar
(14) |
Apr
(13) |
May
(44) |
Jun
(13) |
Jul
(18) |
Aug
(26) |
Sep
(17) |
Oct
(3) |
Nov
(10) |
Dec
(8) |
2008 |
Jan
(20) |
Feb
(8) |
Mar
(28) |
Apr
(18) |
May
(22) |
Jun
(13) |
Jul
(4) |
Aug
(2) |
Sep
(19) |
Oct
(17) |
Nov
(8) |
Dec
(10) |
2009 |
Jan
(4) |
Feb
(3) |
Mar
(12) |
Apr
(15) |
May
(7) |
Jun
(1) |
Jul
(13) |
Aug
(3) |
Sep
(5) |
Oct
(2) |
Nov
(14) |
Dec
(13) |
2010 |
Jan
(9) |
Feb
(6) |
Mar
(21) |
Apr
(12) |
May
(4) |
Jun
|
Jul
(2) |
Aug
(15) |
Sep
(3) |
Oct
(1) |
Nov
(18) |
Dec
(6) |
2011 |
Jan
(7) |
Feb
(13) |
Mar
(17) |
Apr
(7) |
May
(16) |
Jun
(21) |
Jul
(15) |
Aug
(11) |
Sep
(12) |
Oct
(3) |
Nov
(14) |
Dec
(4) |
2012 |
Jan
(10) |
Feb
(4) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2013 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: kohai.raul <koh...@gm...> - 2011-01-24 14:52:27
|
Tested! I did not noticed this detail ... too many hours typing and the simple becomes invisible!! Very much thanks, Noel, 2011/1/24 Noel O'Boyle [via Open Babel] < ml-...@n4...<ml-node%2B3...@n4...> > > You need to set the input format before calling ReadString. Also > ReadString returns False if it fails. See the API at > > http://openbabel.org/api/2.3/classOpenBabel_1_1OBConversion.shtml#a93558e9c89cda2e1a4f9fb2cadc5c8d1 > > Regards, > Noel > > On 23 January 2011 22:57, kohai.raul <[hidden email]<http://user/SendEmail.jtp?type=node&node=3233628&i=0>> > wrote: > > > > > Hi all!! > > > > I'm testing OpenBabel 2.2.3 with Perl Bindings, and found a very very > > strange behaviour related to OBConversion. > > > > By now, I created a simple perl script 'smiles2anything.pl' > > > > ==== smiles2anything.pl ======== > > > > #!/usr/bin/perl > > > > use Chemistry::OpenBabel; > > > > $smiles = shift; > > $service = shift; > > > > my $obMolIn = new Chemistry::OpenBabel::OBMol; > > my $obConv = new Chemistry::OpenBabel::OBConversion; > > > > $obConv->ReadString($obMolIn, $smiles); > > $obConv->SetInAndOutFormats("SMI", $service); > > my $obOut=$obConv->WriteString($obMolIn); > > > > print ("$obOut"); > > > > ==== Shell ==== > > > > I've used it as follows: > > > > $ ./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' > 'INCHI' > > > > But the result is: > > > > *** Open Babel Error in InChI code > > InChI generation failed > > > > ?????? > > > > ==== After that ==== > > > > after that, and many many many tests ... I found that if I apply the > > following "ununderstandable" variation, everything changes!! :-? > > > > #!/usr/bin/perl > > > > use Chemistry::OpenBabel; > > > > $smiles = shift; > > $service = shift; > > > > my $obMolIn = new Chemistry::OpenBabel::OBMol; > > my $obConv = new Chemistry::OpenBabel::OBConversion; > > > > $obConv->ReadString($obMolIn, $smiles); > > $obConv->SetInAndOutFormats("SMI", "MOL"); > > my $obOut=$obConv->WriteString($obMolIn); > > > > $obMolIn->Clear(); > > $obConv->ReadString($obMolIn, $smiles); > > $obConv->SetInAndOutFormats("SMI", $service); > > my $obOut=$obConv->WriteString($obMolIn); > > > > print ("$obOut"); > > > > ==== SHELL 2nd attempt ====== > > > > And now.... :-O > > > > $./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' > 'INCHI' > > > > InChI=1S/C3H8BO2/c1-3-6-4-5-2/h3H,1,4H2,2H3/q-1 > > > > ======================= > > > > Is this behaviour normal??? does anyone with similar problems?? > > > > Best Regards, > > > > > > > > -- > > View this message in context: > http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3233147.html<http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3233147.html?by-user=t> > > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > > > > ------------------------------------------------------------------------------ > > > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > > Finally, a world-class log management solution at an even better > price-free! > > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > > February 28th, so secure your free ArcSight Logger TODAY! > > http://p.sf.net/sfu/arcsight-sfd2d > > _______________________________________________ > > OpenBabel-scripting mailing list > > [hidden email] <http://user/SendEmail.jtp?type=node&node=3233628&i=1> > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > ------------------------------------------------------------------------------ > > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better > price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > OpenBabel-scripting mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=3233628&i=2> > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3233628.html > To unsubscribe from Very Strange behaviour OBConversion. Perl Bindings, click > here<http://forums.openbabel.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3233147&code=a29oYWkucmF1bEBnbWFpbC5jb218MzIzMzE0N3wtMTg3MTk2NzAx>. > > -- -- Raúl Cruz foro.fuentedepermacultura.org "pro-curando..." -- View this message in context: http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3234161.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2011-01-24 09:46:54
|
You need to set the input format before calling ReadString. Also ReadString returns False if it fails. See the API at http://openbabel.org/api/2.3/classOpenBabel_1_1OBConversion.shtml#a93558e9c89cda2e1a4f9fb2cadc5c8d1 Regards, Noel On 23 January 2011 22:57, kohai.raul <koh...@gm...> wrote: > > Hi all!! > > I'm testing OpenBabel 2.2.3 with Perl Bindings, and found a very very > strange behaviour related to OBConversion. > > By now, I created a simple perl script 'smiles2anything.pl' > > ==== smiles2anything.pl ======== > > #!/usr/bin/perl > > use Chemistry::OpenBabel; > > $smiles = shift; > $service = shift; > > my $obMolIn = new Chemistry::OpenBabel::OBMol; > my $obConv = new Chemistry::OpenBabel::OBConversion; > > $obConv->ReadString($obMolIn, $smiles); > $obConv->SetInAndOutFormats("SMI", $service); > my $obOut=$obConv->WriteString($obMolIn); > > print ("$obOut"); > > ==== Shell ==== > > I've used it as follows: > > $ ./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' 'INCHI' > > But the result is: > > *** Open Babel Error in InChI code > InChI generation failed > > ?????? > > ==== After that ==== > > after that, and many many many tests ... I found that if I apply the > following "ununderstandable" variation, everything changes!! :-? > > #!/usr/bin/perl > > use Chemistry::OpenBabel; > > $smiles = shift; > $service = shift; > > my $obMolIn = new Chemistry::OpenBabel::OBMol; > my $obConv = new Chemistry::OpenBabel::OBConversion; > > $obConv->ReadString($obMolIn, $smiles); > $obConv->SetInAndOutFormats("SMI", "MOL"); > my $obOut=$obConv->WriteString($obMolIn); > > $obMolIn->Clear(); > $obConv->ReadString($obMolIn, $smiles); > $obConv->SetInAndOutFormats("SMI", $service); > my $obOut=$obConv->WriteString($obMolIn); > > print ("$obOut"); > > ==== SHELL 2nd attempt ====== > > And now.... :-O > > $./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' 'INCHI' > > InChI=1S/C3H8BO2/c1-3-6-4-5-2/h3H,1,4H2,2H3/q-1 > > ======================= > > Is this behaviour normal??? does anyone with similar problems?? > > Best Regards, > > > > -- > View this message in context: http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3233147.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! > Finally, a world-class log management solution at an even better price-free! > Download using promo code Free_Logger_4_Dev2Dev. Offer expires > February 28th, so secure your free ArcSight Logger TODAY! > http://p.sf.net/sfu/arcsight-sfd2d > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: kohai.raul <koh...@gm...> - 2011-01-24 00:03:08
|
I'm sorry... problems with html tags have hidden php portion. Now the message are readable -- View this message in context: http://forums.openbabel.org/MOL-file-as-string-by-parameter-and-JME-tp3233189p3233199.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: kohai.raul <koh...@gm...> - 2011-01-23 23:50:38
|
Hi all, I'm using a perl script to make SMI2anything conversions (commented on another thread). The first thing; I would like to know if there exist some way to pass a molfile as string (for apply to OBconversion -> ReadString) Reasons about this.... ======= I want to found an easy way to have OpenBabel on php ... I have been trying with PECL:: PERL, hoping I could embed Perl code directly in php, but I have not gotten any satisfactory result when I try to embed OpenBabel callings. Methods return nothing. After many hours looking for and testing, I've found the following solution that seems to work, cause the main problem was how to return to PHP a response from PERL:: <?php //an example $smiles=$_GET["smiles"]; $service=$_GET["service"]; $file="/absolute-path-to/smiles2anything.pl '$smiles' '$service'"; $myVar = ""; ob_start(); passthru("$file"); $myVar = ob_get_contents(); ob_end_clean (); print " ".$myVar." "; //myVar contains the output messages from perl script ?> I want to apply this to interact with JME editor (and with ajax / direct script injection in background). To get smiles (from jme) and obtain canonicals, inchi, vmol, sdf, all through web-interface and on-the-fly (from ob)... and to get molfile (from jme) and obtain smiles, canonicals, inchi (from ob).... But ... some problems I have 1 - From a SMILES obtained from JME -> [H]C([H])=C([H])O[B-]([H])([H])OC([H])[H] -> I obtained the Molfile (from the same JME): [H]C([H])=C([H])O[B-]([H])([H])OC([H])[H] JME 2010.01.2 Sun Jan 23 18:30:27 CET 2011 13 12 0 0 0 0 0 0 0 0999 V2000 0.9096 1.0095 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0100 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 3.4884 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 4.5979 0.4898 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 4.1781 0.3698 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 2.9886 3.8482 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 4.1881 6.4071 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 1.4993 4.8578 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 4.7578 3.2185 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 0.7097 1.2494 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.6497 3.2085 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 4.3380 1.2994 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 3.3485 4.7678 0.0000 B 0 5 0 0 0 0 0 0 0 0 0 0 1 10 1 0 0 0 0 2 10 1 0 0 0 0 3 11 1 0 0 0 0 4 12 1 0 0 0 0 5 12 1 0 0 0 0 6 13 1 0 0 0 0 7 13 1 0 0 0 0 8 11 1 0 0 0 0 8 13 1 0 0 0 0 9 12 1 0 0 0 0 9 13 1 0 0 0 0 10 11 2 0 0 0 0 M CHG 1 13 -1 M END But when I tried to SMI->SDF with OpenBabel I obtained a different mol: OpenBabel01241100252D 13 12 0 0 0 0 0 0 0 0999 V2000 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0.0000 0.0000 0.0000 B 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 O 0 0 0 0 0 0.0000 0.0000 0.0000 C 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 0.0000 0.0000 0.0000 H 0 0 0 0 0 1 2 1 0 0 0 2 3 1 0 0 0 2 4 2 0 0 0 4 5 1 0 0 0 4 6 1 0 0 0 6 7 1 0 0 0 7 8 1 0 0 0 7 9 1 0 0 0 7 10 1 0 0 0 10 11 1 0 0 0 11 12 1 0 0 0 11 13 1 0 0 0 M CHG 1 7 -1 M END $$$$ If I try to passing this latest mol to JME, doesn't accept it!! I'm not chemist, and don't understand why there exist these differences... anyone could help me?? MOLfile (V2000) recognised by JME is not SDF compatible (or MDL, MOL, etc)?? why these differences?? 2 - 2nd attempt, to try MOL2anything the same way, i.e., to get molFile from JME and obtain smiles, inchis, etc from OpenBabel... this is related to my first question in this email, about how to pass MolFile as String to Obconv->ReadString. I tried to enclose between ' ' but doesn't work Someone could help to me? Best Regards, -- View this message in context: http://forums.openbabel.org/MOL-file-as-string-by-parameter-and-JME-tp3233189p3233189.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: kohai.raul <koh...@gm...> - 2011-01-23 22:57:43
|
Hi all!! I'm testing OpenBabel 2.2.3 with Perl Bindings, and found a very very strange behaviour related to OBConversion. By now, I created a simple perl script 'smiles2anything.pl' ==== smiles2anything.pl ======== #!/usr/bin/perl use Chemistry::OpenBabel; $smiles = shift; $service = shift; my $obMolIn = new Chemistry::OpenBabel::OBMol; my $obConv = new Chemistry::OpenBabel::OBConversion; $obConv->ReadString($obMolIn, $smiles); $obConv->SetInAndOutFormats("SMI", $service); my $obOut=$obConv->WriteString($obMolIn); print ("$obOut"); ==== Shell ==== I've used it as follows: $ ./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' 'INCHI' But the result is: *** Open Babel Error in InChI code InChI generation failed ?????? ==== After that ==== after that, and many many many tests ... I found that if I apply the following "ununderstandable" variation, everything changes!! :-? #!/usr/bin/perl use Chemistry::OpenBabel; $smiles = shift; $service = shift; my $obMolIn = new Chemistry::OpenBabel::OBMol; my $obConv = new Chemistry::OpenBabel::OBConversion; $obConv->ReadString($obMolIn, $smiles); $obConv->SetInAndOutFormats("SMI", "MOL"); my $obOut=$obConv->WriteString($obMolIn); $obMolIn->Clear(); $obConv->ReadString($obMolIn, $smiles); $obConv->SetInAndOutFormats("SMI", $service); my $obOut=$obConv->WriteString($obMolIn); print ("$obOut"); ==== SHELL 2nd attempt ====== And now.... :-O $./openbabel-bridge.pl '[H]C([H])=C([H])O[B-]([H])([H])OC([H])[H]' 'INCHI' InChI=1S/C3H8BO2/c1-3-6-4-5-2/h3H,1,4H2,2H3/q-1 ======================= Is this behaviour normal??? does anyone with similar problems?? Best Regards, -- View this message in context: http://forums.openbabel.org/Very-Strange-behaviour-OBConversion-Perl-Bindings-tp3233147p3233147.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2010-12-20 09:35:18
|
Hi Richard, It seems that those instructions need to be updated. Since OB 2.3.0, %BABEL_DATADIR% now points to a subfolder of the OB install directory. As you've found, this does not contain OBGUI.exe, but that's okay. I'll update these now... - Noel On 19 December 2010 21:44, R.L. Marchese-Robinson <rl...@ca...> wrote: > Hi, > > Upon installing OpenBabel 2.3.0a (for Windows XP), I seem to get > essentially the same output from the command prompt and when importing > pybel as suggedted by: > http://openbabel.org/docs/2.3.0/UseTheLibrary/PythonInstall.html > > The only key difference being that dir "%BABEL_DATADIR%"\OBGUI.exe gives: > Volume in drive C has no label. > Volume Serial Number is 2CCE-1566 > > Directory of C:\Program Files\OpenBabel-2.3.0\data > > File Not Found > > However, I am not missing this executable - it is in the next level up. > > I'm pretty sure I don't need to modify BABEL_DATADIR to point to this upper > level directory, but would be grateful if this could be confirmed. > > Thanks in advance for any assistance, > > Richard Marchese Robinson > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: R.L. Marchese-R. <rl...@ca...> - 2010-12-19 22:04:47
|
Hi, Upon installing OpenBabel 2.3.0a (for Windows XP), I seem to get essentially the same output from the command prompt and when importing pybel as suggedted by: http://openbabel.org/docs/2.3.0/UseTheLibrary/PythonInstall.html The only key difference being that dir "%BABEL_DATADIR%"\OBGUI.exe gives: Volume in drive C has no label. Volume Serial Number is 2CCE-1566 Directory of C:\Program Files\OpenBabel-2.3.0\data File Not Found However, I am not missing this executable - it is in the next level up. I'm pretty sure I don't need to modify BABEL_DATADIR to point to this upper level directory, but would be grateful if this could be confirmed. Thanks in advance for any assistance, Richard Marchese Robinson |
From: Ken S. <k.w...@qu...> - 2010-12-14 11:24:21
|
Hi Folks Just some quick feedback re: the development code... Thanks for fixing the SMILES to InChI issues with alkali metals. This is now working fine: python getInchiFromSmiles.py [K] InChI=1S/K ZLMJMSJWJFRBEC-UHFFFAOYSA-N Note, however, that I'm still getting the disconnected metal error for InChI to InChIKey. My code spits the "generated" InChI back to me... python getInchiKeyFromInchi.py InChI=1S/K ============================== *** Open Babel Warning in InChI code #0 :Metal was disconnected ============================== *** Open Babel Warning in InChI code #0 :Metal was disconnected InChI=1S/K.H NTTOTNSKUYCDAV-UHFFFAOYSA-N Cheers, Ken On 8 Dec 2010, at 18:46, Ken Smith wrote: > Thanks for the message Noel. I've not yet signed up to the lists, > so I didn't get it... > > I get exactly the same disconnected metal error when I convert from > InChI to InChIKey for (e.g.) Alkali metals - e.g.: > > $ python getInchiKeyFromInchi.py InChI=1S/Na > > ============================== > *** Open Babel Warning in InChI code > #0 :Metal was disconnected > ============================== > *** Open Babel Warning in InChI code > #0 :Metal was disconnected > InChI=1S/Na.H > MPMYQQHEHYDOCL-UHFFFAOYSA-N > > > The code just takes an InChI and gives the generated InChI and > InChIKey back. Code below... > > Ken > > > > import openbabel as ob > import sys > > def getInChIAndInChIKey(inchiString): > conv = ob.OBConversion() > conv.SetInAndOutFormats("inchi", "inchi") > > mol = ob.OBMol() > conv.ReadString(mol, inchiString) > inchi = conv.WriteString(mol).rstrip() > conv.SetOptions("K", conv.OUTOPTIONS) > inchikey = conv.WriteString(mol).rstrip() > return(inchi, inchikey) > > > def main(argv = None): > if argv is None: > argv = sys.argv > > if len(argv) != 2: > sys.exit("Usage: getInchiKeyFromInchi.py <InChI format>") > > inchiInput = argv[1] > inchi, inchikey = getInChIAndInChIKey(inchiInput) > > print inchi > print inchikey > > return 0 > > > > if __name__ == '__main__': > main() > > > > On 7 Dec 2010, at 18:39, Noel O'Boyle wrote: > >> ...in case you didn't get this... >> >> >> ---------- Forwarded message ---------- >> From: Chris Morley <c.m...@ga...> >> Date: 7 December 2010 17:47 >> Subject: Re: [OpenBabel-scripting] InChI and SMILES >> To: ope...@li... >> >> >> On 07/12/2010 16:09, Noel O'Boyle wrote: >>> The InChI key is available as an option of the InChI format: >>> http://baoilleach.blogspot.com/2008/10/generating-inchis-mini-me-inchikey.html >>> >>> So no need for SMILES... >>> >>> BTW, it's handier for me if you send OB questions to the mailing >>> list >>> rather than directly to me. It gives someone else a chance to >>> answer..:-) >> >> viz... >> >>>> I need to create a table of InChIs and InChIKeys for all the >>>> elements and >>> >>>> their common isotopes. I couldn't see an easy way of using >>>> OpenBabel >>>> (python) to generate the keys from hand-cranked InChIs, so I >>>> tried using >>>> SMILES (which means I need to learn the SMILES format, and I'm then >>>> constrained by its limitations). When I use it though, I get some >>>> disconnected metal errors that (as a non-chemist) I don't >>>> understand, and >>> >>>> the InChI I get has a hydrogen added. >> >> This is an OpenBabel bug. The InChI code is requested to add implicit >> hydrogen even when it should not, as in SMILES [Na]. This has been >> corrected in the development code for the next version, but it is >> difficult to see a work-around. I guess not many people have been >> using bare metal atoms, or at least not telling us when they get the >> wrong answer. Thank you for doing so. >> >> Chris >> >> ------------------------------------------------------------------------------ >> What happens now with your Lotus Notes apps - do you make another >> costly >> upgrade, or settle for being marooned without product support? Time >> to move >> off Lotus Notes and onto the cloud with Force.com, apps are easier >> to build, >> use, and manage than apps on traditional platforms. Sign up for the >> Lotus >> Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Ken S. <k.w...@qu...> - 2010-12-08 18:46:09
|
Thanks for the message Noel. I've not yet signed up to the lists, so I didn't get it... I get exactly the same disconnected metal error when I convert from InChI to InChIKey for (e.g.) Alkali metals - e.g.: $ python getInchiKeyFromInchi.py InChI=1S/Na ============================== *** Open Babel Warning in InChI code #0 :Metal was disconnected ============================== *** Open Babel Warning in InChI code #0 :Metal was disconnected InChI=1S/Na.H MPMYQQHEHYDOCL-UHFFFAOYSA-N The code just takes an InChI and gives the generated InChI and InChIKey back. Code below... Ken import openbabel as ob import sys def getInChIAndInChIKey(inchiString): conv = ob.OBConversion() conv.SetInAndOutFormats("inchi", "inchi") mol = ob.OBMol() conv.ReadString(mol, inchiString) inchi = conv.WriteString(mol).rstrip() conv.SetOptions("K", conv.OUTOPTIONS) inchikey = conv.WriteString(mol).rstrip() return(inchi, inchikey) def main(argv = None): if argv is None: argv = sys.argv if len(argv) != 2: sys.exit("Usage: getInchiKeyFromInchi.py <InChI format>") inchiInput = argv[1] inchi, inchikey = getInChIAndInChIKey(inchiInput) print inchi print inchikey return 0 if __name__ == '__main__': main() On 7 Dec 2010, at 18:39, Noel O'Boyle wrote: > ...in case you didn't get this... > > > ---------- Forwarded message ---------- > From: Chris Morley <c.m...@ga...> > Date: 7 December 2010 17:47 > Subject: Re: [OpenBabel-scripting] InChI and SMILES > To: ope...@li... > > > On 07/12/2010 16:09, Noel O'Boyle wrote: >> The InChI key is available as an option of the InChI format: >> http://baoilleach.blogspot.com/2008/10/generating-inchis-mini-me-inchikey.html >> >> So no need for SMILES... >> >> BTW, it's handier for me if you send OB questions to the mailing list >> rather than directly to me. It gives someone else a chance to >> answer..:-) > > viz... > >>> I need to create a table of InChIs and InChIKeys for all the >>> elements and >> >>> their common isotopes. I couldn't see an easy way of using >>> OpenBabel >>> (python) to generate the keys from hand-cranked InChIs, so I tried >>> using >>> SMILES (which means I need to learn the SMILES format, and I'm then >>> constrained by its limitations). When I use it though, I get some >>> disconnected metal errors that (as a non-chemist) I don't >>> understand, and >> >>> the InChI I get has a hydrogen added. > > This is an OpenBabel bug. The InChI code is requested to add implicit > hydrogen even when it should not, as in SMILES [Na]. This has been > corrected in the development code for the next version, but it is > difficult to see a work-around. I guess not many people have been > using bare metal atoms, or at least not telling us when they get the > wrong answer. Thank you for doing so. > > Chris > > ------------------------------------------------------------------------------ > What happens now with your Lotus Notes apps - do you make another > costly > upgrade, or settle for being marooned without product support? Time > to move > off Lotus Notes and onto the cloud with Force.com, apps are easier > to build, > use, and manage than apps on traditional platforms. Sign up for the > Lotus > Notes Migration Kit to learn more. http://p.sf.net/sfu/salesforce-d2d > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting |
From: Chris M. <c.m...@ga...> - 2010-12-07 17:47:58
|
On 07/12/2010 16:09, Noel O'Boyle wrote: > The InChI key is available as an option of the InChI format: > http://baoilleach.blogspot.com/2008/10/generating-inchis-mini-me-inchikey.html > > So no need for SMILES... > > BTW, it's handier for me if you send OB questions to the mailing list > rather than directly to me. It gives someone else a chance to > answer..:-) viz... >> I need to create a table of InChIs and InChIKeys for all the elements and > >> their common isotopes. I couldn't see an easy way of using OpenBabel >> (python) to generate the keys from hand-cranked InChIs, so I tried using >> SMILES (which means I need to learn the SMILES format, and I'm then >> constrained by its limitations). When I use it though, I get some >> disconnected metal errors that (as a non-chemist) I don't understand, and > >> the InChI I get has a hydrogen added. This is an OpenBabel bug. The InChI code is requested to add implicit hydrogen even when it should not, as in SMILES [Na]. This has been corrected in the development code for the next version, but it is difficult to see a work-around. I guess not many people have been using bare metal atoms, or at least not telling us when they get the wrong answer. Thank you for doing so. Chris |
From: Noel O'B. <bao...@gm...> - 2010-12-07 16:09:20
|
The InChI key is available as an option of the InChI format: http://baoilleach.blogspot.com/2008/10/generating-inchis-mini-me-inchikey.html So no need for SMILES... BTW, it's handier for me if you send OB questions to the mailing list rather than directly to me. It gives someone else a chance to answer..:-) - Noel On 7 December 2010 15:47, Ken Smith <k.w...@qu...> wrote: > Hi Noel > > Just a quick (probably stupid) question. > > I need to create a table of InChIs and InChIKeys for all the elements and > their common isotopes. I couldn't see an easy way of using OpenBabel > (python) to generate the keys from hand-cranked InChIs, so I tried using > SMILES (which means I need to learn the SMILES format, and I'm then > constrained by its limitations). When I use it though, I get some > disconnected metal errors that (as a non-chemist) I don't understand, and > the InChI I get has a hydrogen added. Can you point me in the right > direction? My preference is to avoid having to go via SMILES, but if not, a > SMILES workaround suffice for the time being. > > Cheers, > > Ken > > > E.g. below is some trivial python code to generate the InChI(Keys) from > SMILES. > > > python getInchiFromSmiles.py [Na] > > ============================== > *** Open Babel Warning in InChI code > #0 :Metal was disconnected > ============================== > *** Open Babel Warning in InChI code > #0 :Metal was disconnected > InChI=1S/Na.H > MPMYQQHEHYDOCL-UHFFFAOYSA-N > > > > > import openbabel as ob > import sys > > def getInChIAndInChIKey(smilesString): > conv = ob.OBConversion() > conv.SetInAndOutFormats("smi", "inchi") > > mol = ob.OBMol() > conv.ReadString(mol, smilesString) > inchi = conv.WriteString(mol).rstrip() > conv.SetOptions("K", conv.OUTOPTIONS) > inchikey = conv.WriteString(mol).rstrip() > return(inchi, inchikey) > > > def main(argv = None): > if argv is None: > argv = sys.argv > > if len(argv) != 2: > sys.exit("Usage: getInchiFromSmiles.py <SMILES format>") > > smiles = argv[1] > inchi, inchikey = getInChIAndInChIKey(smiles) > > print inchi > print inchikey > > return 0 > > > > if __name__ == '__main__': > main() > > > P.S. I'd also like to be able to represent protonated hydrogen (H3+), but > I've no idea how to represent that in SMILES. Presumably in InChI I use the > protonation layer if I want to hand-crank the InChI... > > > |
From: Noel O'B. <bao...@gm...> - 2010-11-11 17:19:18
|
Hi Daniel, You diagnosed the problem exactly. If a function returns a C array, it cannot be accessed (currently) from Python. So you will have to loop over each atom, but that should not be any problem. For example: molcoords = [atom.coords for atom in mol] To store all of the coordinates for all of the molecules in a file: allcoords = [[atom.coords for atom in mol] for mol in pybel.readfile("sdf", "myfile.sdf")] - Noel 2010/11/5 Daniel Álvarez García <alg...@gm...>: > Hello there, > > I'm new using pybel/openbabel and I encountered a problem that i don't know > how to solve... > I want to retrieve all the 3D coordinates for a molecule in a SDF file. So I > used mol.OBMol.GetCoordinates() > and all i got was this: > > <Swig Object of type 'double *' at 0xe55bd0> > > So, i guess this is a pointer to the actual values returned by the C > function and that SWIG does not know how to treat. > Is there any way to work this out? > I tried using numpy arrays as i did in some other ocassion i had a similar > issue, but this time it's not working :) > > I would appreciate some help! Or finally i will have to loop over each atom. > But it's not practical for retrieving coordinates of 100 molecules... > > Thanks in advance! > > -- > Daniel > > ------------------------------------------------------------------------------ > Centralized Desktop Delivery: Dell and VMware Reference Architecture > Simplifying enterprise desktop deployment and management using > Dell EqualLogic storage and VMware View: A highly scalable, end-to-end > client virtualization framework. Read more! > http://p.sf.net/sfu/dell-eql-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Geoffrey H. <ge...@ge...> - 2010-11-11 03:41:00
|
> Well, the formula is not updated after OBAtom.SetAtomicNum(), that's why I didn't test further yesterday, but the smiles changes. So it's is okay, I can perform the structure search. Without forgotting to mutate back the carbon into the original nitrogen for the next analog search… You'll want to use BeginModify / EndModify if you want to ensure the formula is updated. We cache the formula as custom data to save time. -Geoff |
From: Pascal M. <pas...@gm...> - 2010-11-10 10:17:01
|
Hi, > I tested OBAtom.SetAtomicNum(6) but it doesn't "mutate completely", if I > can say so, the atom. > > Well, the formula is not updated after OBAtom.SetAtomicNum(), that's why I didn't test further yesterday, but the smiles changes. So it's is okay, I can perform the structure search. Without forgotting to mutate back the carbon into the original nitrogen for the next analog search... Regards, Pascal |
From: Pascal M. <pas...@gm...> - 2010-11-10 08:24:09
|
Dear all, I'm trying to seek analogs of a set of molecules. Let's say I have mol-C(=O)-NH2. I seek different analogs, eg mol-CH2-NH2 or mol-C(=O)-CH3. My first step is to check formula. Eg for mol-CH2-NH2, the difference is -1O +2H, compared to the reference. Then i do a findall with the smarts of mol-CH2-NH2 on the reference mol-C(=O)-NH2. As mol-CH2-NH2 is a substructure of mol-C(=O)-NH2, I'm sure that's the corresponding amide which is modified. But if the N is replaced by a C: Ref. mol-C(=O)-NH2 --> potential analog mol-C(=O)-CH3 my formula check is OK (-1N +1C +1H), but the substructure doesn't match, of course. Knowing the atom id of the N of the amide in the reference molecule, I would like to mutate it in a carbon, so I would be able to do the substructure search (which will found the full molecule indeed, in this exemple). I tested OBAtom.SetAtomicNum(6) but it doesn't "mutate completely", if I can say so, the atom. Which function(s) should I use? My piece of code (pybel) - I welcome any comment about a better or another way of seeking this kind of analogs: (if formulaCheck) amideCONH2 = pybel.Smarts("[H]N([H])C=O") for numList in amideCONH2.findall(mol): for num in numList: if mol.atoms[num-1].OBAtom.GetAtomicNum() == 7: # Need to exchange this nitrogen atom with a carbon mol.atoms[num-1].OBAtom.SetAtomicNum(6) # change the atomic number, but the formula is not modified # Perform now structure check Many thanks again, Regards, Pascal |
From: Daniel Á. G. <alg...@gm...> - 2010-11-05 16:51:41
|
Hello there, I'm new using pybel/openbabel and I encountered a problem that i don't know how to solve... I want to retrieve all the 3D coordinates for a molecule in a SDF file. So I used mol.OBMol.GetCoordinates() and all i got was this: <Swig Object of type 'double *' at 0xe55bd0> So, i guess this is a pointer to the actual values returned by the C function and that SWIG does not know how to treat. Is there any way to work this out? I tried using numpy arrays as i did in some other ocassion i had a similar issue, but this time it's not working :) I would appreciate some help! Or finally i will have to loop over each atom. But it's not practical for retrieving coordinates of 100 molecules... Thanks in advance! -- Daniel |
From: Noel O'B. <bao...@gm...> - 2010-11-05 11:33:09
|
How about using an InChI and dropping the stereo information. See T option when writing (http://openbabel.org/docs/dev/FileFormats/InChI_format.html). - Noel On 5 November 2010 11:05, Pascal Muller <pas...@gm...> wrote: > Hello, > > I have stereoisomers (R/S and/or E/Z), among other different molecules, and > I would like to consider the stereoisomers as one unique molecule, before > doing other comparison on the molecules (like is function A replaced by > function B). > Is there an easy way do that whithin pybel, or should I do it in several > steps like > - delete stereo information > - generate canonical smiles > - compare smiles > ? > > Thanks for any tips, > Regards, > Pascal > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > |
From: Pascal M. <pas...@gm...> - 2010-11-05 11:05:34
|
Hello, I have stereoisomers (R/S and/or E/Z), among other different molecules, and I would like to consider the stereoisomers as one unique molecule, before doing other comparison on the molecules (like is function A replaced by function B). Is there an easy way do that whithin pybel, or should I do it in several steps like - delete stereo information - generate canonical smiles - compare smiles ? Thanks for any tips, Regards, Pascal |
From: Geoffrey H. <ge...@pi...> - 2010-11-04 22:26:06
|
> Sure, here is one: Works on my Mac. BTW, I usually use pybel.readfile("mol", "example.mol") instead of the string. This problem usually crops up when you have a subtle binary incompatibility, say between the compile options (or version) of libopenbabel and the format modules. Do you have: * multiple versions of open babel installed (e.g., MacPorts)? * multiple versions of python installed (e.g., MacPorts)? On an unrelated note, Noel and I may want to talk science. I'll e-mail you off-list. -Geoff --- Prof. Geoffrey Hutchison Assistant Professor, Department of Chemistry University of Pittsburgh http://hutchison.chem.pitt.edu/ Office: (412) 648-0492 |
From: Noel O'B. <bao...@gm...> - 2010-11-04 18:23:08
|
Can you attach the mol file? On 4 November 2010 17:39, Swank, Craig <Cra...@nr...> wrote: > sigh! > > Even though the install seemed to go well, when I read a 'mol' string (that was created by pybel on a linux box), I get a segmentation fault: > > In [7]: s > Out[7]: '3A_5-dpp monomer\n OpenBabel11031015593D\n\n 49 55 0 0 0 0 0 0 0 0999 V2000\n -2.5899 -1.3247 -0.1305 C 0 0 0 0 0\n -4.8885 -0.8780 -0.0582 C 0 0 0 0 0\n -4.2086 0.3339 0.0379 C 0 0 0 0 0\n -2.8090 0.1010 -0.0194 C 0 0 0 0 0\n -2.1309 1.3183 0.0016 C 0 0 0 0 0\n -4.4293 1.7609 0.1279 C 0 0 0 0 0\n -5.4381 2.4480 0.2402 O 0 0 0 0 0\n -3.1062 2.3176 0.0910 N 0 0 0 0 0\n -2.9406 3.7475 0.2701 C 0 0 0 0 0\n -2.2474 3.9662 1.0879 H 0 0 0 0 0\n -2.5919 4.2364 -0.6467 H 0 0 0 0 0\n -3.9300 4.1390 0.5147 H 0 0 0 0 0\n 1.7823 1.3125 -0.1005 C 0 0 0 0 0\n 1.3663 2.6236 -0.2715 C 0 0 0 0 0\n 0.4265 0.2281 0.0703 S 0 0 0 0 0\n -0.0308 2.7657 -0.2514 C 0 0 0 0 0\n 2.0490 3.4550 -0.4118 H 0 0 0 0 0\n -0.7158 1.5658 -0.0669 C 0 0 0 0 0\n -0.5159 3.7205 -0.3901 H 0 0 0 0 0\n -6.3097 -1.1217 -0.0706 C 0 0 0 0 0\n -7.0155 -2.2816 -0.3674 C 0 0 0 0 0\n -7.4366 0.1810 0.3141 S 0 0 0 0 0\n -8.4200 -2.1317 -0.2780 C 0 0 0 0 0\n -6.5482 -3.2099 -0.6614 H 0 0 0 0 0\n -8.7899 -0.8623 0.0879 C 0 0 0 0 0\n -9.1241 -2.9313 -0.4800 H 0 0 0 0 0\n -9.7916 -0.4770 0.2278 H 0 0 0 0 0\n -1.5806 -2.0182 -0.1720 O 0 0 0 0 0\n -3.9171 -1.8764 -0.1583 N 0 0 0 0 0\n -4.0803 -3.3178 -0.1676 C 0 0 0 0 0\n -4.7229 -3.6481 0.6540 H 0 0 0 0 0\n -4.4894 -3.6753 -1.1193 H 0 0 0 0 0\n -3.0803 -3.7372 -0.0414 H 0 0 0 0 0\n 3.1215 0.7893 -0.0615 C 0 0 0 0 0\n 4.5479 1.8743 -0.2282 S 0 0 0 0 0\n 4.7454 -0.6544 0.0910 C 0 0 0 0 0\n 5.5675 0.4777 -0.0692 C 0 0 0 0 0\n 6.8951 0.0091 -0.0397 C 0 0 0 0 0\n 6.8191 -1.3847 0.1368 C 0 0 0 0 0\n 8.9776 -1.2658 0.0713 C 0 0 0 0 0\n 10.0170 -1.5702 0.0853 H 0 0 0 0 0\n 8.5738 0.4490 -0.1355 S 0 0 0 0 0\n 3.4076 -0.4853 0.0963 N 0 0 0 0 0\n 7.9767 -2.0927 0.1989 N 0 0 0 0 0\n 5.5061 -1.7980 0.2133 N 0 0 0 0 0\n 5.0180 -3.1509 0.4261 C 0 0 0 0 0\n 5.2367 -3.4889 1.4443 H 0 0 0 0 0\n 3.9383 -3.1488 0.2698 H 0 0 0 0 0\n 5.4908 -3.8337 -0.2848 H 0 0 0 0 0\n 1 4 1 0 0 0\n 1 28 2 0 0 0\n 1 29 1 0 0 0\n 2 3 2 0 0 0\n 2 20 1 0 0 0\n 2 29 1 0 0 0\n 3 4 1 0 0 0\n 3 6 1 0 0 0\n 4 5 2 0 0 0\n 5 8 1 0 0 0\n 5 18 1 0 0 0\n 6 7 2 0 0 0\n 6 8 1 0 0 0\n 8 9 1 0 0 0\n 9 10 1 0 0 0\n 9 11 1 0 0 0\n 9 12 1 0 0 0\n 13 14 2 0 0 0\n 13 15 1 0 0 0\n 13 34 1 0 0 0\n 14 16 1 0 0 0\n 14 17 1 0 0 0\n 15 18 1 0 0 0\n 16 18 2 0 0 0\n 16 19 1 0 0 0\n 20 21 2 0 0 0\n 20 22 1 0 0 0\n 21 23 1 0 0 0\n 21 24 1 0 0 0\n 22 25 1 0 0 0\n 23 25 2 0 0 0\n 23 26 1 0 0 0\n 25 27 1 0 0 0\n 29 30 1 0 0 0\n 30 31 1 0 0 0\n 30 32 1 0 0 0\n 30 33 1 0 0 0\n 34 35 1 0 0 0\n 34 43 2 0 0 0\n 35 37 1 0 0 0\n 36 37 2 0 0 0\n 36 43 1 0 0 0\n 36 45 1 0 0 0\n 37 38 1 0 0 0\n 38 39 2 0 0 0\n 38 42 1 0 0 0\n 39 44 1 0 0 0\n 39 45 1 0 0 0\n 40 41 1 0 0 0\n 40 42 1 0 0 0\n 40 44 2 0 0 0\n 45 46 1 0 0 0\n 46 47 1 0 0 0\n 46 48 1 0 0 0\n 46 49 1 0 0 0\nM END\n' > > In [8]: mol = pybel.readstring('mol', s) > zsh: segmentation fault ipython > > Am I hosed? > > Craig > > > > ________________________________________ > From: Noel O'Boyle [bao...@gm...] > Sent: Thursday, November 04, 2010 10:59 AM > To: Swank, Craig > Cc: ope...@li... > Subject: Re: [OpenBabel-scripting] installing openbabel python > > Ah. Eigen2 is required for the language bindings, I'm afraid. Let me > update that one straightaway. (Done) > > - Noel > > On 4 November 2010 16:35, Swank, Craig <Cra...@nr...> wrote: >> Thanks Noel, I had a feeling we were not on the same page. >> >> I deleted /usr/local/lib/openbabel and usr/local/include/openbabel-2.0, deleted anything related to pybel and openbabel in my site-packages dir, and then I followed the new instructions: >> >> % history >> 176 sudo rm -rf build >> 177 mkdir build >> 178 cd build >> 179 cmake ../src -DPYTHON_BINDINGS=ON -DPYTHON_PREFIX=/Users/craig/src/opv >> 180 cmake -j4 >> 181 make -j4 >> 182 sudo make install >> >> In the python shell, I'm still getting the same error: >> >> opv)Suva% python >> Python 2.6.4 (r264:75706, Nov 15 2009, 20:20:25) >> [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin >> Type "help", "copyright", "credits" or "license" for more information. >>>>> import pybel >> Traceback (most recent call last): >> File "<stdin>", line 1, in <module> >> File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> >> import openbabel as ob >> File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 98, in <module> >> _openbabel = swig_import_helper() >> File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 94, in swig_import_helper >> _mod = imp.load_module('_openbabel', fp, pathname, description) >> ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE >> Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so >> Expected in: dynamic lookup >> >> I tried again with my default python location instead of a virtualenv, but the same thing happends. >> >> Any ideas? >> >> Craig >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> The Next 800 Companies to Lead America's Growth: New Video Whitepaper >> David G. Thomson, author of the best-selling book "Blueprint to a >> Billion" shares his insights and actions to help propel your >> business during the next growth cycle. Listen Now! >> http://p.sf.net/sfu/SAP-dev2dev >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Swank, C. <Cra...@nr...> - 2010-11-04 17:41:57
|
sigh! Even though the install seemed to go well, when I read a 'mol' string (that was created by pybel on a linux box), I get a segmentation fault: In [7]: s Out[7]: '3A_5-dpp monomer\n OpenBabel11031015593D\n\n 49 55 0 0 0 0 0 0 0 0999 V2000\n -2.5899 -1.3247 -0.1305 C 0 0 0 0 0\n -4.8885 -0.8780 -0.0582 C 0 0 0 0 0\n -4.2086 0.3339 0.0379 C 0 0 0 0 0\n -2.8090 0.1010 -0.0194 C 0 0 0 0 0\n -2.1309 1.3183 0.0016 C 0 0 0 0 0\n -4.4293 1.7609 0.1279 C 0 0 0 0 0\n -5.4381 2.4480 0.2402 O 0 0 0 0 0\n -3.1062 2.3176 0.0910 N 0 0 0 0 0\n -2.9406 3.7475 0.2701 C 0 0 0 0 0\n -2.2474 3.9662 1.0879 H 0 0 0 0 0\n -2.5919 4.2364 -0.6467 H 0 0 0 0 0\n -3.9300 4.1390 0.5147 H 0 0 0 0 0\n 1.7823 1.3125 -0.1005 C 0 0 0 0 0\n 1.3663 2.6236 -0.2715 C 0 0 0 0 0\n 0.4265 0.2281 0.0703 S 0 0 0 0 0\n -0.0308 2.7657 -0.2514 C 0 0 0 0 0\n 2.0490 3.4550 -0.4118 H 0 0 0 0 0\n -0.7158 1.5658 -0.0669 C 0 0 0 0 0\n -0.5159 3.7205 -0.3901 H 0 0 0 0 0\n -6.3097 -1.1217 -0.0706 C 0 0 0 0 0\n -7.0155 -2.2816 -0.3674 C 0 0 0 0 0\n -7.4366 0.1810 0.3141 S 0 0 0 0 0\n -8.4200 -2.1317 -0.2780 C 0 0 0 0 0\n -6.5482 -3.2099 -0.6614 H 0 0 0 0 0\n -8.7899 -0.8623 0.0879 C 0 0 0 0 0\n -9.1241 -2.9313 -0.4800 H 0 0 0 0 0\n -9.7916 -0.4770 0.2278 H 0 0 0 0 0\n -1.5806 -2.0182 -0.1720 O 0 0 0 0 0\n -3.9171 -1.8764 -0.1583 N 0 0 0 0 0\n -4.0803 -3.3178 -0.1676 C 0 0 0 0 0\n -4.7229 -3.6481 0.6540 H 0 0 0 0 0\n -4.4894 -3.6753 -1.1193 H 0 0 0 0 0\n -3.0803 -3.7372 -0.0414 H 0 0 0 0 0\n 3.1215 0.7893 -0.0615 C 0 0 0 0 0\n 4.5479 1.8743 -0.2282 S 0 0 0 0 0\n 4.7454 -0.6544 0.0910 C 0 0 0 0 0\n 5.5675 0.4777 -0.0692 C 0 0 0 0 0\n 6.8951 0.0091 -0.0397 C 0 0 0 0 0\n 6.8191 -1.3847 0.1368 C 0 0 0 0 0\n 8.9776 -1.2658 0.0713 C 0 0 0 0 0\n 10.0170 -1.5702 0.0853 H 0 0 0 0 0\n 8.5738 0.4490 -0.1355 S 0 0 0 0 0\n 3.4076 -0.4853 0.0963 N 0 0 0 0 0\n 7.9767 -2.0927 0.1989 N 0 0 0 0 0\n 5.5061 -1.7980 0.2133 N 0 0 0 0 0\n 5.0180 -3.1509 0.4261 C 0 0 0 0 0\n 5.2367 -3.4889 1.4443 H 0 0 0 0 0\n 3.9383 -3.1488 0.2698 H 0 0 0 0 0\n 5.4908 -3.8337 -0.2848 H 0 0 0 0 0\n 1 4 1 0 0 0\n 1 28 2 0 0 0\n 1 29 1 0 0 0\n 2 3 2 0 0 0\n 2 20 1 0 0 0\n 2 29 1 0 0 0\n 3 4 1 0 0 0\n 3 6 1 0 0 0\n 4 5 2 0 0 0\n 5 8 1 0 0 0\n 5 18 1 0 0 0\n 6 7 2 0 0 0\n 6 8 1 0 0 0\n 8 9 1 0 0 0\n 9 10 1 0 0 0\n 9 11 1 0 0 0\n 9 12 1 0 0 0\n 13 14 2 0 0 0\n 13 15 1 0 0 0\n 13 34 1 0 0 0\n 14 16 1 0 0 0\n 14 17 1 0 0 0\n 15 18 1 0 0 0\n 16 18 2 0 0 0\n 16 19 1 0 0 0\n 20 21 2 0 0 0\n 20 22 1 0 0 0\n 21 23 1 0 0 0\n 21 24 1 0 0 0\n 22 25 1 0 0 0\n 23 25 2 0 0 0\n 23 26 1 0 0 0\n 25 27 1 0 0 0\n 29 30 1 0 0 0\n 30 31 1 0 0 0\n 30 32 1 0 0 0\n 30 33 1 0 0 0\n 34 35 1 0 0 0\n 34 43 2 0 0 0\n 35 37 1 0 0 0\n 36 37 2 0 0 0\n 36 43 1 0 0 0\n 36 45 1 0 0 0\n 37 38 1 0 0 0\n 38 39 2 0 0 0\n 38 42 1 0 0 0\n 39 44 1 0 0 0\n 39 45 1 0 0 0\n 40 41 1 0 0 0\n 40 42 1 0 0 0\n 40 44 2 0 0 0\n 45 46 1 0 0 0\n 46 47 1 0 0 0\n 46 48 1 0 0 0\n 46 49 1 0 0 0\nM END\n' In [8]: mol = pybel.readstring('mol', s) zsh: segmentation fault ipython Am I hosed? Craig ________________________________________ From: Noel O'Boyle [bao...@gm...] Sent: Thursday, November 04, 2010 10:59 AM To: Swank, Craig Cc: ope...@li... Subject: Re: [OpenBabel-scripting] installing openbabel python Ah. Eigen2 is required for the language bindings, I'm afraid. Let me update that one straightaway. (Done) - Noel On 4 November 2010 16:35, Swank, Craig <Cra...@nr...> wrote: > Thanks Noel, I had a feeling we were not on the same page. > > I deleted /usr/local/lib/openbabel and usr/local/include/openbabel-2.0, deleted anything related to pybel and openbabel in my site-packages dir, and then I followed the new instructions: > > % history > 176 sudo rm -rf build > 177 mkdir build > 178 cd build > 179 cmake ../src -DPYTHON_BINDINGS=ON -DPYTHON_PREFIX=/Users/craig/src/opv > 180 cmake -j4 > 181 make -j4 > 182 sudo make install > > In the python shell, I'm still getting the same error: > > opv)Suva% python > Python 2.6.4 (r264:75706, Nov 15 2009, 20:20:25) > [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> > import openbabel as ob > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 98, in <module> > _openbabel = swig_import_helper() > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 94, in swig_import_helper > _mod = imp.load_module('_openbabel', fp, pathname, description) > ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE > Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so > Expected in: dynamic lookup > > I tried again with my default python location instead of a virtualenv, but the same thing happends. > > Any ideas? > > Craig > > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Swank, C. <Cra...@nr...> - 2010-11-04 17:24:01
|
Right! >>> import pybel >>> No errors! Thanks for the help. Craig ________________________________________ From: Noel O'Boyle [bao...@gm...] Sent: Thursday, November 04, 2010 10:59 AM To: Swank, Craig Cc: ope...@li... Subject: Re: [OpenBabel-scripting] installing openbabel python Ah. Eigen2 is required for the language bindings, I'm afraid. Let me update that one straightaway. (Done) - Noel On 4 November 2010 16:35, Swank, Craig <Cra...@nr...> wrote: > Thanks Noel, I had a feeling we were not on the same page. > > I deleted /usr/local/lib/openbabel and usr/local/include/openbabel-2.0, deleted anything related to pybel and openbabel in my site-packages dir, and then I followed the new instructions: > > % history > 176 sudo rm -rf build > 177 mkdir build > 178 cd build > 179 cmake ../src -DPYTHON_BINDINGS=ON -DPYTHON_PREFIX=/Users/craig/src/opv > 180 cmake -j4 > 181 make -j4 > 182 sudo make install > > In the python shell, I'm still getting the same error: > > opv)Suva% python > Python 2.6.4 (r264:75706, Nov 15 2009, 20:20:25) > [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> > import openbabel as ob > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 98, in <module> > _openbabel = swig_import_helper() > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 94, in swig_import_helper > _mod = imp.load_module('_openbabel', fp, pathname, description) > ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE > Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so > Expected in: dynamic lookup > > I tried again with my default python location instead of a virtualenv, but the same thing happends. > > Any ideas? > > Craig > > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Noel O'B. <bao...@gm...> - 2010-11-04 16:59:16
|
Ah. Eigen2 is required for the language bindings, I'm afraid. Let me update that one straightaway. (Done) - Noel On 4 November 2010 16:35, Swank, Craig <Cra...@nr...> wrote: > Thanks Noel, I had a feeling we were not on the same page. > > I deleted /usr/local/lib/openbabel and usr/local/include/openbabel-2.0, deleted anything related to pybel and openbabel in my site-packages dir, and then I followed the new instructions: > > % history > 176 sudo rm -rf build > 177 mkdir build > 178 cd build > 179 cmake ../src -DPYTHON_BINDINGS=ON -DPYTHON_PREFIX=/Users/craig/src/opv > 180 cmake -j4 > 181 make -j4 > 182 sudo make install > > In the python shell, I'm still getting the same error: > > opv)Suva% python > Python 2.6.4 (r264:75706, Nov 15 2009, 20:20:25) > [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. >>>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> > import openbabel as ob > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 98, in <module> > _openbabel = swig_import_helper() > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 94, in swig_import_helper > _mod = imp.load_module('_openbabel', fp, pathname, description) > ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE > Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so > Expected in: dynamic lookup > > I tried again with my default python location instead of a virtualenv, but the same thing happends. > > Any ideas? > > Craig > > > > > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Swank, C. <Cra...@nr...> - 2010-11-04 16:35:34
|
Thanks Noel, I had a feeling we were not on the same page. I deleted /usr/local/lib/openbabel and usr/local/include/openbabel-2.0, deleted anything related to pybel and openbabel in my site-packages dir, and then I followed the new instructions: % history 176 sudo rm -rf build 177 mkdir build 178 cd build 179 cmake ../src -DPYTHON_BINDINGS=ON -DPYTHON_PREFIX=/Users/craig/src/opv 180 cmake -j4 181 make -j4 182 sudo make install In the python shell, I'm still getting the same error: opv)Suva% python Python 2.6.4 (r264:75706, Nov 15 2009, 20:20:25) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import pybel Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> import openbabel as ob File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 98, in <module> _openbabel = swig_import_helper() File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 94, in swig_import_helper _mod = imp.load_module('_openbabel', fp, pathname, description) ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so Expected in: dynamic lookup I tried again with my default python location instead of a virtualenv, but the same thing happends. Any ideas? Craig |
From: Noel O'B. <bao...@gm...> - 2010-11-04 15:30:39
|
Sorry - my mistake. I thought I had removed those instructions. The correct installation procedure is described at http://openbabel.org/docs/2.3.0/Installation/install.html. In short, you don't run "python setup.py" yourself. Instead you configure cmake with "-DPYTHON_BINDINGS=ON" and when you run "make", it will look after everything for you. I'll remove the instructions on the page you linked to. - Noel On 4 November 2010 15:20, Swank, Craig <Cra...@nr...> wrote: > Hello Noel, > Are you referring to the instructions at http://openbabel.org/docs/2.3.0/UseTheLibrary/PythonInstall.html? Those are the instructions I've been following. There is no mention on those instructions about any of the errors I've encountered. > > I've been trying this once again on my home computer, and was, once again, able to build and install the python bindings by editing the setup.py. I've set the LD_LIBRARY_PATH, as the instructions suggest, to /usr/local/lib. In the python prompt I get this error: > >>>> import pybel > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/craig/src/opv/lib/python2.6/site-packages/pybel.py", line 16, in <module> > import openbabel as ob > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 56, in <module> > _openbabel = swig_import_helper() > File "/Users/craig/src/opv/lib/python2.6/site-packages/openbabel.py", line 52, in swig_import_helper > _mod = imp.load_module('_openbabel', fp, pathname, description) > ImportError: dlopen(/Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so, 2): Symbol not found: __ZTVN9OpenBabel20OBRMSDConformerScoreE > Referenced from: /Users/craig/src/opv/lib/python2.6/site-packages/_openbabel.so > Expected in: dynamic lookup > > > Is my LD_LIBRARY_PATH incorrect if I've done a default build and install of openbabel? > > Just in case this helps, here is where the default install went: > > /usr/local/lib/openbabel > /usr/local/include/openbabel-2.0 > > > Craig > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |