Skip to main content

Parameters

residues
List[Residue]
required
List of Residue objects

Methods

chain_ID

ID of the monomer chain.

mutability

List of mutability of each Residue in Chain.

sequence

String (one-letter) representation of amino acids in Chain.

mutable_residues

List of mutable Residues in Chain

mutable_residue_indexes

List of the indexes of mutable Residues in Chain

length

Number of amino acids in Chain.

from_pdb

Create Chain object from a PDB file string. Residue indices are 0-indexed. Parameters
file_path
str
required
chain_id
str
required

from_cif

Create Chain object from a CIF file string. Parameters
cif_data
str
required

remove_residue

Remove the Residue at the given index (0-indexed). Parameters
index
int
required

add_residue

Add a Residue of type amino_acid at the position specified by index (0-indexed). Parameters
amino_acid
str
required
index
int
required

mutate_residue

Change identity of Residue at position specified by index to ‘amino_acid’ Parameters
index
int
required
amino_acid
str
required

Example

import bagel as bg

residues = [
    bg.Residue(name='A', chain_ID='A', index=0, mutable=True),
    bg.Residue(name='G', chain_ID='A', index=1, mutable=True),
]
chain = bg.Chain(residues=residues)
chain.mutate_residue(index=1, amino_acid='V')