Project ID: plumID:19.011
Name: Automatic Gradient Computation for Collective Variables
Category: other
Keywords: gradient, differentiation, curvature
PLUMED version: 2.5.1-giorgino-j.cpc.2018.02.017
Contributor: Toni Giorgino
Submitted on: 16 Apr 2019
Publication: T. Giorgino, How to differentiate collective variables in free energy codes: Computer-algebra code generation and automatic differentiation, Computer Physics Communications 228, 258–263 (2018)

PLUMED input files

File Compatible with
plumed-nest-readme.dat tested on v2.7 tested on master

Last tested: 23 Jan 2021, 20:45:11

Project description and instructions
This repository contains code illustrating two approaches to automate gradient computation for collective variables in PLUMED. The two approaches are used to implement the example colvars CURVATURE_CODEGEN and CURVATURE_AUTODIFF, which compute the radius of curvature given three atoms, and CURVATURE_MULTICOLVAR_CODEGEN, given a polymer. The code is found in submodules named src/curvature_codegen (code generation approach from symbolic expressions by SymPy) and src/curvature_autodiff (code differentiation approach with the Stan Math library). Example files with regression tests are provided in the directories regtest/curvature_codegen and regtest/curvature_autodiff respectively.

Submission history
[v1] 16 Apr 2019: original submission

Click on the image below and get the code to add the badge to your website!