rinikerlab / PyGromosTools

This package is a python library with tools for the Molecular Simulation - Software Gromos. It allows you to easily set up, manage and analyze simulations in python.
https://rinikerlab.github.io/PyGromosTools/
MIT License
16 stars 14 forks source link

Expanded Repdat #311

Closed eruijsena closed 9 months ago

eruijsena commented 9 months ago

Add a new class, ExpandedRepdat, inheriting from Repdat, that has the RE-EDS-relevant fields (potential energies of the end-states + which state is maximally contributing to the reference potential) as additional columns in the Repdat.DATA DataFrame rather than in a dictionary per each row.

The other possibility would be to rewrite the Repdatparser to include the fields in the dataframe directly. The current approach is favored because the default Repdat object is loaded in memory anyway during the analysis of RE-EDS simulations, and since loading a repdat can be time-consuming it is faster to just convert one format into another, even at the expense of more memory usage. At some point in the future, it would be nicer to rewrite the parser and adapt all the analysis functions which use a Repdat.

The new class therefore takes a Repdat object as input, and just modifies its DATA attribute to contain new columns for the potential energies of each state, as well as the minimum energy state.

candidechamp commented 9 months ago

Looks good.

Agreed with the comments about how to best implement the Repdat class, and how this temporary solution is better.