chemtrain: Learning deep potential models via automatic differentiation and statistical physics

IF 3.9 2区 物理与天体物理 Q1 COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS Computer Physics Communications Pub Date : 2025-05-01 Epub Date: 2025-01-28 DOI:10.1016/j.cpc.2025.109512
Paul Fuchs , Stephan Thaler , Sebastien Röcken , Julija Zavadlav
{"title":"chemtrain: Learning deep potential models via automatic differentiation and statistical physics","authors":"Paul Fuchs ,&nbsp;Stephan Thaler ,&nbsp;Sebastien Röcken ,&nbsp;Julija Zavadlav","doi":"10.1016/j.cpc.2025.109512","DOIUrl":null,"url":null,"abstract":"<div><div>Neural Networks (NNs) are effective models for refining the accuracy of molecular dynamics, opening up new fields of application. Typically trained bottom-up, atomistic NN potential models can reach first-principle accuracy, while coarse-grained implicit solvent NN potentials surpass classical continuum solvent models. However, overcoming the limitations of costly generation of accurate reference data and data inefficiency of common bottom-up training demands efficient incorporation of data from many sources. This paper introduces the framework <span>chemtrain</span> to learn sophisticated NN potential models through customizable training routines and advanced training algorithms. These routines can combine multiple top-down and bottom-up algorithms, e.g., to incorporate both experimental and simulation data or pre-train potentials with less costly algorithms. <span>chemtrain</span> provides an object-oriented high-level interface to simplify the creation of custom routines. On the lower level, <span>chemtrain</span> relies on JAX to compute gradients and scale the computations to use available resources. We demonstrate the simplicity and importance of combining multiple algorithms in the examples of parametrizing an all-atomistic model of titanium and a coarse-grained implicit solvent model of alanine dipeptide.</div></div><div><h3>Program summary</h3><div><em>Program Title:</em> <span>chemtrain</span></div><div><em>CPC Library link to program files:</em> <span><span>https://doi.org/10.17632/m6fxmcmfzz.1</span><svg><path></path></svg></span></div><div><em>Developer's repository link:</em> <span><span>https://github.com/tummfm/chemtrain</span><svg><path></path></svg></span></div><div><em>Licensing provisions:</em> Apache-2.0</div><div><em>Programming language:</em> python</div><div><em>Nature of problem:</em> Neural Network (NN) potentials provide the means to accurately model high-order many-body interactions between particles on a molecular level. Through linear computational scaling with the system size, their high expressivity opens up new possibilities for efficiently modeling systems at a higher precision without resorting to expensive, finer-scale computational methods. However, as common for data-driven approaches, the success of NN potentials depends crucially on the availability of accurate training data. Bottom-up trained state-of-the-art models can match ab initio computations closer than their actual accuracy but can still predict deviations from experimental measurements. Including more accurate reference data can, in principle, resolve this issue, but generating sufficient data is infeasible even with less precise methods for increasingly larger systems. Supplementing the training procedure with more data-efficient methods can limit required training data [1]. In addition, the models can be fully or partially trained on macroscopic reference data [2,3]. Therefore, a framework supporting a combination of multiple training algorithms could further expedite the success of NN potential models in various disciplines.</div><div><em>Solution method:</em> We propose a framework that enables the development of NN potential models through customizable training routines. The framework provides the top-down algorithm Differentiable Trajectory Reweighting [2] and the bottom-up learning algorithms Force Matching [1] and Relative Entropy Minimization [1]. A high-level object-oriented API simplifies combining multiple algorithms and setting up sophisticated training routines such as active learning. At a modularly structured lower level, the framework follows a functional programming paradigm relying on the machine learning framework JAX [4] to simplify the creation of algorithms from standard building blocks, e.g., by deriving microscopic quantities such as forces and virials from any JAX-compatible NN potential model and scaling computations to use available resources.</div></div><div><h3>References</h3><div><ul><li><span>[1]</span><span><div>S. Thaler, M. Stupp, J. Zavadlav, Deep coarse-grained potentials via relative entropy minimization, J. Chem. Phys. 157 (24) (2022) 244103, <span><span>https://doi.org/10.1063/5.0124538</span><svg><path></path></svg></span>.</div></span></li><li><span>[2]</span><span><div>S. Thaler, J. Zavadlav, Learning neural network potentials from experimental data via Differentiable Trajectory Reweighting, Nat. Commun. 12 (1) (2021) 6884, <span><span>https://doi.org/10.1038/s41467-021-27241-4</span><svg><path></path></svg></span>.</div></span></li><li><span>[3]</span><span><div>S. Röcken, J. Zavadlav, Accurate machine learning force fields via experimental and simulation data fusion, npj Comput. Mater. 10 (1) (2024) 1–10, <span><span>https://doi.org/10.1038/s41524-024-01251-4</span><svg><path></path></svg></span>.</div></span></li><li><span>[4]</span><span><div>R. Frostig, M. J. Johnson, C. Leary, Compiling machine learning programs via high-level tracing.</div></span></li></ul></div></div>","PeriodicalId":285,"journal":{"name":"Computer Physics Communications","volume":"310 ","pages":"Article 109512"},"PeriodicalIF":3.9000,"publicationDate":"2025-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Physics Communications","FirstCategoryId":"101","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0010465525000153","RegionNum":2,"RegionCategory":"物理与天体物理","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/1/28 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INTERDISCIPLINARY APPLICATIONS","Score":null,"Total":0}
引用次数: 0

