Skip to content

Commit

Permalink
Make sure PDB chain id is only a single character.
Browse files Browse the repository at this point in the history
Some structures can have multi-character chain identifiers (see 6Z4H).
Really Bad Things happen when trying to write these out.
  • Loading branch information
dkoes committed Oct 4, 2023
1 parent 2d7e5c4 commit 1715077
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prody/proteins/pdbfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,7 @@ def writePDBStream(stream, atoms, csets=None, **kwargs):

write(pdbline % (hetero[i], serial,
atomnames[i], altlocs[i],
resname, chainids[i], resnum,
resname, chainids[i][0], resnum,
icodes[i],
xyz[0], xyz[1], xyz[2],
occupancies[i], bfactors[i],
Expand Down

0 comments on commit 1715077

Please sign in to comment.