Skip to content

Dssp ValueError: could not broadcast input array from shape (71,) into shape (70,) #621

Answered by padix-key
intomybioverse asked this question in Q&A
Discussion options

You must be logged in to vote

Sorry for the later answer, I was a few days on vacation. The problem is atom naming: The trajectory from the example gallery was created with GROMACS, whose atom naming sometimes deviate from the standard PDB nomenclature. Specifically, the C-terminal O and OXT are named O1 and O2. However without the O DSSP does not recognize the terminal residue as amino acid, and skips it. Hence, the array with the secondary structure elements has one element less in the example:

# DSSP does not assign an SSE to the last residue -> -1
sse = np.empty((traj.shape[0], struc.get_residue_count(traj)-1), dtype='U1')

However, in your template the atoms are named correctly. Hence DSSP returns has the correct

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@intomybioverse
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by padix-key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants