This project has moved. For the latest updates, please go here.

DSSPParser.parse() using strings as keys for the returned dictionary

Oct 16, 2012 at 2:51 PM

Currently, the parse() method of DSSPParser uses string object for keys. Is there a case where these keys would be something else than the residue positions in the sequence? Otherwise it may be good to have the keys be integers instead...

Coordinator
Oct 16, 2012 at 3:06 PM
Edited Oct 16, 2012 at 3:07 PM

Unfortunately DSSP reads all residues from the ATOM fields in the PDB file. DSSP therefore outputs PDB sequence identifiers (sequence number + insertion code), not numeric SEQRES positions. Recall that PDB residue identifiers are stored in the Residue.id property, which is of type string. More precisely, the "insertion code" part of the ID is a string. Here is the implementation of the Residue.id property:

return str(self._sequence_number) + self._insertion_code
Oct 16, 2012 at 3:09 PM

Right, that explains it.

Thanks!