Dofulator: A tool for calculating degrees of freedom of atoms in molecules with geometry constraints
Recently, we proposed a method for calculating per-atom and per-direction degrees of freedom (DoF) in the presence of geometric constraints, enabling fine-grained local kinetic temperature calculations. Here, we discuss relevant implementation details for various constraint geometries, including those which feature kinematic loops (e.g. benzene with rigid bond lengths). Furthermore, by analyzing the effects of deformation of semi-rigid molecules on the DoF of each constituent atom, we gain insight into conditions under which atomic DoF may vary significantly during a simulation. This provides some guidance towards cases where local DoF should be calculated dynamically to obtain reliable local temperature measurements, and cases where using the atomic DoF of the equilibrium geometry as a constant throughout the simulation would be sufficient. We have implemented the presented algorithms in an open-source C library, dofulator , which can be used on its own or through a Python interface that includes compatibility with the popular MDAnalysis package. PROGRAM SUMMARY Program Title: dofulator CPC Library link to program files: (to be added by Technical Editor) Developer’s repository link: https://github.com/CTCMS-UQ/dofulator Licensing provisions: MPL-2.0 Programming language: C, Python Nature of problem: In molecular simulations with geometry constraints, determining the degrees of freedom (DoF) associated with a local kinetic temperature measurement can become non-trivial when constraints include atoms both inside and outside the local subset of interest [1]. The (fractional) DoF of atoms in a rigid body depends on their masses and the molecular geometry. If constraints do not form a rigid body, but instead a semi-rigid fragment, then the partitioning of atomic DoF can vary as the fragment deforms. Furthermore, if directional kinetic temperatures are required, DoF along each direction must be determined, which additionally depend on the orientation of the rigid body or semi-rigid fragment. Solution method: Atomic DoF can be calculated by the relative contribution of each atom to the inertia of each mode of motion [1]. This software allows rigid bodies and semi-rigid fragments to be defined, from which a plan is constructed for determining said modes and contributions. Once constructed, a plan can be applied repeatedly to calculate atomic DoF on required frames of a molecular dynamics trajectory. Additional comments including restrictions and unusual features: The core dofulator library is provided as a C API, depending only on a BLAS and LAPACK implementation and suitable for direct integration with a molecular dynamics engine (possibly with some modifications). For convenience, a thin Python wrapper is also provided, and this is used to provide plugins to MDAnalysis [2,3] which give a simple way to read molecular dynamics trajectories and define local selections of atoms for post-processing of local DoF and temperatures. Declaration of interests The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. References [1] S. Sanderson, S. R. Tee, D. J. Searles, Local temperature measurement in molecular dynamics simulations with rigid constraints, Journal of Chemical Theory and Computation 20 (23) (2024) 10615–10624. 10.1021/acs.jctc.4c00957 [2] N. Michaud-Agrawal, E. J. Denning, T. B. Woolf, O. Beckstein, MDAnalysis: A toolkit for the analysis of molecular dynamics simulations, Journal of Computational Chemistry 32 (10) (2011) 2319–2327. 10.1002/jcc.21787 [3] R. Gowers, M. Linke, J. Barnoud, T. Reddy, M. Melo, S. Seyler, J. Domański, D. Dotson, S. Buchoux, I. Kenney, O. Beckstein, MDAnalysis: A Python package for the rapid analysis of molecular dynamics simulations, in: Proceedings of the 15th Python in Science Conference, SciPy, SciPy, 2016. 10.25080/majora-629e541a-00e
Authors
- Stephen K. Sanderson (ORCID: https://orcid.org/0000-0002-4097-0496)
- Debra J. Searles (ORCID: https://orcid.org/0000-0003-1346-8318)
- Sobin Alosious
Institutions
- The University of Queensland (AU)
Publication Details
- Journal
- Computer Physics Communications
- Published
- 2025-12-20
- DOI
- https://doi.org/10.1016/j.cpc.2025.110003
- Citations
- 1
- Primary Topic
- Protein Structure and Dynamics
- Type
- article
- Field-Weighted Citation Impact
- 0.81