choderalab / perses

Experiments with expanded ensembles to explore chemical space
http://perses.readthedocs.io
MIT License
179 stars 51 forks source link

Profiling setup workflows #863

Open ijpulidos opened 3 years ago

ijpulidos commented 3 years ago

Identify bottlenecks in the setup steps by profiling.

ijpulidos commented 3 years ago

I performed a quick/basic profiling using our current examples and according to the following figures, we might not gain much from optimizing the setup parts of our software. It calls so many things and a real optimization would require optimizing every single one of these things, which is a huge task, as far as I can see. Maybe we could try doing something to the _constraint_repairs in the topology_proposal.py module, but even so, that adds up to ~8% of the walltime, in the "best" cases.

profiling_perses

Highlighted in red is what the "best candidate" could be, which is the one I mentioned before.

jchodera commented 3 years ago

It looks like we can definitely tune the local energy minimization, though. At one point, we had experimented with the very fast FIRE minimizer that could be "good enough" for our purposes: https://github.com/choderalab/openmmtools/blob/master/openmmtools/integrators.py#L2283-L2457

It wasn't implemented correctly (my fault!) so isn't robust, so we can clean this up. I've heard others have had a great deal of success with it.

jchodera commented 3 years ago

Is there any hint that some methods that are called repeatedly collectively add up to a lot of time?