7 research outputs found
Implementing efficient concerted rotations using Mathematica and C code
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