How to Differentiate Collective Variables in Free Energy Codes: Computer-Algebra Code Generation and Automatic Differentiation

Toni Giorgino
9/20/2017
5 citations
physics.comp-ph

Official code: tonigi/plumed2-automatic-gradients (6 stars, C++, LGPL-3.0, last commit 2019-07-15).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

LGPL-3.0

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

61C++, HTMLSep 2, 20177 years agoLGPL-3.0
automatic-differentiationgradientplumed2stan-math-librarysympy

Similar Papers

Cite this paper

@article{giorgino2017differentiate,
  title  = {How to Differentiate Collective Variables in Free Energy Codes: Computer-Algebra Code Generation and Automatic Differentiation},
  author = {Toni Giorgino},
  year   = {2017},
  eprint = {1709.06780},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1709.06780}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1709.06780.svg)](https://codeofpaper.com/paper/1709.06780)

Discussion