To expand the spectra display support, how about making a new plugin type for plotting?
If there’s one package in the Python ecosystem that lots of chemists know how to use (after numpy, anyway) then it’s surely matplotlib.
If we could make a plotter plugin type that gets all the data and just has to return a figure, that’d open the doors to a lot of inventive possibilities. Such plugins wouldn’t even be just restricted to displaying existing data, they could do all sorts.
A basic version would just want the plugin to return the plot as an SVG. As Qt is even one of the possible backends for matplotlib, I wonder if it could then in a sort of stretch goal be somehow hooked up to make the generated plots interactive after the plugin has returned them.
My thought has been more that a plugin can return plot data with a bunch of X and Y data (including multiple series like a band diagram), maybe including annotations for color, etc.
We already have a really nice plotting framework. Certainly returning images is possible (e.g., matplotlib and seaborn and the like can produce really impressive graphics) but as a first step, I think it’s probably easier to have some sort of “here’s some data, can you add it to a plot for me.”
Edit: Just to clarify - I agree with the general concept - just that we can start with allowing existing plugins to return data for plotting (e.g. x-ray diffraction, density of states, band diagrams, MO diagrams, etc.)
From my experience, matplotlib gives the possibility to have interactivity within the plot, such as selecting transitions by clicking on them and get information about them (energy, intensity), quite easily and flexibly (i.e., with python). jkqtplotter is likely able to do similar things, but I am not sure if the API currently exposes all required features easily (for instance, it’d be interesting to have vertical lines plots to show the IR signals along with the possibility of selecting the mode for displaying by clicking on the transitions). I understand that having a plotter widget may overlap with the current plotting infrastructure, but it may be an easy way to extend plots and spectra without needing to work on the C++ side.
I was chatting with another computational chemist and he brought up how you can use software like Molden or VMD on a supercomputer. For things like rendering massive MD trajectories this can often be the only way to get it done, as you can have systems of several million atoms with thousands of steps in the trajectory. It would be nice if there was a way to submit not just quantum chemical calculations with MoleQueue, but also rendering jobs.
I’ve been thinking about the reaction explorer, and I think there are some ways that it could be implemented that would bring about a lot of utility for users. One I particularly was going to implement in a plugin is an NEB-sIDPP method, where somehow a user would provide the plugin with a reactant and a product (perhaps different layers), and then the plugin would run the NEB-sIDPP interpolation to produce a reaction pathway. That could also then work very well with using the highly convenient xTB plugin to refine the reaction pathway. I could see that becoming very useful when g-xTB comes out since it offers such better accuracy compared to GFN2-xTB in basically every category.
As it turns out, we’ve been submitting an NSF proposal for cyberinfrastructure funding on this exact idea - linking server processing and Avogadro on the desktop. There is a bit of server-client code going back to the origin of Avogadro2. There’s also some JSON-RPC code for sending a rendering request, e.g. to a server.
What I’m less clear, is whether servers will handle the Qt and OpenGL rendering context. OTOH, there are probably other tools for server-based rendering / ray-tracing (e.g. beyond our current support for POV-Ray). Blender maybe?
I have to imagine that there are at least tools for OpenGL rendering on servers, but I am less sure about Qt support, though I wouldn’t be surprised if there already existed some built in Qt thing that let you bundle up the rendering tasks and offload them.