I'm working on an implementation of force field plugins for avogadrolibs but I have some conceptual questions on where to put some of the code.
Initially, I'd just put the bits into qtplugins directories, like the "workflow" scripts. (Some of the force fields will be in C++ and others can be loaded as Python scripts.)
But I can imagine wanting charges and force field energies in lots of places - particularly charges. For example, it would be great to have popup menus listing all charge models in multiple places in the UI:
- Properties -> Atom (partial charges in a table)
- Surfaces -> Electrostatic Potential (partial charges to color the surface)
- Properties -> Dipole Moment (or something like this)
There seems to be a need for these in core classes, or at least qtgui
Thus, I can imagine developing a PythonScriptLoader class that finds scripts of different types (generators, workflows, charges, forcefields, etc.) and stores them as lists/hashes. Right now, interfacescript.h and pythonscript.h live in qtgui.
Does it make sense for chargemodel.h and/or forcefield.h to live in qtgui as well? (This suggests that inputgenerator files should be moved there too.)