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: Andrew F. <fa...@mo...> - 2011-07-04 01:19:00
|
Is there a simple way to determine if there are multiple unlinked fragments in a molecule from pybel? I'm trying to clean out a bunch of old compound lists that I inherited, and since I have to do it once, I might as well try to avoid doing it a second time. Thanks, Andy |
From: Noel O'B. <bao...@gm...> - 2011-06-30 19:54:34
|
Here's an example with MNA, a simpler format in some respects: C:\Tools>python Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> mol = pybel.readstring("smi", "CCCCC(=O)Cl") >>> conv = pybel.ob.OBConversion() >>> conv.SetOutFormat("mna") True >>> conv.WriteString(mol.OBMol) '# Title = \n-C(-H(-C)-H(-C)-H(-C)-C(-H-H-C-C))\n-C(-H(-C)-H(-C)-C(-H-H-H-C)-C(- H-H-C-C))\n-C(-H(-C)-H(-C)-C(-H-H-C-C)-C(-H-H-C-C))\n-C(-H(-C)-H(-C)-C(-H-H-C-C) -C(-C-O-Cl))\n-C(-C(-H-H-C-C)-O(-C)-Cl(-C))\n-O(-C(-C-O-Cl))\n-Cl(-C(-C-O-Cl))\n -H(-C(-H-H-H-C))\n-H(-C(-H-H-H-C))\n-H(-C(-H-H-H-C))\n-H(-C(-H-H-C-C))\n-H(-C(-H -H-C-C))\n-H(-C(-H-H-C-C))\n-H(-C(-H-H-C-C))\n-H(-C(-H-H-C-C))\n-H(-C(-H-H-C-C)) \n' >>> conv.AddOption("L", conv.OUTOPTIONS, "0") >>> conv.IsOption("L") '0' >>> conv.WriteString(mol.OBMol) '# Title = \n-C\n-C\n-C\n-C\n-C\n-O\n-Cl\n-H\n-H\n-H\n-H\n-H\n-H\n-H\n-H\n-H\n' >>> Note the use of "IsOption" to get the option value. Maybe you didn't have write permissions on that file for some reason. - Noel On 29 June 2011 05:27, A. Heifets <ab...@cs...> wrote: > I'm trying to duplicate commandline behavior of obabel via Python. > I'd appreciate any help. > > When I run (using today's subversion checkout) > obabel -imol junk.mol -osvg -Ojunk.svg -xc1 -xr1 -xd > I get an SVG with the nice resizing javascript. I can't seem to > generate the same behavior with Python. I don't get any errors but > the SVG does not resize: > > $ python > Python 2.4.3 (#1, May 5 2011, 16:39:10) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. >>>> import pybel >>>> import openbabel as ob >>>> x=pybel.readstring("smi", "n1ccccc1") >>>> c = ob.OBConversion() >>>> c.SetOutFormat("svg") > True >>>> c.AddOption("d", c.OUTOPTIONS, "") >>>> c.AddOption("r", c.OUTOPTIONS, "1") >>>> c.AddOption("c", c.OUTOPTIONS, "1") >>>> c.WriteFile(x.OBMol, "./junk.svg") > False > > I tried to investigate whether the options I thought I was setting are > the right ones. I expected that the "c" option should take one > parameter but, as you can see, something's not right: >>>> c.GetOptionParams("c", c.OUTOPTIONS) > 0 >>>> c.GetOptionParams("c", c.INOPTIONS) > 0 >>>> c.GetOptionParams("c", c.GENOPTIONS) > 0 >>>> c.GetOptionParams("c", c.ALL) > Segmentation fault > > -- > A. Heifets > http://www.cs.toronto.edu/~aheifets/ > > ------------------------------------------------------------------------------ > All of the data generated in your IT infrastructure is seriously valuable. > Why? It contains a definitive record of application performance, security > threats, fraudulent activity, and more. Splunk takes this data and makes > sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-d2d-c2 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: A. H. <ab...@cs...> - 2011-06-29 04:28:21
|
I'm trying to duplicate commandline behavior of obabel via Python. I'd appreciate any help. When I run (using today's subversion checkout) obabel -imol junk.mol -osvg -Ojunk.svg -xc1 -xr1 -xd I get an SVG with the nice resizing javascript. I can't seem to generate the same behavior with Python. I don't get any errors but the SVG does not resize: $ python Python 2.4.3 (#1, May 5 2011, 16:39:10) [GCC 4.1.2 20080704 (Red Hat 4.1.2-50)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pybel >>> import openbabel as ob >>> x=pybel.readstring("smi", "n1ccccc1") >>> c = ob.OBConversion() >>> c.SetOutFormat("svg") True >>> c.AddOption("d", c.OUTOPTIONS, "") >>> c.AddOption("r", c.OUTOPTIONS, "1") >>> c.AddOption("c", c.OUTOPTIONS, "1") >>> c.WriteFile(x.OBMol, "./junk.svg") False I tried to investigate whether the options I thought I was setting are the right ones. I expected that the "c" option should take one parameter but, as you can see, something's not right: >>> c.GetOptionParams("c", c.OUTOPTIONS) 0 >>> c.GetOptionParams("c", c.INOPTIONS) 0 >>> c.GetOptionParams("c", c.GENOPTIONS) 0 >>> c.GetOptionParams("c", c.ALL) Segmentation fault -- A. Heifets http://www.cs.toronto.edu/~aheifets/ |
From: francois <bag...@db...> - 2011-06-24 15:53:57
|
Ok that works. Thanks a lot. François ----- Original Message ----- From: Chris Morley-3 [via Open Babel] To: francois Sent: Thursday, June 23, 2011 5:39 PM Subject: Re: Get individual atomic LogP values OBDescriptor classes are designed to give a single output, a string or, as for logp, a double. But if you wanted an easy and dirty method to see the atom values (suitable only for personal use), you could (this is untested) derive a new class from OBGroupContrib (AtOBGroupContrib) and insert into its Predict() function some calls to cout that output atom data. Declare a global instance: AtOBGroupContrib theatlogP("atlogP","logp.txt","logP with atom output"); atlogP would appear in the list of descriptors (obabel -L descriptors) and you would use it like obabel mymol.xxx -otxt --append atlogP Your custom output would be followed by the molecule title and the logP value for the molecule. Chris On 23/06/2011 13:14, francois wrote: > Thanks for your reply. I have tried du derive a new class from OBGroupContib, but that doesn't work. I have probably missed something. I wonder if it would not be better to derive a new class from OBDescriptor including a new predict function to get individual atomic value. > Best regards > François > ----- Original Message ----- > From: Chris Morley-3 [via Open Babel] > To: francois > Sent: Wednesday, June 22, 2011 12:25 PM > Subject: Re: Get individual atomic LogP values > > > On 21/06/2011 20:27, francois wrote: > > > I'm a new user of OpenBabel and I'm looking for any function in the > > OBDescriptor C++ class to get the individual atomic logP values. > > Thanks for your valuable help. > > I think that is not available. You could look in groupcontrib.cpp, and > .h to see how the calculation is done. The data, SMARTS patterns with > attached values, are in data/logp.txt . > > Chris ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ OpenBabel-scripting mailing list [hidden email] 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/Get-individual-atomic-LogP-values-tp3615046p3620214.html To unsubscribe from Get individual atomic LogP values, click here. -- View this message in context: http://forums.openbabel.org/Get-individual-atomic-LogP-values-tp3615046p3622895.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Chris M. <c.m...@ga...> - 2011-06-23 15:38:52
|
OBDescriptor classes are designed to give a single output, a string or, as for logp, a double. But if you wanted an easy and dirty method to see the atom values (suitable only for personal use), you could (this is untested) derive a new class from OBGroupContrib (AtOBGroupContrib) and insert into its Predict() function some calls to cout that output atom data. Declare a global instance: AtOBGroupContrib theatlogP("atlogP","logp.txt","logP with atom output"); atlogP would appear in the list of descriptors (obabel -L descriptors) and you would use it like obabel mymol.xxx -otxt --append atlogP Your custom output would be followed by the molecule title and the logP value for the molecule. Chris On 23/06/2011 13:14, francois wrote: > Thanks for your reply. I have tried du derive a new class from OBGroupContib, but that doesn't work. I have probably missed something. I wonder if it would not be better to derive a new class from OBDescriptor including a new predict function to get individual atomic value. > Best regards > François > ----- Original Message ----- > From: Chris Morley-3 [via Open Babel] > To: francois > Sent: Wednesday, June 22, 2011 12:25 PM > Subject: Re: Get individual atomic LogP values > > > On 21/06/2011 20:27, francois wrote: > > > I'm a new user of OpenBabel and I'm looking for any function in the > > OBDescriptor C++ class to get the individual atomic logP values. > > Thanks for your valuable help. > > I think that is not available. You could look in groupcontrib.cpp, and > .h to see how the calculation is done. The data, SMARTS patterns with > attached values, are in data/logp.txt . > > Chris |
From: francois <bag...@db...> - 2011-06-23 12:14:16
|
Thanks for your reply. I have tried du derive a new class from OBGroupContib, but that doesn't work. I have probably missed something. I wonder if it would not be better to derive a new class from OBDescriptor including a new predict function to get individual atomic value. Best regards François ----- Original Message ----- From: Chris Morley-3 [via Open Babel] To: francois Sent: Wednesday, June 22, 2011 12:25 PM Subject: Re: Get individual atomic LogP values On 21/06/2011 20:27, francois wrote: > I'm a new user of OpenBabel and I'm looking for any function in the > OBDescriptor C++ class to get the individual atomic logP values. > Thanks for your valuable help. I think that is not available. You could look in groupcontrib.cpp, and .h to see how the calculation is done. The data, SMARTS patterns with attached values, are in data/logp.txt . Chris ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ OpenBabel-scripting mailing list [hidden email] 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/Get-individual-atomic-LogP-values-tp3615046p3616619.html To unsubscribe from Get individual atomic LogP values, click here. -- View this message in context: http://forums.openbabel.org/Get-individual-atomic-LogP-values-tp3615046p3619645.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Chris M. <c.m...@ga...> - 2011-06-22 10:25:19
|
On 21/06/2011 20:27, francois wrote: > I'm a new user of OpenBabel and I'm looking for any function in the > OBDescriptor C++ class to get the individual atomic logP values. > Thanks for your valuable help. I think that is not available. You could look in groupcontrib.cpp, and .h to see how the calculation is done. The data, SMARTS patterns with attached values, are in data/logp.txt . Chris |
From: francois <bag...@db...> - 2011-06-21 19:42:34
|
Hi, I'm a new user of OpenBabel and I'm looking for any function in the OBDescriptor C++ class to get the individual atomic logP values. Thanks for your valuable help. François -- View this message in context: http://forums.openbabel.org/Get-individual-atomic-LogP-values-tp3615046p3615046.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: MarkEarll <mar...@sy...> - 2011-06-16 11:10:37
|
Hi Noel, Yes I will have a go and let you know if I get anything working. My interest is to display structures from SMILES embedded in an Access database, either as SVG pictures or via JChemPaint/Jmol as helper apps. Many thanks also for the quick response! Mark -- View this message in context: http://forums.openbabel.org/OBDotNet-and-VBA-tp3602068p3602092.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2011-06-16 11:04:20
|
It looks like it should work (e.g. http://richnewman.wordpress.com/2007/04/15/a-beginner%E2%80%99s-guide-to-calling-a-net-library-from-excel/). Here be dragons, of course. I would be very interested to hear the details if you could get it working even for a toy example. - Noel On 16 June 2011 11:52, MarkEarll <mar...@sy...> wrote: > Is it possible to use OBDotNet in conjunction with a VBA script, for example > within Excel or Access? Or does it only work with VB.Net? Thanks > > -- > View this message in context: http://forums.openbabel.org/OBDotNet-and-VBA-tp3602068p3602068.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: MarkEarll <mar...@sy...> - 2011-06-16 10:52:59
|
Is it possible to use OBDotNet in conjunction with a VBA script, for example within Excel or Access? Or does it only work with VB.Net? Thanks -- View this message in context: http://forums.openbabel.org/OBDotNet-and-VBA-tp3602068p3602068.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2011-06-08 08:49:56
|
Sounds like a useful feature, but I don't think we have that. Here's a workaround (untested): for myfile in *.mol do obabel $myfile --separate --title=$myfile >> test.smi end You will have to adjust the syntax of the "for" loop for your particular shell or operating system. - Noel On 7 June 2011 10:17, MarkEarll <mar...@sy...> wrote: > Hi, > > I am converting a directory full of .mol files to a smiles file using: > babel *.mol -O test.smi --separate --addformula > > I would like to add the filename as a title but cannot find the command in > the obabel user guide > > I've tried --append filename or --addtotitle filename or --title=mol.name , > none of which works > > Please can anyone tell me the correct keyword? > > Many thanks, > > Mark > > -- > View this message in context: http://forums.openbabel.org/Add-filename-to-title-during-conversion-tp3579062p3579062.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: MarkEarll <mar...@sy...> - 2011-06-07 09:36:56
|
Hi, I am converting a directory full of .mol files to a smiles file using: babel *.mol -O test.smi --separate --addformula I would like to add the filename as a title but cannot find the command in the obabel user guide I've tried --append filename or --addtotitle filename or --title=mol.name , none of which works Please can anyone tell me the correct keyword? Many thanks, Mark -- View this message in context: http://forums.openbabel.org/Add-filename-to-title-during-conversion-tp3579062p3579062.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: Noel O'B. <bao...@gm...> - 2011-06-06 20:44:50
|
Forwarding to list. ---------- Forwarded message ---------- From: Dave Nunn <dav...@gm...> Date: 6 June 2011 21:14 Subject: Re: [OpenBabel-scripting] Chiral flag lost To: Noel O'Boyle <bao...@gm...> When reading in an sdf or mol record, the status of the chiral flag is present, 0 (off) or 1 (on), in the source information, and should be stored as a property of the molecule. For other input formats, the value is probably best thought of as null/unknown. When writing to sdf or mol records, or to InChI with the ChiralFlagON/ChiralFlagOFF options, any known information, either from reading in another sdf/molfile or from an api call that set the flag) should be propagated. The problem, of course, is the case that the input format (e.g., SMILES) has no real concept of chiral flag (such that the information is null/unknown) and the output format (sdf or mol) treats it as a more-or-less required field (should always be 0 or 1). I'm not sure exactly how OB's current IsChiral is defined, but, assuming it returns 1/0 True/False, then it would provide a reasonable guess for the unknown case, though it likely errs on the side of assuming the stereochemistry is absolute. The name (as chosen by MDL for molfile formats) "Chiral Flag" is unfortunate, since it is not generally turned on whenever the structure depicted lacks an internal plane of symmetry, but when the depiction of the sample represented is to be interpreted in an absolute sense, rather than a relative sense. Thus, 1,3-trans-dimethylcyclohexane drawn with the chiral flag on is used to reference a single enantiomer, while the (otherwise) identical molfile with the chiral flag off references the racemate. Though clearly all 1,3-trans-dimethylcyclohexane molecules are chiral, whether they are part of a racemic mixture or not. Not sure if there are any other input or output formats where the chiral flag status really exists. -DSN On Mon, Jun 6, 2011 at 11:58 AM, Noel O'Boyle <bao...@gm...> wrote: > > And since we're on the topic, what do you do if a sample is racemic? > > So it sounds like you want a Set/Get/HasChiralFlag (or perhaps > HasKnownAbsoluteStereo). If a molecule doesn't have a chiral flag, we > should call IsChiral (as Geoff has done) and use that value. > > - Noel > > On 6 June 2011 17:05, Dave Nunn <dav...@gm...> wrote: > > Thanks for your help! > > The way the flag is used in the pharmaceutical industry, the only real way > > to determine the setting is by assertion. We are not trying to track so much > > wether a given center is stereogenic, as whether, in a given sample, the > > stereochemistry is known in an absolute or relative sense. That information > > is not knowable from first principles, only from the sample originator. So > > if the input format is mol or sdf, I would propagate the setting that is > > there. Not sure what other formats track the same concept. > > I agree it is difficult decision with other formats. Many utilities will set > > the flag ON if, for example, a SMILES string contains any '@' symbols, but > > that leads to errors in the other direction (too many flags, rather than too > > few). In previous work, I relied on conventions within the SMILES name to > > track the concept. > > Hmm -- I didn't see any api calls in the documentation. > > $obmol->SetChiral(1), $obmol->SetChiral(0), $obmol->GetChiral() to allow > > manipulation. On the last, you must distinguish whether you're asking if the > > molecule contains any stereogenic centers, or whether it's stereochemistry > > is in a known state for a given sample. > > I'm afraid I'm still just a perl hacker -- need to understand OB much better > > to even try to contribute code :-( > > > > -- David S. Nunn, PhD > > Office: 845-512-8359 > > Cell: 845-480-1346 > > dav...@gm... > > On Sun, Jun 5, 2011 at 11:43 AM, Noel O'Boyle <bao...@gm...> wrote: > >> > >> You're right. We just set that to zero whatever the input. Open Babel > >> does not have code to determine whether a molecule is chiral or not. > >> > >> - Noel > >> > >> On 5 June 2011 02:19, dave.nunn <dav...@gm...> wrote: > >> > Am I missing an option, or is OB tromping on my chiral flag? > >> > Using Open Babel 2.3.0, as the script below shows, a mol file > >> > with chiral flag set is read in, but when written out, it is gone? > >> > > >> > -- Dave Nunn > >> > > >> > #!/usr/bin/perl > >> > use strict; > >> > use Chemistry::OpenBabel; > >> > undef($/); > >> > my $molfile = <DATA>; > >> > my $obmol = new Chemistry::OpenBabel::OBMol; > >> > my $obconversion = new Chemistry::OpenBabel::OBConversion; > >> > $obconversion->SetInAndOutFormats('sdf', 'sdf'); > >> > $obconversion->ReadString($obmol, $molfile); > >> > print $obconversion->WriteString($obmol); > >> > __END__ > >> > (S)-2-butanol > >> > OpenBabel06041121052D > >> > > >> > 6 5 0 0 1 0 0 0 0 0999 V2000 > >> > -1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > >> > -1.7321 0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 > >> > -2.2321 -0.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 > >> > -2.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 > >> > -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > >> > 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > >> > 1 2 1 0 0 0 0 > >> > 2 3 1 6 0 0 0 > >> > 2 4 1 0 0 0 0 > >> > 2 5 1 0 0 0 0 > >> > 5 6 1 0 0 0 0 > >> > M END > >> > > > > > |
From: Noel O'B. <bao...@gm...> - 2011-06-06 18:58:11
|
And since we're on the topic, what do you do if a sample is racemic? So it sounds like you want a Set/Get/HasChiralFlag (or perhaps HasKnownAbsoluteStereo). If a molecule doesn't have a chiral flag, we should call IsChiral (as Geoff has done) and use that value. - Noel On 6 June 2011 17:05, Dave Nunn <dav...@gm...> wrote: > Thanks for your help! > The way the flag is used in the pharmaceutical industry, the only real way > to determine the setting is by assertion. We are not trying to track so much > wether a given center is stereogenic, as whether, in a given sample, the > stereochemistry is known in an absolute or relative sense. That information > is not knowable from first principles, only from the sample originator. So > if the input format is mol or sdf, I would propagate the setting that is > there. Not sure what other formats track the same concept. > I agree it is difficult decision with other formats. Many utilities will set > the flag ON if, for example, a SMILES string contains any '@' symbols, but > that leads to errors in the other direction (too many flags, rather than too > few). In previous work, I relied on conventions within the SMILES name to > track the concept. > Hmm -- I didn't see any api calls in the documentation. > $obmol->SetChiral(1), $obmol->SetChiral(0), $obmol->GetChiral() to allow > manipulation. On the last, you must distinguish whether you're asking if the > molecule contains any stereogenic centers, or whether it's stereochemistry > is in a known state for a given sample. > I'm afraid I'm still just a perl hacker -- need to understand OB much better > to even try to contribute code :-( > > -- David S. Nunn, PhD > Office: 845-512-8359 > Cell: 845-480-1346 > dav...@gm... > On Sun, Jun 5, 2011 at 11:43 AM, Noel O'Boyle <bao...@gm...> wrote: >> >> You're right. We just set that to zero whatever the input. Open Babel >> does not have code to determine whether a molecule is chiral or not. >> >> - Noel >> >> On 5 June 2011 02:19, dave.nunn <dav...@gm...> wrote: >> > Am I missing an option, or is OB tromping on my chiral flag? >> > Using Open Babel 2.3.0, as the script below shows, a mol file >> > with chiral flag set is read in, but when written out, it is gone? >> > >> > -- Dave Nunn >> > >> > #!/usr/bin/perl >> > use strict; >> > use Chemistry::OpenBabel; >> > undef($/); >> > my $molfile = <DATA>; >> > my $obmol = new Chemistry::OpenBabel::OBMol; >> > my $obconversion = new Chemistry::OpenBabel::OBConversion; >> > $obconversion->SetInAndOutFormats('sdf', 'sdf'); >> > $obconversion->ReadString($obmol, $molfile); >> > print $obconversion->WriteString($obmol); >> > __END__ >> > (S)-2-butanol >> > OpenBabel06041121052D >> > >> > 6 5 0 0 1 0 0 0 0 0999 V2000 >> > -1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> > -1.7321 0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 >> > -2.2321 -0.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 >> > -2.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 >> > -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> > 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 >> > 1 2 1 0 0 0 0 >> > 2 3 1 6 0 0 0 >> > 2 4 1 0 0 0 0 >> > 2 5 1 0 0 0 0 >> > 5 6 1 0 0 0 0 >> > M END >> > > > |
From: Geoffrey H. <ge...@ge...> - 2011-06-06 18:57:49
|
> The way the flag is used in the pharmaceutical industry, the only real way to determine the setting is by assertion. We are not trying to track so much wether a given center is stereogenic, as whether, in a given sample, the stereochemistry is known in an absolute or relative sense. That information is not knowable from first principles, only from the sample originator. So if the input format is mol or sdf, I would propagate the setting that is there. Not sure what other formats track the same concept. ... > Hmm -- I didn't see any api calls in the documentation. $obmol->SetChiral(1), $obmol->SetChiral(0), $obmol->GetChiral() to allow manipulation. On the last, you must distinguish whether you're asking if the molecule contains any stereogenic centers, or whether it's stereochemistry is in a known state for a given sample. What I'd do is use the OBGenericData to save this from an SDF and check later. There's an arbitrary key / value store, but I'd probably go with OBPairData. The one problem I have is this -- Many programs (including old versions of OB) zero the flag. So should we only save the flag if it's set, and perceive if it's not set? -Geoff |
From: Dave N. <dav...@gm...> - 2011-06-06 16:05:38
|
Thanks for your help! The way the flag is used in the pharmaceutical industry, the only real way to determine the setting is by assertion. We are not trying to track so much wether a given center is stereogenic, as whether, in a given sample, the stereochemistry is known in an absolute or relative sense. That information is not knowable from first principles, only from the sample originator. So if the input format is mol or sdf, I would propagate the setting that is there. Not sure what other formats track the same concept. I agree it is difficult decision with other formats. Many utilities will set the flag ON if, for example, a SMILES string contains any '@' symbols, but that leads to errors in the other direction (too many flags, rather than too few). In previous work, I relied on conventions within the SMILES name to track the concept. Hmm -- I didn't see any api calls in the documentation. $obmol->SetChiral(1), $obmol->SetChiral(0), $obmol->GetChiral() to allow manipulation. On the last, you must distinguish whether you're asking if the molecule contains any stereogenic centers, or whether it's stereochemistry is in a known state for a given sample. I'm afraid I'm still just a perl hacker -- need to understand OB much better to even try to contribute code :-( -- David S. Nunn, PhD Office: 845-512-8359 Cell: 845-480-1346 dav...@gm... On Sun, Jun 5, 2011 at 11:43 AM, Noel O'Boyle <bao...@gm...> wrote: > You're right. We just set that to zero whatever the input. Open Babel > does not have code to determine whether a molecule is chiral or not. > > - Noel > > On 5 June 2011 02:19, dave.nunn <dav...@gm...> wrote: > > Am I missing an option, or is OB tromping on my chiral flag? > > Using Open Babel 2.3.0, as the script below shows, a mol file > > with chiral flag set is read in, but when written out, it is gone? > > > > -- Dave Nunn > > > > #!/usr/bin/perl > > use strict; > > use Chemistry::OpenBabel; > > undef($/); > > my $molfile = <DATA>; > > my $obmol = new Chemistry::OpenBabel::OBMol; > > my $obconversion = new Chemistry::OpenBabel::OBConversion; > > $obconversion->SetInAndOutFormats('sdf', 'sdf'); > > $obconversion->ReadString($obmol, $molfile); > > print $obconversion->WriteString($obmol); > > __END__ > > (S)-2-butanol > > OpenBabel06041121052D > > > > 6 5 0 0 1 0 0 0 0 0999 V2000 > > -1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > > -1.7321 0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 > > -2.2321 -0.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 > > -2.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 > > -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > > 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > > 1 2 1 0 0 0 0 > > 2 3 1 6 0 0 0 > > 2 4 1 0 0 0 0 > > 2 5 1 0 0 0 0 > > 5 6 1 0 0 0 0 > > M END > > > |
From: Geoffrey H. <ge...@ge...> - 2011-06-06 14:42:20
|
> whether the molecule has a chiral C or N. The general problem is more > complex (think of meso compounds). Indeed. If you don't think this is better than the previous behavior (clearing the flag), please revert my patch. -Geoff |
From: Noel O'B. <bao...@gm...> - 2011-06-06 13:02:23
|
On 6 June 2011 04:18, Geoffrey Hutchison <ge...@ge...> wrote: >> You're right. We just set that to zero whatever the input. Open Babel >> does not have code to determine whether a molecule is chiral or not. > > Well, there is OBMol::IsChiral() -- I just didn't know about this particular flag. > > Should be fixed in SVN trunk, r4511. If you can, please check your script, but it looks OK to me now. Well, I guess that's a first approximation - but it only checks whether the molecule has a chiral C or N. The general problem is more complex (think of meso compounds). - Noel |
From: Geoffrey H. <ge...@ge...> - 2011-06-06 03:18:21
|
> You're right. We just set that to zero whatever the input. Open Babel > does not have code to determine whether a molecule is chiral or not. Well, there is OBMol::IsChiral() -- I just didn't know about this particular flag. Should be fixed in SVN trunk, r4511. If you can, please check your script, but it looks OK to me now. -Geoff |
From: Noel O'B. <bao...@gm...> - 2011-06-05 18:43:35
|
You're right. We just set that to zero whatever the input. Open Babel does not have code to determine whether a molecule is chiral or not. - Noel On 5 June 2011 02:19, dave.nunn <dav...@gm...> wrote: > Am I missing an option, or is OB tromping on my chiral flag? > Using Open Babel 2.3.0, as the script below shows, a mol file > with chiral flag set is read in, but when written out, it is gone? > > -- Dave Nunn > > #!/usr/bin/perl > use strict; > use Chemistry::OpenBabel; > undef($/); > my $molfile = <DATA>; > my $obmol = new Chemistry::OpenBabel::OBMol; > my $obconversion = new Chemistry::OpenBabel::OBConversion; > $obconversion->SetInAndOutFormats('sdf', 'sdf'); > $obconversion->ReadString($obmol, $molfile); > print $obconversion->WriteString($obmol); > __END__ > (S)-2-butanol > OpenBabel06041121052D > > 6 5 0 0 1 0 0 0 0 0999 V2000 > -1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > -1.7321 0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 > -2.2321 -0.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 > -2.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 > -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 > 1 2 1 0 0 0 0 > 2 3 1 6 0 0 0 > 2 4 1 0 0 0 0 > 2 5 1 0 0 0 0 > 5 6 1 0 0 0 0 > M END > > > -- > View this message in context: http://forums.openbabel.org/Chiral-flag-lost-tp3574482p3574482.html > Sent from the openbabel-scripting mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Simplify data backup and recovery for your virtual environment with vRanger. > Installation's a snap, and flexible recovery options mean your data is safe, > secure and there when you need it. Discover what all the cheering's about. > Get your free trial download today. > http://p.sf.net/sfu/quest-dev2dev2 > _______________________________________________ > OpenBabel-scripting mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > |
From: dave.nunn <dav...@gm...> - 2011-06-05 01:19:24
|
Am I missing an option, or is OB tromping on my chiral flag? Using Open Babel 2.3.0, as the script below shows, a mol file with chiral flag set is read in, but when written out, it is gone? -- Dave Nunn #!/usr/bin/perl use strict; use Chemistry::OpenBabel; undef($/); my $molfile = <DATA>; my $obmol = new Chemistry::OpenBabel::OBMol; my $obconversion = new Chemistry::OpenBabel::OBConversion; $obconversion->SetInAndOutFormats('sdf', 'sdf'); $obconversion->ReadString($obmol, $molfile); print $obconversion->WriteString($obmol); __END__ (S)-2-butanol OpenBabel06041121052D 6 5 0 0 1 0 0 0 0 0999 V2000 -1.7321 1.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 -1.7321 0.0000 0.0000 C 0 0 2 0 0 0 0 0 0 0 0 0 -2.2321 -0.8660 0.0000 H 0 0 0 0 0 0 0 0 0 0 0 0 -2.7321 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0 0 0 0 -0.8660 -0.5000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 0.0000 -0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0 1 2 1 0 0 0 0 2 3 1 6 0 0 0 2 4 1 0 0 0 0 2 5 1 0 0 0 0 5 6 1 0 0 0 0 M END -- View this message in context: http://forums.openbabel.org/Chiral-flag-lost-tp3574482p3574482.html Sent from the openbabel-scripting mailing list archive at Nabble.com. |
From: saad k. <sk...@gm...> - 2011-05-24 06:20:38
|
How can I do energy minimization using perl and open babel of many 3d structures together. thank you -- Saad |
From: Noel O'B. <bao...@gm...> - 2011-05-16 11:59:58
|
Fair enough. All you need to do is add a line to openbabel-ruby.i to enable support for the header file that contains the OBDepict declaration. Then rerun cmake, but make sure that a recent version of SWIG is on the path, and specify -DRUN_SWIG=ON. - Noel On 16 May 2011 12:54, Christoph Helma <he...@in...> wrote: > Noel, > > Thanks for the tip! But I need to write some custom code (preferably in > Ruby) to highlight _sets_ of activating and deactivating substructures > with different colors in compounds. As far as I can see I would need the > OBDepict class (in Ruby) for this purpose. > > Best regards, > Christoph > >> After googling, I see that RMagick may be a better way to convert from >> SVG to PNG from Ruby. >> >> - Noel >> >> On 14 May 2011 18:32, Noel O'Boyle <bao...@gm...> wrote: >> > Rather than use OBPainter or OBDepict, why not convert to SVG as >> > normal, and then use a cairo interface to draw as a PNG. This is what >> > I am doing for the python interface, eg. >> > >> > import cairo >> > import rsvg >> > >> > h = rsvg.Handle("test.svg") >> > s = cairo.ImageSurface(cairo.FORMAT_ARGB32, 100, 100) >> > ctx = cairo.Context(s) >> > h.render_cairo(ctx) >> > s.write_to_png("test.png") >> > >> > These are GTK libraries. Maybe you can find similar libraries in Ruby? >> > >> > - Noel >> > >> > On 11 May 2011 11:50, Christoph Helma <he...@in...> wrote: >> >> I wanted to substitute CDK/JChemPaint with OBDepict in our ruby based >> >> webservices, but it seems that OBDepict (and also OBPaint) do not have >> >> ruby bindings (other classes like OBMol or OBConversion work fine): >> >> >> >> depict = OpenBabel::OBDepict.new >> >> NameError: uninitialized constant OpenBabel::OBDepict >> >> from (irb):1 >> >> >> >> It seems that OBDepict is missing from scripts/ruby/openbabel-ruby.cpp >> >> which changes would I need to make to create ruby bindings for OBDepict >> >> (my SWIG knowledge is rather weak)? >> >> >> >> Best regards, >> >> Christoph >> >> >> >> PS: I also had to change Init_OpenBabel to Init_openbabel at line 49795 >> >> of openbabel-ruby.cpp. This problem has been fixed in OpenBabel 2.2.3, >> >> but it reappeared in 2.3.0 >> >> >> >> ------------------------------------------------------------------------------ >> >> Achieve unprecedented app performance and reliability >> >> What every C/C++ and Fortran developer should know. >> >> Learn how Intel has extended the reach of its next-generation tools >> >> to help boost performance applications - inlcuding clusters. >> >> http://p.sf.net/sfu/intel-dev2devmay >> >> _______________________________________________ >> >> OpenBabel-scripting mailing list >> >> Ope...@li... >> >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting >> >> >> > > |
From: Christoph H. <he...@in...> - 2011-05-16 11:54:47
|
Noel, Thanks for the tip! But I need to write some custom code (preferably in Ruby) to highlight _sets_ of activating and deactivating substructures with different colors in compounds. As far as I can see I would need the OBDepict class (in Ruby) for this purpose. Best regards, Christoph > After googling, I see that RMagick may be a better way to convert from > SVG to PNG from Ruby. > > - Noel > > On 14 May 2011 18:32, Noel O'Boyle <bao...@gm...> wrote: > > Rather than use OBPainter or OBDepict, why not convert to SVG as > > normal, and then use a cairo interface to draw as a PNG. This is what > > I am doing for the python interface, eg. > > > > import cairo > > import rsvg > > > > h = rsvg.Handle("test.svg") > > s = cairo.ImageSurface(cairo.FORMAT_ARGB32, 100, 100) > > ctx = cairo.Context(s) > > h.render_cairo(ctx) > > s.write_to_png("test.png") > > > > These are GTK libraries. Maybe you can find similar libraries in Ruby? > > > > - Noel > > > > On 11 May 2011 11:50, Christoph Helma <he...@in...> wrote: > >> I wanted to substitute CDK/JChemPaint with OBDepict in our ruby based > >> webservices, but it seems that OBDepict (and also OBPaint) do not have > >> ruby bindings (other classes like OBMol or OBConversion work fine): > >> > >> depict = OpenBabel::OBDepict.new > >> NameError: uninitialized constant OpenBabel::OBDepict > >> from (irb):1 > >> > >> It seems that OBDepict is missing from scripts/ruby/openbabel-ruby.cpp > >> which changes would I need to make to create ruby bindings for OBDepict > >> (my SWIG knowledge is rather weak)? > >> > >> Best regards, > >> Christoph > >> > >> PS: I also had to change Init_OpenBabel to Init_openbabel at line 49795 > >> of openbabel-ruby.cpp. This problem has been fixed in OpenBabel 2.2.3, > >> but it reappeared in 2.3.0 > >> > >> ------------------------------------------------------------------------------ > >> Achieve unprecedented app performance and reliability > >> What every C/C++ and Fortran developer should know. > >> Learn how Intel has extended the reach of its next-generation tools > >> to help boost performance applications - inlcuding clusters. > >> http://p.sf.net/sfu/intel-dev2devmay > >> _______________________________________________ > >> OpenBabel-scripting mailing list > >> Ope...@li... > >> https://lists.sourceforge.net/lists/listinfo/openbabel-scripting > >> > > |