Abstract

Neural Networks (NNs) are effective models for refining the accuracy of molecular dynamics, opening up new fields of application. Typically trained bottom-up, atomistic NN potential models can reach first-principle accuracy, while coarse-grained implicit solvent NN potentials surpass classical continuum solvent models. However, overcoming the limitations of costly generation of accurate reference data and data inefficiency of common bottom-up training demands efficient incorporation of data from many sources. This paper introduces the framework chemtrain to learn sophisticated NN potential models through customizable training routines and advanced training algorithms. These routines can combine multiple top-down and bottom-up algorithms, e.g., to incorporate both experimental and simulation data or pre-train potentials with less costly algorithms. chemtrain provides an object-oriented high-level interface to simplify the creation of custom routines. On the lower level, chemtrain relies on JAX to compute gradients and scale the computations to use available resources. We demonstrate the simplicity and importance of combining multiple algorithms in the examples of parametrizing an all-atomistic model of titanium and a coarse-grained implicit solvent model of alanine dipeptide.

Program summary

Program Title: chemtrain
CPC Library link to program files: https://doi.org/10.17632/m6fxmcmfzz.1
Developer's repository link: https://github.com/tummfm/chemtrain
Licensing provisions: Apache-2.0
Programming language: python
Nature of problem: Neural Network (NN) potentials provide the means to accurately model high-order many-body interactions between particles on a molecular level. Through linear computational scaling with the system size, their high expressivity opens up new possibilities for efficiently modeling systems at a higher precision without resorting to expensive, finer-scale computational methods. However, as common for data-driven approaches, the success of NN potentials depends crucially on the availability of accurate training data. Bottom-up trained state-of-the-art models can match ab initio computations closer than their actual accuracy but can still predict deviations from experimental measurements. Including more accurate reference data can, in principle, resolve this issue, but generating sufficient data is infeasible even with less precise methods for increasingly larger systems. Supplementing the training procedure with more data-efficient methods can limit required training data [1]. In addition, the models can be fully or partially trained on macroscopic reference data [2,3]. Therefore, a framework supporting a combination of multiple training algorithms could further expedite the success of NN potential models in various disciplines.
Solution method: We propose a framework that enables the development of NN potential models through customizable training routines. The framework provides the top-down algorithm Differentiable Trajectory Reweighting [2] and the bottom-up learning algorithms Force Matching [1] and Relative Entropy Minimization [1]. A high-level object-oriented API simplifies combining multiple algorithms and setting up sophisticated training routines such as active learning. At a modularly structured lower level, the framework follows a functional programming paradigm relying on the machine learning framework JAX [4] to simplify the creation of algorithms from standard building blocks, e.g., by deriving microscopic quantities such as forces and virials from any JAX-compatible NN potential model and scaling computations to use available resources.

References

  • [1]
    S. Thaler, M. Stupp, J. Zavadlav, Deep coarse-grained potentials via relative entropy minimization, J. Chem. Phys. 157 (24) (2022) 244103, https://doi.org/10.1063/5.0124538.
  • [2]
    S. Thaler, J. Zavadlav, Learning neural network potentials from experimental data via Differentiable Trajectory Reweighting, Nat. Commun. 12 (1) (2021) 6884, https://doi.org/10.1038/s41467-021-27241-4.
  • [3]
    S. Röcken, J. Zavadlav, Accurate machine learning force fields via experimental and simulation data fusion, npj Comput. Mater. 10 (1) (2024) 1–10, https://doi.org/10.1038/s41524-024-01251-4.
  • [4]
    R. Frostig, M. J. Johnson, C. Leary, Compiling machine learning programs via high-level tracing.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
