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
154 stars 43 forks source link

[Feature Request] Support Virtual Site in DMFF frontend #86

Closed WangXinyan940 closed 1 year ago

WangXinyan940 commented 1 year ago

Summary

This feature can be decomposed to three parts.

  1. Add virtual site to system topology based on template and/or SMARTS patterns.
  2. Update the positions of virtual sites correctly.
  3. Generate correct covalent map for virtual sites.

Motivation

In v0.2.0, DMFF can support virtual site in NonbondedForce. However, considering virtual site is somehow a topology based property, a more graceful way is to support patching/adding virtual site in the frontend instead of in potential implementations.

Suggested Solutions

The virtual site information would be saved in Topology object of OpenMM. We need to implement a tool to patch them from parsers and templates.

When generating energy function, the Hamiltonian itself would also generate a function for pre-processing, update the positions of virtual sites.

And the covalent map generation function need also to consider virtual sites, let them inherit the exclusion list of their parents.

Further Information, Files, and Links

No response

WangXinyan940 commented 1 year ago

This feature has been implemented. People can use the same template with virtual site as OpenMM now. This issue would be closed.