moleculekit.tools.backbone module#
- exception moleculekit.tools.backbone.MissingBackboneError#
Bases:
Exception
- moleculekit.tools.backbone.check_backbone(mol, remove_broken_terminals=True, terminal_min_heavy_atoms=4)#
Checks the backbone of all canonical aminoacids in a Molecule object and adds missing atoms if needed.
If single atoms are missing in the backbone of a residue, they will be reconstructed. If multiple atoms are missing in the backbone of a residue and the residue is at a terminal, the residue will be removed.
- Parameters:
mol (
Molecule) – The molecule to check the backbone ofremove_broken_terminals (
bool) – Whether to remove residues that are at a terminal and have less than terminal_min_heavy_atoms heavy atoms. Default is True.terminal_min_heavy_atoms (
int) – The minimum number of heavy atoms required at a terminal to not be removed.
- Returns:
mol – The molecule with the missing backbone atoms added
- Return type:
:raises MissingBackboneError : If the molecule has missing backbone atoms that cannot be reconstructed: