# DSSP over trajectory - returns average not array

**URL:** <https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401>\
**Category:** User discussions\
**Created:** [June 30, 2020, 10:36am UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401 "2020-06-30T10:36:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![njtatum](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@njtatum](https://gromacs.bioexcel.eu/u/njtatum)\
**Post date:** [June 30, 2020, 10:36am UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401/1 "2020-06-30T10:36:28Z")

</div>

GROMACS version: 2020.2  
GROMACS modification: No

Dear all,

I’m trying to calculate the secondary structure of a protein as a function of time through the trajectory, which is 400 ns. I’m using the following command wherein I’m using an XTC which is just my protein, and an equivalent topology. I’ve visualised the trajectory from these files in VMD and they are exactly what I would expect/hope to see, so I don’t think this is a trajectory issue.

gmx do\_dssp -f md\_proc.xtc -s md\_proc.tpr -o ss.xpm -dt 1 -tu ns

DSSP (mkdssp 3.0.0) runs as I would expect, and I can see do\_dssp processing frames 0-400 ns but when I look at ss.xpm, rather than the array I would expect to see, I just get a single assignment per residue - though the x axis values in the .xpm clearly show values 0-400 ns. I’ve tried using -b and -e flags to use smaller slices (I need to disregard the first 50 ns anyhow) but no joy. And if I try to go ahead and convert this via xpm2ps I get this error:

“Fatal error:  
Too many x-axis labels in xpm (max 1)”

And if I use a webtool to convert the xpm to png I get one singular, albeit beautiful, bar.

I’ve gone so far as to load the XTC and an equivalent GRO into MDTraj in IPython and used mdtraj.compute\_dssp(traj) - the shape of the array is n\_frames x n\_residues so I’m not clear on where I’m going wrong with do\_dssp.

Is anyone able to shed light on where I’m going wrong with do\_dssp?

Many thanks for any advice,

Natalie Tatum  
PDRA Newcastle University

---

<div class="post-metadata">

**Author:** ![pbauer](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/pbauer/32/13_2.png) [@pbauer](https://gromacs.bioexcel.eu/u/pbauer)\
**Post date:** [June 30, 2020, 10:50am UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401/2 "2020-06-30T10:50:51Z")

</div>

Hello,

this should be the bug(s) that got addressed recently in

> **[Proper fix for gmx do\_dssp (!271) · Merge Requests · GROMACS / GROMACS](https://gitlab.com/gromacs/gromacs/-/merge_requests/271)**
>
> The tool was still broken after the previous fix, even though it didn't crash any more. Fixed now by providing the correct sizes for the matrix. Fixes #3444

Can you check if applying this patch fixes the issue?

Cheers

Paul

---

<div class="post-metadata">

**Author:** ![njtatum](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@njtatum](https://gromacs.bioexcel.eu/u/njtatum)\
**Post date:** [June 30, 2020, 6:11pm UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401/3 "2020-06-30T18:11:33Z")

</div>

Hi Paul,

That’s fixed it, thanks very much!

Natalie

---

<div class="post-metadata">

**Author:** ![shokouhre](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@shokouhre](https://gromacs.bioexcel.eu/u/shokouhre)\
**Post date:** [August 10, 2020, 7:11pm UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401/4 "2020-08-10T19:11:27Z")

</div>

Hi Natalie

I have same problem with dssp, but can’t fix it.  
can you help me?

---

<div class="post-metadata">

**Author:** ![njtatum](https://avatars.discourse-cdn.com/v4/letter/n/df788c/32.png) [@njtatum](https://gromacs.bioexcel.eu/u/njtatum)\
**Post date:** [August 11, 2020, 7:49am UTC](https://gromacs.bioexcel.eu/t/dssp-over-trajectory-returns-average-not-array/401/5 "2020-08-11T07:49:12Z")

</div>

Hi - if you install GROMACS 2020.3, the fix is included in there.
