From: laurent.personal <lau...@gm...> - 2009-03-18 10:04:05
|
Hello I am using openbabel for a project (convert molec in different formats ...). Besides, I have to do some scripts in order to modify some molecules of my DB. I use pybel to do this. My problem is that pybel automatically changes some atomic types in molecule of my DB ... and it shouldn't do it. It replaces some carbons (C2 or others) by the type C.cat. The last is for the guanidium group but I don't have a such group in my DB. I did a basic script in order to verify this : [quote] #!/usr/bin/python import openbabel import pybel for mol in pybel.readfile("mol2", "molec_test.mol2"): outputfile = pybel.Outputfile("mol2", "molec_pybel.mol2", overwrite=True) outputfile.write(mol) outputfile.close() [/quote] The input/output structure files are uploaded here. http://www.nabble.com/file/p22574797/molec_pybel.mol2 molec_pybel.mol2 http://www.nabble.com/file/p22574797/molec_test.mol2 molec_test.mol2 Can we read a molecule with pybel with an option "read only the mol2 file without changing anything" ? TIA for your answer, Cheers, Laurent -- View this message in context: http://www.nabble.com/-OpenBabel---Pybel--Atomic-Types-Automatically-Changed-tp22574797p22574797.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2009-03-18 10:14:25
|
2009/3/18 laurent.personal <lau...@gm...>: > > Hello > > I am using openbabel for a project (convert molec in different formats ...). > Besides, I have to do some scripts in order to modify some molecules of my > DB. I use pybel to do this. > > My problem is that pybel automatically changes some atomic types in molecule > of my DB ... and it shouldn't do it. It replaces some carbons (C2 or others) > by the type C.cat. The last is for the guanidium group but I don't have a > such group in my DB. This bug has been fixed in the latest version of OpenBabel. > I did a basic script in order to verify this : > > [quote] > #!/usr/bin/python > import openbabel > import pybel > for mol in pybel.readfile("mol2", "molec_test.mol2"): > outputfile = pybel.Outputfile("mol2", "molec_pybel.mol2", overwrite=True) > outputfile.write(mol) > outputfile.close() > [/quote] > > The input/output structure files are uploaded here. > http://www.nabble.com/file/p22574797/molec_pybel.mol2 molec_pybel.mol2 > http://www.nabble.com/file/p22574797/molec_test.mol2 molec_test.mol2 > > Can we read a molecule with pybel with an option "read only the mol2 file > without changing anything" ? I'm afraid not. > TIA for your answer, > > Cheers, > > Laurent > -- > View this message in context: http://www.nabble.com/-OpenBabel---Pybel--Atomic-Types-Automatically-Changed-tp22574797p22574797.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: laurent.personal <lau...@gm...> - 2009-03-18 10:34:03
|
Hello, I am using babel 2.2.0 and I will update it to the 2.2.1 version. Ty for the fast answer :) Cheers, Laurent baoilleach wrote: > > 2009/3/18 laurent.personal <lau...@gm...>: >> >> Hello >> >> I am using openbabel for a project (convert molec in different formats >> ...). >> Besides, I have to do some scripts in order to modify some molecules of >> my >> DB. I use pybel to do this. >> >> My problem is that pybel automatically changes some atomic types in >> molecule >> of my DB ... and it shouldn't do it. It replaces some carbons (C2 or >> others) >> by the type C.cat. The last is for the guanidium group but I don't have a >> such group in my DB. > > This bug has been fixed in the latest version of OpenBabel. > >> I did a basic script in order to verify this : >> >> [quote] >> #!/usr/bin/python >> import openbabel >> import pybel >> for mol in pybel.readfile("mol2", "molec_test.mol2"): >> outputfile = pybel.Outputfile("mol2", "molec_pybel.mol2", >> overwrite=True) >> outputfile.write(mol) >> outputfile.close() >> [/quote] >> >> The input/output structure files are uploaded here. >> http://www.nabble.com/file/p22574797/molec_pybel.mol2 molec_pybel.mol2 >> http://www.nabble.com/file/p22574797/molec_test.mol2 molec_test.mol2 >> >> Can we read a molecule with pybel with an option "read only the mol2 file >> without changing anything" ? > > I'm afraid not. > >> TIA for your answer, >> >> Cheers, >> >> Laurent >> -- >> View this message in context: >> http://www.nabble.com/-OpenBabel---Pybel--Atomic-Types-Automatically-Changed-tp22574797p22574797.html >> Sent from the openbabel-scripting mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------------ >> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >> easily build your RIAs with Flex Builder, the Eclipse(TM)based >> development >> software that enables intelligent coding and step-through debugging. >> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> > > ------------------------------------------------------------------------------ > Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are > powering Web 2.0 with engaging, cross-platform capabilities. Quickly and > easily build your RIAs with Flex Builder, the Eclipse(TM)based development > software that enables intelligent coding and step-through debugging. > Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > -- View this message in context: http://www.nabble.com/-OpenBabel---Pybel--Atomic-Types-Automatically-Changed-tp22574797p22576309.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Geoffrey H. <ge...@ge...> - 2009-03-18 10:23:25
|
On Mar 18, 2009, at 6:14 AM, Noel O'Boyle wrote: >> Can we read a molecule with pybel with an option "read only the >> mol2 file >> without changing anything" ? > > I'm afraid not. Does pybel support the "copy" format? Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2009-03-18 11:02:44
|
2009/3/18 Geoffrey Hutchison <ge...@ge...>: > > On Mar 18, 2009, at 6:14 AM, Noel O'Boyle wrote: > >>> Can we read a molecule with pybel with an option "read only the mol2 file >>> without changing anything" ? >> >> I'm afraid not. > > Does pybel support the "copy" format? Interesting - I didn't know about this (but I don't think this would help here). We should probably create a wiki page with a list of convenience formats (that is, formats that are not related to particular programs). Anyway, Pybel supports it, but I get an OpenBabel error: "Not a valid output format". I presume it's not compatible with the Read/Write functions used by the scripting interfaces. Will I file a proper bug and see what happens? > Cheers, > -Geoff > |