[Open Babel] How to run readstring in pybel?

2017-05-07 Thread Peng Yu
Hi, I got the following error. Does anybody know what is wrong? Thanks. $ cat main.py #!/usr/bin/env python import pybel mymol = pybel.readstring("smi", "") print mymol.molwt $ ./main.py Traceback (most recent call last): File "./main.py", line 5, in mymol = pybel.readstring("smi", "CC

Re: [Open Babel] How to run readstring in pybel?

2017-05-07 Thread Peng Yu
7;__description__', '__email__', 'to_cx', 'from_database', 'to_graphml', 'to_database', 'exceptions', 'database_io', 'from_bytes'] On Sun, May 7, 2017 at 9:20 PM, Hongbin Yang wrote: > Hi, Peng, > > I guess you installed

Re: [Open Babel] How to run readstring in pybel?

2017-05-07 Thread Peng Yu
OK. It fixed the problem. Thanks. On Sun, May 7, 2017 at 9:41 PM, David Hall wrote: > That is still the wrong pybel. You should uninstall it (i.e. pip uninstall > pybel ) > > >> On May 7, 2017, at 10:38 PM, Peng Yu wrote: >> >> Hi, I should have installed the co

[Open Babel] How to draw structure from SMILES?

2019-10-31 Thread Peng Yu
Hi, Although there are many online tools (e.g., PubChem sketcher) to draw structure from SMILES, I prefer to do so locally sometimes. Could anybody show me what is the best way to do so with openbabel? Thanks. -- Regards, Peng ___ OpenBabel-discuss ma

[Open Babel] How to install pybel?

2019-10-31 Thread Peng Yu
Hi, I don't see how to install pybel. https://openbabel.org/docs/dev/UseTheLibrary/Python_PybelAPI.html#pybel-api This one does seem to be the same the above one. https://pypi.org/project/pybel Could anybody let me know how to pybel that works with openbabel? Thanks. -- Regards, Peng _

Re: [Open Babel] How to install pybel?

2019-10-31 Thread Peng Yu
So the documentation https://openbabel.org/docs/dev/UseTheLibrary/Python_PybelAPI.html#pybel-api is outdated? Thanks. On 10/31/19, Geoffrey Hutchison wrote: >> This one does seem to be the same the above one. >> https://pypi.org/project/pybel > > You want: > https://pypi.org/project/openbabel/

Re: [Open Babel] How to draw structure from SMILES?

2019-10-31 Thread Peng Yu
I got the following error. Do you know what is wrong? Thanks. $ obabel '-:C(=O)Cl' -O acidchloride.png == *** Open Babel Error in PNG Format PNG2Format not found. Probably the Cairo library is not loaded. -1 PNG_files converted $ obabel --version No input file or fo

[Open Babel] How to obabel to stdout?

2019-11-02 Thread Peng Yu
I use the following comman to print the image to stdout. Is it the best way to do so? Thanks. obabel '-:C(=O)Cl' -o png -O /dev/stdout -- Regards, Peng ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lists.sourcefor

[Open Babel] How to suppress messages from obabel?

2019-11-02 Thread Peng Yu
$ obabel '-:C(=O)Cl' -O /tmp/acidchloride.png 1 molecule converted I'd like to suppress "1 molecule converted" in the above command. Is there a way to do so? Thanks. -- Regards, Peng ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourcefo

[Open Babel] Official reference of SMILES

2019-11-05 Thread Peng Yu
Hi, I am wondering where is the official reference of SMILES. Is this one? Thanks. https://www.daylight.com/dayhtml/doc/theory/theory.smiles.html -- Regards, Peng ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https://lis

[Open Babel] How to compute the Tanimoto coefficient calculation between two structures?

2019-11-05 Thread Peng Yu
Hi, Relating protein pharmacology by ligand chemistry https://www.ncbi.nlm.nih.gov/pubmed/17287757 I see the above papers Tanimoto coefficient. I am not sure how to use open-babel python code to compute the similarity between two SMILES strings. Could anybody show me how to do it? Thanks. https:

Re: [Open Babel] How to compute the Tanimoto coefficient calculation between two structures?

2019-11-06 Thread Peng Yu
What is the relationship between openbabel and rdkit? What is best fingerprint nowadays for the purpose of the method described in the paper that I mentioned? Thanks. On Wed, Nov 6, 2019 at 3:49 PM Francois Berenger wrote: > On 06/11/2019 08:34, Peng Yu wrote: > > Hi, > > >

[Open Babel] Error to load pybel

2019-11-06 Thread Peng Yu
Hi, I got the following error to load pybel in openbabel python module. Does anybody know what is wrong? Thanks. $ brew info open-babel open-babel: stable 3.0.0 (bottled), HEAD Chemical toolbox https://openbabel.org /usr/local/Cellar/open-babel/3.0.0 (328 files, 19.5MB) * Poured from bottle on

[Open Babel] How to install openbabel on Mac OS X?

2020-03-04 Thread Peng Yu
I got the following error when I try to install openbabel. But I got errros in pip3. I also installed open-babel with brew. But it is based on python installed from homebrew? Could anybody let me know what is the correct way to install openbabel? (BTW, I want to avoid using conda if possible.) $

[Open Babel] How to convert smiles to inchikey?

2020-03-21 Thread Peng Yu
Hi, I don't see how to convert smiles to inchikey in the command line. Could anybody show me how to do the conversion with openbabel? Thanks. https://openbabel.org/docs/dev/Command-line_tools/babel.html -- Regards, Peng ___ OpenBabel-discuss mailing

[Open Babel] How to convert inchikey to other formats?

2020-03-22 Thread Peng Yu
Hi, I don't find how to take inchikey input and convert it to other formats. http://openbabel.org/docs/current/FileFormats/Overview.html I got the following error. Could anybody show me the correct way to make the conversion? Thanks. $ obabel -iinchikey <(echo GFAUNYMRSKVDJL-UHFFFAOYSA-N) -o sm

Re: [Open Babel] How to convert inchikey to other formats?

2020-03-23 Thread Peng Yu
> There are several 'resolvers' out there for InChi Keys. > https://cactus.nci.nih.gov/blog/?tag=inchikey-resolver > http://chembl.blogspot.com/2016/03/this-python-inchi-key-resolver-will.html > > As noted, these will only work for molecules in PubChem (the NIH resolver) > and UniChem (the Chembl r

[Open Babel] How to deal with .mol2 files?

2020-03-24 Thread Peng Yu
Hi, I see the following file. I see obabel can deal with mol2 format. But how to visualize it and edit it? Thanks. http://tcmspw.com/tcmspmol/MOL002088.mol2 -- Regards, Peng ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net

Re: [Open Babel] How to convert inchikey to other formats?

2020-03-25 Thread Peng Yu
> They're all database lookups AFAIK. If all you want is more keys, you > need the biggest database. If ChemSpider has a larger molecule database > than PubChem, then it will be "more comprehensive". Which one is the most comprehensive according to your experience? -- Regards, Peng __

[Open Babel] How to determine a compound is a flavonoid?

2020-07-25 Thread Peng Yu
Hi, I want to determine whether a compound (via SMILES or IsoSMILES) is a flavonoid. Does anybody know what is the best way to do so with babel? Thanks. -- Regards, Peng ___ OpenBabel-discuss mailing list OpenBabel-discuss@lists.sourceforge.net https