schrodinger.protein.seqres module¶
Functions for getting and setting SEQRES data on a structure.
- schrodinger.protein.seqres.get_seqres(st)¶
Read in all SEQRES data from the structure.
- Parameters:
st (Structure) – The structure to read SEQRES data from
- Returns:
A dictionary of {chain name: list of residue names} (ordered identically to the SEQRES data in the
Structure) or None if there’s no SEQRES information present in the structure. Note that the lists of residue names uses a OneIndexedList since the i_pdb_seqres_index residue property values assume a starting index of one.- Return type:
dict(str, OneIndexedList[str]) or NoneType NOTE: Residue names in output lists will have whitespace stripped.
- schrodinger.protein.seqres.set_seqres(st, seqres)¶
Add SEQRES data to a structure. Any SEQRES data that was previously present in the structure will be overwritten.
- Parameters:
st (Structure) – The structure to add SEQRES data to.
seqres (dict(str, list[str]) or None) – A dictionary of {chain name: list of residue names}. May be None or an empty dictionary to clear SEQRES data. Each residue name must be either 3-characters or 4-characters long.
- schrodinger.protein.seqres.unset_seqres(st)¶
Remove SEQRES data from a structure. :param st: The structure to remove SEQRES data from. :type st: schrodinger.structure.Structure
- schrodinger.protein.seqres.has_seqres(st)¶
Determine if a structure contains SEQRES data.
- Parameters:
st (Structure) – The structure to read SEQRES data from.
- Returns:
Whether the structure contains SEQRES data.
- Return type:
bool
- schrodinger.protein.seqres.align_coord_seq_to_seqres(st: Structure)¶
Map structure to its SEQRES sequence.
Annotates each residue of every chain with the corresponding 1-index (to match the indexing of OneIndexedList) in the SEQRES block. Since SEQRES blocks are assigned per-chain, it is left to the user of this method to be careful about accessing the right chain.
Annotation is done through a pairwise sequence alignment.
Note that this is fragile given that the SEQRES and the structure can be modified separately and are not kept in sync.