time limit

25 views
Skip to first unread message

Karen Karapetyan

unread,
Aug 13, 2013, 2:35:38 PM8/13/13
to indigo-...@googlegroups.com
I was wondering if you could add a time limit parameter for some of the possibly time consuming methods executed on large molecules.
Particularly we would be interested in being able to restrict run time for methods such as layout, canonicalSmiles, and transform. Throwing exception would be fine.

Karen

Karen Karapetyan

unread,
Aug 13, 2013, 3:19:58 PM8/13/13
to indigo-...@googlegroups.com
I see that there is this "layout-max-iterations" option for indigo that would limit number of iterations, though I am not sure what would be the approximate "right" number of iterations that would protect us from doing lengthy (taking >1 hour) layouts for all sorts of junk that people upload to us. It would be much more convenient if we could limit not by number of iterations but by time.

Mikhail Rybalkin

unread,
Aug 21, 2013, 6:02:45 AM8/21/13
to indigo-...@googlegroups.com
Hi Karen,

There is an option (that is not in the documentation yet...) called "timeout". With it you can specify timeout in milliseconds:
indigo.setOption("timeout", "3000")
This sets timeout to 3 seconds.

We tried to add these check in all the methods that could work slow. If it is not working for your case, just let me know and I will add additional check in the code if it was missing.

If timeout is reached the methods will throw an exception. We can add additional check in the layout to stop doing iterations if timeout is reached. Do you these or is exception is fine?

Best regards,
Mikhail

Karen Karapetyan

unread,
Dec 25, 2013, 4:06:59 PM12/25/13
to indigo-...@googlegroups.com
We can add additional check in the layout to stop doing iterations if timeout is reached

Hi, Mikhail,

Yes, this seems to be more gentle way of  stopping layout iterations than throwing exceptions. Would indigoobject.molfile() has the last iteration coordinates in it after it prematurely throws exception or stops?
Reply all
Reply to author
Forward
0 new messages