njzjz / dpdata_qdpi

dpdata plugin for QDπ
GNU Lesser General Public License v3.0
0 stars 2 forks source link

Units used in qdpi.pb model #14

Closed JohannesKarwou closed 1 year ago

JohannesKarwou commented 1 year ago

I am not sure if this is the right place to pose my question, but if not you might guide me to the correct place.

I would like to use the qdpi model to try to run some dynamics using openmm. I found the openmm_deepmd_plugin(https://github.com/JingHuangLab/openmm_deepmd_plugin) which, if I understand it correctly, would be able to read in a dp_model_file like the one provided for qdpi?

For correctly setting up a system there, I need to provide these variables:

dp_model.setUnitTransformCoefficients(coord_coefficient, force_coefficient, energy_coefficient)

as stated in the README file of openmm_deepmd_plugin. The coord_coefficient I can find out on my own, but I am not so sure what should be the force_coefficient and the energy_coefficient in this case, since I do not know which units are used for the qdpi model. Since the original paper is giving everything in kcal/mol and kcal/(molA) I was wondering if these are the units also used in the qdpi.pb model?

njzjz commented 1 year ago

Hi,

We use $\unicode{xC5}$, eV, and $\text{eV/}\unicode{xC5}$, as shown at https://docs.deepmodeling.com/projects/deepmd/en/master/data/system.html.

openmm_deepmd_plugin should be able to read it, but I am unsure if it can combine with DFTB3. I will contact @dingye18 for clarification.

2.1. System — DeePMD-kit documentation
JohannesKarwou commented 1 year ago

Thanks for the information and the fast reply!

Currently, I was thinking about doing something like described here: https://github.com/JingHuangLab/openmm_deepmd_plugin/blob/master/python/tests/test_deepmd_npt.py, there I would not need a combination with DFTB3 or am I misunderstanding something...

GitHub
openmm_deepmd_plugin/python/tests/test_deepmd_npt.py at master · JingHuangLab/openmm_deepmd_plugin
Contribute to JingHuangLab/openmm_deepmd_plugin development by creating an account on GitHub.
dingye18 commented 1 year ago

Hello, as far as I understand, the qdpi model is intended to be used in conjunction with DFTB3 as it helps bridge the accuracy gap between DFTB and ωB97X/6-31G*. Consequently, if you wish to incorporate the qdpi model into your simulation, DFTB3 is required.

Alternatively, are you specifically interested in running a simulation solely using the trained NNP model? If you want a simulation with NNP only, the Deepmd Plugin is enough to use.

JohannesKarwou commented 1 year ago

Thanks for the answer! I would have two use cases in mind, in both cases I would want to simulate a box of water with one small solute (e.g. methanol) solvated in it.

a) Simulate the methanol with the qdpi model and the rest with a normal force field as described in the test_deepmd_fixed_dp_particles_reference (https://github.com/JingHuangLab/openmm_deepmd_plugin/blob/master/python/tests/test_deepmd_dp_region.py) But if I understand you correctlyt this would be only possible by integrating DFTB3?

b) Simulate the same system solely with the NNP model as described in this test: test_deepmd_npt_reference (https://github.com/JingHuangLab/openmm_deepmd_plugin/blob/master/python/tests/test_deepmd_npt.py). This might be a case which should be possible using the qdpi model?

GitHub
openmm_deepmd_plugin/python/tests/test_deepmd_dp_region.py at master · JingHuangLab/openmm_deepmd_plugin
Contribute to JingHuangLab/openmm_deepmd_plugin development by creating an account on GitHub.
GitHub
openmm_deepmd_plugin/python/tests/test_deepmd_npt.py at master · JingHuangLab/openmm_deepmd_plugin
Contribute to JingHuangLab/openmm_deepmd_plugin development by creating an account on GitHub.
njzjz commented 1 year ago

DFTB3 should always be used with $\text{QD}\pi$. DFTB3 QM/MM should be used as the base in your system, and $\text{QD}\pi$ is applied to the QM region. If OpenMM cannot do QM/MM or DFTB3, I will recommend AMBER.

dingye18 commented 1 year ago

To running DFTB3/MM with OpenMM, you can refer to the psi4-openmm interface through this link. Besides, you can also try QM/MM with Q-Chem by following this repo.

However, I haven’t try the Integration of these QM/MM scripts with OpenMM Deepmd Plugin before. If you have any problems when using these scripts or Deepmd plugin, please let me know.

JohannesKarwou commented 1 year ago

Thanks for the answer! I will have a look at the psi4-openmm interface and try if I can use it with the qdpi model.