chemtrain:通过自动微分和统计物理学习深层电位模型
神经网络是提高分子动力学精度的有效模型,开辟了新的应用领域。典型的自下而上训练的原子神经网络势模型可以达到第一性原理精度,而粗粒度隐式溶剂神经网络势优于经典的连续介质溶剂模型。然而,为了克服生成准确参考数据的成本高和常见的自下而上训练的数据效率低的局限性,需要有效地整合来自多个来源的数据。本文介绍了框架chemtrain,通过可定制的训练例程和先进的训练算法来学习复杂的神经网络潜在模型。这些例程可以结合多个自顶向下和自底向上的算法,例如,结合实验和模拟数据或使用成本较低的算法进行预训练。Chemtrain提供了一个面向对象的高级接口,以简化自定义例程的创建。在较低的级别上,chemtrain依赖于JAX来计算梯度并扩展计算以使用可用资源。我们在参数化钛的全原子模型和丙氨酸二肽的粗粒度隐式溶剂模型的例子中证明了结合多种算法的简单性和重要性。程序摘要程序标题:chemtrainCPC库链接到程序文件:https://doi.org/10.17632/m6fxmcmfzz.1Developer's存储库链接:https://github.com/tummfm/chemtrainLicensing条款:apache -2.0编程语言:python问题的性质:神经网络(NN)电位提供了在分子水平上精确模拟粒子之间高阶多体相互作用的手段。通过与系统大小的线性计算缩放,它们的高表达性为以更高精度高效建模系统开辟了新的可能性,而无需诉诸昂贵的,更精细的计算方法。然而,与数据驱动方法一样,神经网络潜力的成功关键取决于准确训练数据的可用性。自下而上训练的最先进的模型可以比实际精度更接近从头计算,但仍然可以预测与实验测量的偏差。包含更精确的参考数据原则上可以解决这个问题,但是对于越来越大的系统,即使使用不太精确的方法也无法生成足够的数据。用更有效的数据方法补充训练过程可以限制所需的训练数据[1]。此外,模型可以在宏观参考数据上进行全部或部分训练[2,3]。因此,支持多种训练算法组合的框架可以进一步加快神经网络潜在模型在各个学科中的成功。解决方法:我们提出了一个框架,通过可定制的训练例程来开发神经网络潜在模型。该框架提供了自顶向下的可微分轨迹重加权算法[2]和自底向上的学习算法强制匹配[1]和相对熵最小化[1]。一个高级的面向对象的API简化了组合多个算法和设置复杂的训练例程,比如主动学习。在模块化结构的较低层次上,该框架遵循依赖于机器学习框架JAX[4]的函数式编程范式,以简化来自标准构建块的算法创建,例如,通过从任何与JAX兼容的神经网络潜在模型中导出微观量(如力和病毒),并缩放计算以使用可用资源。张建军,张建军,张建军,基于熵最小化的深度粗粒度电势模型,物理学报。物理学报,157 (24)(2022)244103,https://doi.org/10.1063/5.0124538.[2]S。张晓明,张晓明,基于可微分轨迹重加权的神经网络电位学习方法,物理学报,12 (1)(2021):6884,https://doi.org/10.1038/s41467-021-27241-4.[3]S。Röcken, J. Zavadlav,基于实验和仿真数据融合的精确机器学习力场,npj computer。物质,10 (1)(2024)1- 10,https://doi.org/10.1038/s41524-024-01251-4.[4]R。Frostig, m.j. Johnson, C. Leary,通过高级跟踪编译机器学习程序。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
Computer Physics Communications
Computer Physics Communications 物理-计算机:跨学科应用
CiteScore
12.10
自引率
3.20%
发文量
287
审稿时长
5.3 months
期刊介绍: The focus of CPC is on contemporary computational methods and techniques and their implementation, the effectiveness of which will normally be evidenced by the author(s) within the context of a substantive problem in physics. Within this setting CPC publishes two types of paper. Computer Programs in Physics (CPiP) These papers describe significant computer programs to be archived in the CPC Program Library which is held in the Mendeley Data repository. The submitted software must be covered by an approved open source licence. Papers and associated computer programs that address a problem of contemporary interest in physics that cannot be solved by current software are particularly encouraged. Computational Physics Papers (CP) These are research papers in, but are not limited to, the following themes across computational physics and related disciplines. mathematical and numerical methods and algorithms; computational models including those associated with the design, control and analysis of experiments; and algebraic computation. Each will normally include software implementation and performance details. The software implementation should, ideally, be available via GitHub, Zenodo or an institutional repository.In addition, research papers on the impact of advanced computer architecture and special purpose computers on computing in the physical sciences and software topics related to, and of importance in, the physical sciences may be considered.
期刊最新文献
Residual-based Chebyshev filtered subspace iteration for Hermitian eigenvalue problems tolerant to inexact matrix-vector products Numerical modeling of laser cooling in molecules: From simple diatomics to polyatomics and radioactive species Semi-empirical pseudopotential method for monolayer transition metal dichalcogenides An adaptive dual-mesh method for fast and accurate 3D modeling of flow and transport in unsaturated porous environment at watershed scale Resonances in the Gaussian potential
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1