maltesie / bridge2

GUI for interactive graph-based analyses of hydrogen bond networks in crystal structures and MD trajectories.
9 stars 0 forks source link

Extract matrix data from the occupancy plot #11

Open Shweta2095 opened 1 week ago

Shweta2095 commented 1 week ago

Hello, I am currently using the software to analyze hydrogen bond data and visualize the occupancy plot. However, I was wondering if there is a way to obtain the raw data used to generate the occupancy plot in a matrix format for further analysis. Is there already a way to achieve this in the current version or could you provide steps or guidance on how to extract this data manually? Thank you for your time and support.

maltesie commented 4 days ago

Hi,

right now you can only export the analysis summary under File -> export analysis summary. But that only contains the average occupancy across your trajectory. Would you need the Matrix with Pairs as columns and time as rows?

maltesie commented 4 days ago

If you want to do it your self, its probably best to export the data in the function _set_results in core/network.py . results is a dictionary with the partners as keys and the time series in a numpy array as values. If you compute hbonds, the array is boolean, for water wires its integers indicating the number of water molecules and inf if no wire was detected.

Shweta2095 commented 4 days ago

Thank you for your suggestions. I will try to export the data for my analysis.

maltesie commented 3 days ago

Let me know if you need any more info. I will try to find some time in the next weeks to implement this, but I cant promise anything.