-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor rigidbody
module to allow the preparation of cns_input
to be done in parallel
#933
Conversation
|
||
self.output_models.append(model) | ||
else: | ||
cns_input = self.prepare_cns_input_parallel( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because you know that the parallel approach is better for high number of len(models_to_dock) * sampling_factor
.
Maybe checking that len(models_to_dock) * sampling_factor < 3000 or self.params["mode] == "batch"
to trigger the prepare_cns_input_sequential
else prepare_cns_input_parallel
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep we can do that, but needs to come up with a magic number. Since the speedup threshold will depend on the number of cores and processor architecthure - I'd leave as it.
You are about to submit a new Pull Request. Before continuing make sure you read the contributing guidelines and that you comply with the following criteria:
tox
tests pass. Runtox
command inside the repository folder-test.cfg
examples execute without errors. Insideexamples/
runpython run_tests.py -b
This PR refactors the
rigidbody
module to crate theprepare_cns_input
in parallel.To make it """ simpler """ I've added a
GenericTask
tolibparallel
that wraps a function call into a class that can be paralelized with the currentWorker/Scheduler
.Since I also added some integration tests, I also had to add some golden data - hence the huge number of changes, you can ignore those files. I also added new tests for the new class methods.