Implementing efficient concerted rotations using Mathematica and C code

Eur Phys J E Soft Matter. 2018 Jul 20;41(7):87. doi: 10.1140/epje/i2018-11694-7.

Abstract

In this article we demonstrate a general and efficient metaprogramming implementation of concerted rotations using Mathematica. Concerted rotations allow the movement of a fixed portion of a polymer backbone with fixed bending angles, like a protein, while maintaining the correct geometry of the backbone and the initial and final points of the portion fixed. Our implementation uses Mathematica to generate a C code which is then wrapped in a library by a Python script. The user can modify the Mathematica notebook to generate a set of concerted rotations suited for a particular backbone geometry, without having to write the C code himself. The resulting code is highly optimized, performing on the order of thousands of operations per second.

Keywords: Topical issue: Advances in Computational Methods for Soft Matter Systems.