MDRefine: a Python package for refining Molecular Dynamics trajectories with experimental data

Ivan Gilardoni,Valerio Piomponi,Thorben Fröhlking,Giovanni Bussi
2024-11-12
Abstract:Molecular dynamics (MD) simulations play a crucial role in resolving the underlying conformational dynamics of molecular systems. However, their capability to correctly reproduce and predict dynamics in agreement with experiments is limited by the accuracy of the force-field model. This capability can be improved by refining the structural ensembles or the force-field parameters. Furthermore, discrepancies with experimental data can be due to imprecise forward models, namely, functions mapping simulated structures to experimental observables. Here, we introduce MDRefine, a Python package aimed at implementing the refinement of the ensemble, the force-field and/or the forward model by comparing MD-generated trajectories with experimental data. The software consists of several tools that can be employed separately from each other or combined together in different ways, providing a seamless interpolation between these three different types of refinement. We use some benchmark cases to show that the combined approach is superior to separately applied refinements. Source code, documentation and examples are freely available at <a class="link-external link-https" href="https://pypi.org/project/MDRefine" rel="external noopener nofollow">this https URL</a> and <a class="link-external link-https" href="https://github.com/bussilab/MDRefine" rel="external noopener nofollow">this https URL</a>.
Chemical Physics,Biological Physics,Computational Physics,Biomolecules
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve Molecular dynamics (MD) simulations play a crucial role in elucidating the conformational dynamics of complex molecular systems. However, due to the limited accuracy of force field models, these simulations are also limited in their ability to reproduce and predict experimental results. This capability can be enhanced by optimizing the structural ensemble or force field parameters. Additionally, discrepancies with experimental data may arise from inaccuracies in the forward model (i.e., the function that maps simulated structures to experimental observables). This paper introduces a Python package named **MDRefine**, which aims to optimize structural ensembles, force field parameters, and/or forward models by comparing MD-generated trajectories with experimental data. The package includes multiple tools that can be used individually or combined in various ways, providing seamless interpolation between these three different types of optimization. The authors demonstrate that the integrated approach outperforms the optimization methods applied individually through several benchmark cases. The source code, documentation, and examples are available at: [https://pypi.org/project/MDRefine](https://pypi.org/project/MDRefine) and [https://github.com/bussilab/MDRefine](https://github.com/bussilab/MDRefine). ### Specific Problems 1. **Accuracy of Force Field Models**: The accuracy of MD simulations is limited by the force field models, leading to inconsistencies between simulation results and experimental data. 2. **Optimization of Structural Ensembles**: Optimizing existing MD trajectories to better fit experimental data by incorporating experimental information post hoc. 3. **Inaccuracy of Forward Models**: Inaccuracies in the forward model can lead to discrepancies between simulation results and experimental data. 4. **Complexity of Multi-System Analysis**: Analyzing multiple systems simultaneously to improve transferability increases the complexity of the method. ### Solutions - **MDRefine** provides a unified framework to simultaneously optimize structural ensembles, force field parameters, and forward models. - **Modular Design**: Users can choose different optimization methods as needed or combine multiple methods. - **Automated Hyperparameter Search**: Automatically determines the optimal hyperparameters through cross-validation, enhancing the model's generalization ability. - **Flexible Regularization**: Allows users to customize regularization terms for force fields and forward models to suit different research needs. Through these methods, **MDRefine** aims to improve the accuracy of MD simulations, making them better aligned with experimental data, and providing a powerful tool for analyzing complex molecular systems.