New SIESTA-QM/MM interface
This MR includes the tools needed by SIESTA to run calculations within a point-charge field, while being called by an external driver; i.e., when SIESTA is used as the QM engine for QM/MM calculations.
What SIESTA receives from an external MM program are the following pieces of information: cell dimensions, QM atom coordinates, MM atom coordinates, and MM atom partial charges. From there, SIESTA calculates the electrostatic potential generated by the point charges and adds it to the corresponding SCF potential. After convergence, SIESTA also calculates forces components over said point charges (i.e. the MM atoms).
Both operations mentioned above are solved using an implementation of the Particle Mesh Ewald method done by C. Sanz and already available in the QMMM driver. The inclusion of these operations in SIESTA provides some advantages:
- Using SIESTA's own parallelization, calculations of electrostatic potential and forces over MM atoms are now much faster, and no longer become the limiting factor in very large systems.
- We no longer need to exchange grid-related information between SIESTA and the MM driver.
- This new approach is the expected one from other MM engines, thus increasing the eligibility of SIESTA as a QM engine, for QM/MM, when using other drivers (ASE, for example). In these approaches, the QM engine calculates the electrostatic term of QM/MM, while the MM driver takes care of the Lennard-Jones term.
Information exchange between SIESTA and the MM driver can be done either via pipes or sockets. For the sake of simplicity, communication with our own QM/MM driver is still handled via pipes, but a test for the socket interface is also included.