Re: [modeller_usage] Use modeller inside class method - called from an ThreadPoolExecutor
To: Pedro Guillem <>,
Subject: Re: [modeller_usage] Use modeller inside class method - called from an ThreadPoolExecutor
From: Modeller Caretaker <>
Date: Thu, 7 May 2020 14:25:48 -0700
On 5/7/20 10:16 AM, Pedro Guillem wrote:
When I try to do this, it seems that modeller is being executed in the
first call and sharing its state with all subsequent calls... so I get
like 90 models (not 1000) written in whatever state modeller was when
running the other instances.
What do you mean by "state" in this case?
How can I force a class method to use its own modeller instance?.
If you want a separate copy of Modeller, you'd need to use processes
rather than threads. But I don't know why you'd want to do that.
Building a model from sequence is pretty fast so you'd probably lose
more in startup overhead if you do that. Most likely the most expensive
part is reading top_heav.lib and par.lib, so I would just do that once
and then use the same environ object for every sequence.