# RMS: Unable to access -bin matrix data

**URL:** https://gromacs.bioexcel.eu/t/rms-unable-to-access-bin-matrix-data/1239
**Category:** User discussions
**Created:** [December 10, 2020, 12:34pm UTC](https://gromacs.bioexcel.eu/t/rms-unable-to-access-bin-matrix-data/1239 "2020-12-10T12:34:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![peter.mawanga](https://avatars.discourse-cdn.com/v4/letter/p/ccd318/32.png) [@peter.mawanga](https://gromacs.bioexcel.eu/u/peter.mawanga)
#### Post date: [December 10, 2020, 12:34pm UTC](https://gromacs.bioexcel.eu/t/rms-unable-to-access-bin-matrix-data/1239/1 "2020-12-10T12:34:29Z")

</div>

GROMACS version: 2019.6  
GROMACS modification: No

Hello everyone,

I used the `gmx rms` command with the `-bin` flag to generate a comparison matrix for a ligand of interest. However, I am unable to view the matrix data in its present form. Please let me know which programs are recommended to convert this data into a form similar to an Excel sheet?

I had used the following command to generate the output:

`gmx_mpi rms -mw -s test.tpr -f test.trr -n lig_noh.ndx -fit rot+trans -o lig_noh.xvg -m lig_noh.xpm -bin lig_noh.dat`

---

<div class="post-metadata">

### Author: ![cblau](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/cblau/32/5_2.png) [@cblau](https://gromacs.bioexcel.eu/u/cblau)
#### Post date: [December 11, 2020, 10:45am UTC](https://gromacs.bioexcel.eu/t/rms-unable-to-access-bin-matrix-data/1239/2 "2020-12-11T10:45:20Z")

</div>

Hi Peter,

python + pandas is usually great for these things. Install pandas from `pip install pandas`. The issue is the binary format in the data - for that reason we also need to employ `numpy`, tell it the format of your data. Here is a sketch of some python code

```python
import pandas as pd
import numpy as np
# use numpy to read binary format
data = np.fromfile('lig_noh.dat', np.float32)
# convert to pandas dataframe
rmsdbins = pd.Dataframe(data)
# write out into excel format
rmsdbins.to_excel('lig_noh.xlsx')

```

Then you can visualise either with inbuilt pandas [functionality](https://pandas.pydata.org/pandas-docs/stable/user_guide/visualization.html) or use `matplotlib`.

This is a bit of a rabbit hole as there are tons of approaches out there, but I hope I could give you some leads to follow.
