Chain¶
This class stores arrays of residues/molecules. Thus, a Chain
instance has residues and atoms attributes.
API Reference¶
-
class
pmx.chain.Chain(seq=None, **kwargs)¶ Chain Class.
- Parameters
seq (str, optional) – amino acid sequence. If Chain is initialised with a sequence, a peptide is built. By default seq=None.
-
residues¶ list of residues in Chain
- Type
list
-
nres¶ number of residues in Chain
- Type
int
-
atoms¶ list of atoms in Chain
- Type
list
-
natoms¶ number of atoms in Chain
- Type
int
-
id¶ atom id
- Type
int
Methods
set_chain_id(chain_id)Sets the chain ID.
get_sequence()Returns the sequence of residues in FASTA format.
append(mol[, newResNum])Appends a residue to the Chain.
insert_residue(pos, mol[, newResNum])Inserts a residue at a specified position.
remove_residue(residue[, renumber_atoms, …])Removes a residue.
replace_residue(residue, new[, bKeepResNum])Replaces a residue.
nbuild(resn[, phi, psi])Extend Chain at N-terminus.
cbuild(resn[, next_phi, psi])Extend Chain at C-terminus.
add_nterm_cap()Adds N-terminal cap (ACE).
add_cterm_cap()Adds C-terminal cap (NME).
fetch_residues(key[, inv])Fetch residues by residue names.
rename_atoms_to_gmx()Renames atoms to comply with Gromacs syntax.