Maximum time exceeded

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Maximum time exceeded

Jan-Joris Devogelaer
Dear,

When converting every entry of a multimolecule .sd file to the .can smiles format in Python 3.5, I get the following error approximately 30 times for 23000 entries:

*** Open Babel Error  in OpenBabel::CanonicalLabelsImpl::CalcCanonicalLabels
  maximum time exceeded...
==============================

Empirically, I figured out that for a smaller test set no errors would occur and that only very large molecules will result in this error.

Is there any way of dealing with this error?

Thank you,

Jan-Joris
Reply | Threaded
Open this post in threaded view
|

Re: Maximum time exceeded

Tim Vandermeersch
Hi,

Unfortunatly this is not possible out-of-the-box.

The SMILES format uses the default timeout (5 seconds) for calculating the canonical code (specified in include/openbabel/canon.h). Changing the call in src/formats/smilesformat.cpp from

CanonicalLabels(&mol, symmetry_classes, canonical_order, frag_atoms);

to

CanonicalLabels(&mol, symmetry_classes, canonical_order, frag_atoms, 60);

will increase the timeout. If you compiled OpenBabel from source code this is easy to do.

A better solution would be to have this as an option to the SMILES format...

Kind regards,
Tim




On Mon, Feb 20, 2017 at 2:02 PM, Jan-Joris Devogelaer <[hidden email]> wrote:
Dear,

When converting every entry of a multimolecule .sd file to the .can smiles
format in Python 3.5, I get the following error approximately 30 times for
23000 entries:

*** Open Babel Error  in OpenBabel::CanonicalLabelsImpl::CalcCanonicalLabels
  maximum time exceeded...
==============================

Empirically, I figured out that for a smaller test set no errors would occur
and that only very large molecules will result in this error.

Is there any way of dealing with this error?

Thank you,

Jan-Joris



--
View this message in context: http://forums.openbabel.org/Maximum-time-exceeded-tp4659742.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Maximum time exceeded

Noel O'Boyle
Administrator
Any chance of a test case (an example SDF or SMILES that causes the problem)?

- Noel

On 20 February 2017 at 22:38, Tim Vandermeersch
<[hidden email]> wrote:

> Hi,
>
> Unfortunatly this is not possible out-of-the-box.
>
> The SMILES format uses the default timeout (5 seconds) for calculating the
> canonical code (specified in include/openbabel/canon.h). Changing the call
> in src/formats/smilesformat.cpp from
>
> CanonicalLabels(&mol, symmetry_classes, canonical_order, frag_atoms);
>
> to
>
> CanonicalLabels(&mol, symmetry_classes, canonical_order, frag_atoms, 60);
>
> will increase the timeout. If you compiled OpenBabel from source code this
> is easy to do.
>
> A better solution would be to have this as an option to the SMILES format...
>
> Kind regards,
> Tim
>
>
>
>
> On Mon, Feb 20, 2017 at 2:02 PM, Jan-Joris Devogelaer
> <[hidden email]> wrote:
>>
>> Dear,
>>
>> When converting every entry of a multimolecule .sd file to the .can smiles
>> format in Python 3.5, I get the following error approximately 30 times for
>> 23000 entries:
>>
>> *** Open Babel Error  in
>> OpenBabel::CanonicalLabelsImpl::CalcCanonicalLabels
>>   maximum time exceeded...
>> ==============================
>>
>> Empirically, I figured out that for a smaller test set no errors would
>> occur
>> and that only very large molecules will result in this error.
>>
>> Is there any way of dealing with this error?
>>
>> Thank you,
>>
>> Jan-Joris
>>
>>
>>
>> --
>> View this message in context:
>> http://forums.openbabel.org/Maximum-time-exceeded-tp4659742.html
>> Sent from the General discussion mailing list archive at Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> _______________________________________________
>> OpenBabel-discuss mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Maximum time exceeded

Jan-Joris Devogelaer
Hi,

By trail and error I found that the CSD entry AWETAZ 'crashes' my program. The quite lenghty SMILES code derived from the CSD (not canonical) is:

[CH]123456[H][CH2]789%101[N]1%11%12%13%142[CH2]2%15%165[CH2]5%17%10%12[CH]%10%12%18%13([CH2]%139%11([CH2]961([C]16%11%19%203[H][C]49([H]1)([H]6)([H]%11)([H]%19)[H]%20)[CH2]1%142%10([C]23469%15[H][C]%161([H]2)([H]3)([H]4)([H]6)[H]9)[H]%18)[C]123467[H][C]8%13([H]1)([H]2)([H]3)([H]4)[H]6)[C]123465[H][C]%17%12([H]1)([H]2)([H]3)([H]4)[H]6.CCN1(CC)[CH2]23[CH2]456([C]789%10%112[H]5[C]34([H]67)([H]8)([H]9)([H]%10)[H]%11)N([CH2]23[CH2]4561[H]1[C]789%1025[H]4[C]361([H]7)([H]8)([H]9)[H]%10)(CC)CC.CCOC(=O)COc1c2Sc3cc(cc(c3O)Sc3cc(cc(Sc4c(c(Sc1cc(c2)C(C)(C)C)cc(c4)C(C)(C)C)O)c3[O-])C(C)(C)C)C(C)(C)C

