From: Andrew F. <fa...@mo...> - 2008-09-03 23:46:18
|
OK. I'm probably missing something really simple here, but I am converting a dataset from a bunch of grody old hyperchem files into an SD file. Along the way, I am using: mol.title=name to supposedly set the molecule's title to the value of name (just a hacked-up variant of the filename it came from). The problem is that the title doesn't get exported as I write the file to the new sd file. I get a molblock header that looks like: OpenBabel09030819443D 78 81 0 0 0 0 0 0 0 0999 V2000 and then the molecular coordinates. I didn't see anything obvious online about this behavior. Am I doing something really stupid, or is this a known will-fix that I am jumping the gun on? Thanks, Andy |
From: Andrew F. <fa...@po...> - 2008-09-04 16:21:08
|
OK. I'm probably missing something really simple here, but I am converting a dataset from a bunch of grody old hyperchem files into an SD file. Along the way, I am using: mol.title=name to supposedly set the molecule's title to the value of name (just a hacked-up variant of the filename it came from). The problem is that the title doesn't get exported as I write the file to the new sd file. I get a molblock header that looks like: OpenBabel09030819443D 78 81 0 0 0 0 0 0 0 0999 V2000 and then the molecular coordinates. I didn't see anything obvious online about this behavior. Am I doing something really stupid, or is this a known will-fix that I am jumping the gun on? Thanks, Andy |
From: Noel O'B. <bao...@gm...> - 2008-09-05 11:50:34
|
I can't easily check at the moment (I'm on holidays), but earlier versions of Pybel didn't allow the user to set the title, just read the title. If it's not available in the latest Pybel (just look at the source code of pybel.py in the Molecule class), for sure it's in the pybel.py that's bundled with cinfony. Noel 2008/9/4 Andrew Fant <fa...@po...>: > OK. I'm probably missing something really simple here, but I am > converting a dataset from a bunch of grody old hyperchem files into an > SD file. Along the way, I am using: > > mol.title=name > > to supposedly set the molecule's title to the value of name (just a > hacked-up variant of the filename it came from). > > The problem is that the title doesn't get exported as I write the file > to the new sd file. I get a molblock header that looks like: > > OpenBabel09030819443D > > 78 81 0 0 0 0 0 0 0 0999 V2000 > > and then the molecular coordinates. I didn't see anything obvious > online about this behavior. Am I doing something really stupid, or is > this a known will-fix that I am jumping the gun on? > > Thanks, > Andy > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: Andrew F. <fa...@po...> - 2008-09-05 14:08:43
|
Fair enough. I'll dig into the code and see. If the title is immutable, shouldn't an attempt to change it raise some sort of exception though, rather than just silently dropping it on the floor? Andy Noel O'Boyle wrote: > I can't easily check at the moment (I'm on holidays), but earlier > versions of Pybel didn't allow the user to set the title, just read > the title. If it's not available in the latest Pybel (just look at the > source code of pybel.py in the Molecule class), for sure it's in the > pybel.py that's bundled with cinfony. > > Noel > > 2008/9/4 Andrew Fant <fa...@po...>: >> OK. I'm probably missing something really simple here, but I am >> converting a dataset from a bunch of grody old hyperchem files into an >> SD file. Along the way, I am using: >> >> mol.title=name >> >> to supposedly set the molecule's title to the value of name (just a >> hacked-up variant of the filename it came from). >> >> The problem is that the title doesn't get exported as I write the file >> to the new sd file. I get a molblock header that looks like: >> >> OpenBabel09030819443D >> >> 78 81 0 0 0 0 0 0 0 0999 V2000 >> >> and then the molecular coordinates. I didn't see anything obvious >> online about this behavior. Am I doing something really stupid, or is >> this a known will-fix that I am jumping the gun on? >> >> Thanks, >> Andy >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge >> Build the coolest Linux based applications with Moblin SDK & win great prizes >> Grand prize is a trip for two to an Open Source event anywhere in the world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> OpenBabel-scripting mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> |
From: Noel O'B. <bao...@gm...> - 2008-09-08 12:58:33
|
In the 'new' version, an exception is raised (thanks to Andrew Dalke for the patch). On 05/09/2008, Andrew Fant <fa...@po...> wrote: > Fair enough. I'll dig into the code and see. If the title is immutable, > shouldn't an attempt to change it raise some sort of exception though, > rather than just silently dropping it on the floor? > > Andy > > > Noel O'Boyle wrote: > > > I can't easily check at the moment (I'm on holidays), but earlier > > versions of Pybel didn't allow the user to set the title, just read > > the title. If it's not available in the latest Pybel (just look at the > > source code of pybel.py in the Molecule class), for sure it's in the > > pybel.py that's bundled with cinfony. > > > > Noel > > > > 2008/9/4 Andrew Fant <fa...@po...>: > > > > > OK. I'm probably missing something really simple here, but I am > > > converting a dataset from a bunch of grody old hyperchem files into an > > > SD file. Along the way, I am using: > > > > > > mol.title=name > > > > > > to supposedly set the molecule's title to the value of name (just a > > > hacked-up variant of the filename it came from). > > > > > > The problem is that the title doesn't get exported as I write the file > > > to the new sd file. I get a molblock header that looks like: > > > > > > OpenBabel09030819443D > > > > > > 78 81 0 0 0 0 0 0 0 0999 V2000 > > > > > > and then the molecular coordinates. I didn't see anything obvious > > > online about this behavior. Am I doing something really stupid, or is > > > this a known will-fix that I am jumping the gun on? > > > > > > Thanks, > > > Andy > > > > > > > ------------------------------------------------------------------------- > > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > > Build the coolest Linux based applications with Moblin SDK & win great > prizes > > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > _______________________________________________ > > > OpenBabel-scripting mailing list > > > Ope...@li... > > > > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > > > > > > > > > > |
From: Geoffrey H. <ge...@ge...> - 2008-09-05 18:58:45
|
On Sep 5, 2008, at 7:50 AM, Noel O'Boyle wrote: > I can't easily check at the moment (I'm on holidays), but earlier > versions of Pybel didn't allow the user to set the title, just read > the title. Correct me if I'm wrong, but shouldn't a Pybel molecule still be an OBMol? Since Pybel includes the Open Babel wrapper, the C++ methods should still be exposed. mol.SetTitle("Foo!") Does that work? Cheers, -Geoff |
From: Noel O'B. <bao...@gm...> - 2008-09-08 13:04:44
|
On 05/09/2008, Geoffrey Hutchison <ge...@ge...> wrote: > > On Sep 5, 2008, at 7:50 AM, Noel O'Boyle wrote: > > > > I can't easily check at the moment (I'm on holidays), but earlier > > versions of Pybel didn't allow the user to set the title, just read > > the title. > > > > Correct me if I'm wrong, but shouldn't a Pybel molecule still be an OBMol? > Since Pybel includes the Open Babel wrapper, the C++ methods should still be > exposed. > > mol.SetTitle("Foo!") > > Does that work? Actually, it would be mol.OBMol.SetTitle("Foo!"), where mol is the Pybel Molecule. See line 225 of http://code.google.com/p/cinfony/source/browse/trunk/cinfony/pybel.py for the current pybel code using this. > Cheers, > -Geoff > |