secondary_structure_residues

visualife.data.secondary_structure_residues(pdb_as_text, residues)

Reads PDB header and extracts residues that belong to secondary structure elements (SSEs)

Parameters:
  • pdb_as_text – (string) PDB data as text; only the HELIX and SHEET lines of the header will be parsed
  • residues – (list[Residue]) list of all residues of a given Structure;

this method assumes they were already created with parse_pdb_data() function :return: a list of secondary structure elements; each element is stored as a two tuple: (code,list[Residue]) where the code is either 'H' or 'E' character. The second element of that tuple is a list of residues that comprise that secondary structure element. The tuples in the returned list are sorted in the order the SSEs appear in the structure