I also tried converted this SMILES code to a canonical SMILES code, again resulting in a maximum time error.

Thank you,

Jan-Joris
Reply | Threaded
Open this post in threaded view
|

Re: Maximum time exceeded

Noel O'Boyle
Administrator
Your structure is messed up (multiple crystallographic models
overlaid), but this is independent of the canonicalisation failure.

When you say it "crashes" your program, what exactly do you mean? That
you get the error message?

- Noel

On 21 February 2017 at 11:11, Jan-Joris Devogelaer
<[hidden email]> wrote:

> Hi,
>
> By trail and error I found that the CSD entry AWETAZ 'crashes' my program.
> The quite lenghty SMILES code derived from the CSD (not canonical) is:
>
> [CH]123456[H][CH2]789%101[N]1%11%12%13%142[CH2]2%15%165[CH2]5%17%10%12[CH]%10%12%18%13([CH2]%139%11([CH2]961([C]16%11%19%203[H][C]49([H]1)([H]6)([H]%11)([H]%19)[H]%20)[CH2]1%142%10([C]23469%15[H][C]%161([H]2)([H]3)([H]4)([H]6)[H]9)[H]%18)[C]123467[H][C]8%13([H]1)([H]2)([H]3)([H]4)[H]6)[C]123465[H][C]%17%12([H]1)([H]2)([H]3)([H]4)[H]6.CCN1(CC)[CH2]23[CH2]456([C]789%10%112[H]5[C]34([H]67)([H]8)([H]9)([H]%10)[H]%11)N([CH2]23[CH2]4561[H]1[C]789%1025[H]4[C]361([H]7)([H]8)([H]9)[H]%10)(CC)CC.CCOC(=O)COc1c2Sc3cc(cc(c3O)Sc3cc(cc(Sc4c(c(Sc1cc(c2)C(C)(C)C)cc(c4)C(C)(C)C)O)c3[O-])C(C)(C)C)C(C)(C)C
>
> I also tried converted this SMILES code to a canonical SMILES code, again
> resulting in a maximum time error.
>
> Thank you,
>
> Jan-Joris
>
>
>
>
> --
> View this message in context: http://forums.openbabel.org/Maximum-time-exceeded-tp4659742p4659745.html
> Sent from the General discussion mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Maximum time exceeded

Tim Vandermeersch
Hi,

This patch [1] can be used to specify a timeout. The example molecule takes 60 seconds on my computer.


Tim


On Tue, Feb 21, 2017 at 3:33 PM, Noel O'Boyle <[hidden email]> wrote:
Your structure is messed up (multiple crystallographic models
overlaid), but this is independent of the canonicalisation failure.

When you say it "crashes" your program, what exactly do you mean? That
you get the error message?

- Noel

On 21 February 2017 at 11:11, Jan-Joris Devogelaer
<[hidden email]> wrote:
> Hi,
>
> By trail and error I found that the CSD entry AWETAZ 'crashes' my program.
> The quite lenghty SMILES code derived from the CSD (not canonical) is:
>
> [CH]123456[H][CH2]789%101[N]1%11%12%13%142[CH2]2%15%165[CH2]5%17%10%12[CH]%10%12%18%13([CH2]%139%11([CH2]961([C]16%11%19%203[H][C]49([H]1)([H]6)([H]%11)([H]%19)[H]%20)[CH2]1%142%10([C]23469%15[H][C]%161([H]2)([H]3)([H]4)([H]6)[H]9)[H]%18)[C]123467[H][C]8%13([H]1)([H]2)([H]3)([H]4)[H]6)[C]123465[H][C]%17%12([H]1)([H]2)([H]3)([H]4)[H]6.CCN1(CC)[CH2]23[CH2]456([C]789%10%112[H]5[C]34([H]67)([H]8)([H]9)([H]%10)[H]%11)N([CH2]23[CH2]4561[H]1[C]789%1025[H]4[C]361([H]7)([H]8)([H]9)[H]%10)(CC)CC.CCOC(=O)COc1c2Sc3cc(cc(c3O)Sc3cc(cc(Sc4c(c(Sc1cc(c2)C(C)(C)C)cc(c4)C(C)(C)C)O)c3[O-])C(C)(C)C)C(C)(C)C
>
> I also tried converted this SMILES code to a canonical SMILES code, again
> resulting in a maximum time error.
>
> Thank you,
>
> Jan-Joris
>
>
>
>
> --
> View this message in context: http://forums.openbabel.org/Maximum-time-exceeded-tp4659742p4659745.html
> Sent from the General discussion mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> OpenBabel-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss