This PR makes several improvements to SidechainNet. This includes additional information for the dataset as well as improved handling of modified residues and PDB file generation.
Summary of changes
Add the following entries to the SidechainNet datasets:
mod
Contains a 1 or 0 for every residue in a protein, with 1 marking residues that have been slightly modified during SidechainNet's construction. For example, Selenomethionine is a modified residue. Rather than excluding it from SidechainNet, we "standardize" it by regenerating its coordinates from its angles as if the residue was a Methionine. This ensures that bond lengths and angles are consistent, even though the real residue may not exactly match the residue we are replacing it with. This procedure is currently implemented using the amino acid reassignments specified in ALLOWED_NONSTD_RESIDUES (see below).
This data feature is also accessible when using SidechainNet's custom PyTorch dataloaders and the Batch namedtuple objects that they yield during training. For clarity, the data is accessible via the is_modified attribute (i.e. batch.is_modified, which returns a batch-padded tensor with each entry being the corresponding mod vector from the dataset).
ums(stands for UnModified Sequence)
A string representing each protein's unmodified sequence. This is similar to the seq entry, but ums may contain amino acids that are not allowed in SidechainNet. Because there are potentially many different amino acids in this field, we must represent the sequence as a series of 3-letter amino acid codes separated by spaces, instead of the 1-letter codes used in seq.
StructureBuilder.to_pdb() (and it's underlying datastructure, PdbBuilder) will now also generate SEQRES records for each constructed PDB file. This allows PDB file visualization programs like PyMol to be aware of where missing residues are located. Note that this still only supports the length-20 standard amino acid vocabulary used by SidechainNet.
Description
This PR makes several improvements to SidechainNet. This includes additional information for the dataset as well as improved handling of modified residues and PDB file generation.
Summary of changes
mod
ALLOWED_NONSTD_RESIDUES
(see below).Batch
namedtuple objects that they yield during training. For clarity, the data is accessible via theis_modified
attribute (i.e.batch.is_modified
, which returns a batch-padded tensor with each entry being the correspondingmod
vector from the dataset).ums
(stands for UnModified Sequence)seq
entry, butums
may contain amino acids that are not allowed in SidechainNet. Because there are potentially many different amino acids in this field, we must represent the sequence as a series of 3-letter amino acid codes separated by spaces, instead of the 1-letter codes used inseq
.StructureBuilder.to_pdb()
(and it's underlying datastructure,PdbBuilder
) will now also generateSEQRES
records for each constructed PDB file. This allows PDB file visualization programs like PyMol to be aware of where missing residues are located. Note that this still only supports the length-20 standard amino acid vocabulary used by SidechainNet.StructureBuilder.to_pdbstr()
.batch.ress
tobatch.resolutions
.Status