Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Apr 13;17(4):2355-2363.
doi: 10.1021/acs.jctc.0c01343. Epub 2021 Mar 17.

TorchMD: A Deep Learning Framework for Molecular Simulations

Affiliations

TorchMD: A Deep Learning Framework for Molecular Simulations

Stefan Doerr et al. J Chem Theory Comput. .

Abstract

Molecular dynamics simulations provide a mechanistic description of molecules by relying on empirical potentials. The quality and transferability of such potentials can be improved leveraging data-driven models derived with machine learning approaches. Here, we present TorchMD, a framework for molecular simulations with mixed classical and machine learning potentials. All force computations including bond, angle, dihedral, Lennard-Jones, and Coulomb interactions are expressed as PyTorch arrays and operations. Moreover, TorchMD enables learning and simulating neural network potentials. We validate it using standard Amber all-atom simulations, learning an ab initio potential, performing an end-to-end training, and finally learning and simulating a coarse-grained model for protein folding. We believe that TorchMD provides a useful tool set to support molecular simulations of machine learning potentials. Code and data are freely available at github.com/torchmd.

PubMed Disclaimer

Conflict of interest statement

The authors declare no competing financial interest.

Figures

Figure 1
Figure 1
An example YAML force field for water molecules.
Figure 2
Figure 2
An example of a training input file for training QM9.
Figure 3
Figure 3
Learning curve for the QM9 data set.
Figure 4
Figure 4
Inference of partial atomic charges q from a short trajectory. Training loss (top) and charges (bottom) during training.
Figure 5
Figure 5
Miniprotein chignolin: heavy-atom representation (left) and coarse-grained representations: CA beads connected by bonds (middle) and CA and CB beads connected by bonds (right). The beads in coarse-grained representations were colored by bead type.
Figure 6
Figure 6
An example of a simulation input file.
Figure 7
Figure 7
Two-dimensional free energy surfaces for the reference all-atom MD simulations (left) and the two coarse-grained models, CA (center) and CACB (right). The free energy surface for each simulation set was obtained by binning over the first two TICA dimensions, dividing them into a 120 × 120 grid, and averaging the weights of the equilibrium probability in each bin computed by the Markov state model. The reference MD simulations plot displays the locations of the three energy minima on the surface, corresponding to folded state (red dot), unfolded conformations (blue dot), and a misfolded state (orange dot). Both reference MD and coarse-grained simulations were performed at 350 K.
Figure 8
Figure 8
RMSD values across the first 2 ns of the unmodified trajectory (True, red) and a mirror image of the original trajectory (Mirror, gray) for the CA model (on the left) and the CACB model (on the right). Trajectory 4 (top left panel) and Trajectory 1 (top right panel) are examples of trajectories started from the folded state for the CA model and the CACB model, respectively. Trajectory 8 (bottom left panel) and Trajectory 7 (bottom right panel) are examples of trajectories started from the elongated chain for the CA model and the CACB model, respectively. A moving average of 100 frames is represented as darker lines. The full 10 ns of each simulation is included in Supporting Figures S6–S9.

References

    1. Lee E. H.; Hsin J.; Sotomayor M.; Comellas G.; Schulten K. Discovery Through the Computational Microscope. Structure 2009, 17, 1295–1306. 10.1016/j.str.2009.09.001. - DOI - PMC - PubMed
    1. Ponder J. W.; Case D. A.. Advances in Protein Chemistry; Protein Simulations; Academic Press: 2003; Vol. 66, pp 27–85, 10.1016/S0065-3233(03)66002-X. - DOI - PubMed
    1. Martínez-Rosell G.; Giorgino T.; Harvey M. J.; de Fabritiis G. Drug Discovery and Molecular Dynamics: Methods, Applications and Perspective Beyond the Second Timescale. Current Topics in Medicinal Chemistry 2017, 17, 2617–2625. 10.2174/1568026617666170414142549. - DOI - PubMed
    1. Schütt K.; Kindermans P.-J.; Felix H. E. S.; Chmiela S.; Tkatchenko A.; Müller K.-R. Schnet: A continuous-filter convolutional neural network for modeling quantum interactions. Advances in neural information processing systems 2017, 991–1001.
    1. Schütt K. T.; Sauceda H. E.; Kindermans P.-J.; Tkatchenko A.; Müller K.-R. SchNet–A deep learning architecture for molecules and materials. J. Chem. Phys. 2018, 148, 241722. 10.1063/1.5019779. - DOI - PubMed