QMMM write forces for a single step (run 0)

From: Peter Starrs (pns2_at_st-andrews.ac.uk)
Date: Thu Feb 10 2022 - 19:23:23 CST

Dear NAMD-L,

I wish to obtain the QMMM energy and atomic forces for single configurations ("run 0") in order to build a dataset for training a machine learning potential. However, while I can obtain the energies, NAMD does not write to the ForceDCD file unless running for 2 steps or more ("run 1"). To be clear, I am not seeking to create a QMMM trajectory per se, but rather to evaluate several thousand MD-sampled snapshots, which I already have. Having to run for 2 steps per structure is obviously undesirable as it significantly increases the cost of creating my dataset.

I can obtain the cartesian gradient for the QM atoms from the QM software (ORCA) output, but I also need the forces acting on the MM atoms due to the QM electron density, represented by Mulliken charges which are obtained from ORCA on the fly. In theory I could also recalculate these forces using the MM and outputted Mulliken charges myself, but it would be more straight forward if I could just grab these from NAMD. This way I don't have to worry about reproducing PME corrections, charge scaling, or any other baked-in NAMD procedures.

One additional issue, even if I can get the forces with "run 0", is that I believe NAMD only writes the total force experienced by each atom and does not separate them into contributions from QM, Forcefield etc. My ML model is to be trained specifically on the QM parts of the calculation, so I want to have these forces separately.

Are there any config file options which I may have missed, hacks or general advice people could offer?

Thanks very much in advance.

Peter Starrs

This archive was generated by hypermail 2.1.6 : Tue Dec 13 2022 - 14:32:44 CST