five

How to differentiate collective variables in free energy codes: Computer-algebra code generation and automatic differentiation

收藏
doi.org2025-01-09 收录
下载链接:
http://doi.org/10.17632/r4r67bvkdn.1
下载链接
链接失效反馈
官方服务:
资源简介:
The proper choice of collective variables (CVs) is central to biased-sampling free energy reconstruction methods in molecular dynamics simulations. The PLUMED 2 library, for instance, provides several sophisticated CV choices, implemented in a C++ framework; however, developing new CVs is still time consuming due to the need to provide code for the analytical derivatives of all functions with respect to atomic coordinates. We present two solutions to this problem, namely (a) symbolic differentiation and code generation, and (b) automatic code differentiation, in both cases leveraging open-source libraries (SymPy and Stan Math respectively). The two approaches are demonstrated and discussed in detail implementing a realistic example CV, the local radius of curvature of a polymer. Users may use the code as a template to streamline the implementation of their own CVs using high-level constructs and automatic gradient computation.

在分子动力学模拟中,集体变量(CVs)的恰当选择对于无偏采样自由能重建方法至关重要。以 PLUMED 2 库为例,它提供了多种复杂的 CV 选择,这些选择在 C++ 框架中得以实现;然而,由于需要为所有函数相对于原子坐标的解析导数提供代码,开发新的 CV 仍然耗时。我们针对此问题提出了两种解决方案,即(a)符号微分和代码生成,(b)自动代码微分,这两种方法均利用了开源库(SymPy 和 Stan Math)。这两个方法在实现一个现实例证 CV,即聚合物局部曲率半径的案例中得到了详细演示和讨论。用户可以使用此代码作为模板,以便利用高级构造和自动梯度计算简化他们自己的 CV 实现。
提供机构:
Mendeley Data
5,000+
优质数据集
54 个
任务类型
进入经典数据集
二维码
社区交流群

面向社区/商业的数据集话题

二维码
科研交流群

面向高校/科研机构的开源数据集话题

数据驱动未来

携手共赢发展

商业合作