This is an abstract base class. Instances can be created using one of
the subclasses (PeptideChain, NucleotideChain).
Chain objects respond to len() and return their residues by indexing
with integers.
|
AminoAcidResidue or NucleotideResidue
|
__getitem__(self,
index)
Returns
the residue corresponding to the index
|
|
PeptideChain or NucleotideChain
|
__getslice__(self,
i1,
i2)
Returns
the subchain from i1 to i2
|
|
|
__init__(self,
residues=None,
chain_id=None,
segment_id=None)
|
int
|
__len__(self)
Returns
the number of residues in the chain
|
|
|
addResidue(self,
residue)
Add a residue at the end of the chain
|
|
|
deleteHydrogens(self)
Remove all hydrogen atoms in the chain
|
|
|
removeResidues(self,
first,
last)
Remove residues in a given index range.
|
list of str
|
sequence(self)
Returns
the list of residue names
|
|
|
writeToFile(self,
file)
Write the chain to a file
|