Plugin takes too long to run

For full transparency, these developers reached out via e-mail a while ago with this particular concept.

The current plugin API is designed for use a menu item to trigger a command / script.

There’s a proposal for a “properties” plugin type which would be periodically polled as the molecule changes (e.g., think about a dipole moment or pKa prediction model, etc.)

At the moment, I haven’t considered leaving that particular process open asynchronously. I can see that use case, but I think it merits some discussion before actually implementing.

Personally, if you want to reduce the latency, I’d probably suggest using torchscript and having a compiled non-Python binary. Beyond the time required for import torch I’ve noticed that importing the model / torch.compile takes a significant latency hit in many of the ML-based force fields / potentials.

We’re starting a process to re-structure the plugin system around pixi which would potentially include just calling binaries or non-python programs.

On the other side, I’m curious about what kind of spectra your plotting. Right now, you should be able to pass back a set of IR peaks, etc. in the CJSON. But it looks like your model is applying broadening already, and the x-axis looks a bit unusual.

1 Like