deepmodeling / DMFF

DMFF (Differentiable Molecular Force Field) is a Jax-based python package that provides a full differentiable implementation of molecular force field models.
GNU Lesser General Public License v3.0
143 stars 41 forks source link

update the charge #175

Closed Cynthia-0807 closed 2 months ago

Cynthia-0807 commented 3 months ago

Summary

implement of charmm fluctuating charge model(Charmm-FQ).

Motivation

Charges are update by extended lagrangian method in Charmm-FQ model,so they are changed with the time.I don't know how to implement the model,because DMFF seems to be static without the concept of the time. Only matrix inversion to solve the charge?

Suggested Solutions

No response

Further Information, Files, and Links

No response

KuangYu commented 2 months ago

Yes, for Qeq model, DMFF currently only supports rigorously adiabatic solutions (such as matrix inversion or root finding algorithms). It does not provide an extended-Lagrangian integrator yet. So you will have to implement the integrator yourself, or interface DMFF with a MD simulation package with this feature. However, DMFF can provide you with all the gradients you need for this task (like dU/dQ, which you would need in the integrator, can be computed trivially using DMFF).

And as we discussed in the last time, the speed could be a bigger concern if you are going to use DMFF in serious large scale simulations. When we interface DMFF with other MD packages, the data trafficing issue is slowing down the entire simulation. Things could be potentially better if we using JAX to write our own integrator, which is something we are probably going to do in future, but right now it is not the top priority of the development team (as DMFF was primarily designed for model optimization...).

Cynthia-0807 commented 2 months ago

Yes, for Qeq model, DMFF currently only supports rigorously adiabatic solutions (such as matrix inversion or root finding algorithms). It does not provide an extended-Lagrangian integrator yet. So you will have to implement the integrator yourself, or interface DMFF with a MD simulation package with this feature. However, DMFF can provide you with all the gradients you need for this task (like dU/dQ, which you would need in the integrator, can be computed trivially using DMFF).

And as we discussed in the last time, the speed could be a bigger concern if you are going to use DMFF in serious large scale simulations. When we interface DMFF with other MD packages, the data trafficing issue is slowing down the entire simulation. Things could be potentially better if we using JAX to write our own integrator, which is something we are probably going to do in future, but right now it is not the top priority of the development team (as DMFF was primarily designed for model optimization...).

Thanks for Prof. Yu's reply and suggestion! For my case, it is a better choice to inplement the model directly in MD engine without the data trafficing between the software.