moleculekit.tools.backbone module#
- moleculekit.tools.backbone.check_backbone(mol: Molecule, remove_broken_terminals: bool = True, terminal_min_heavy_atoms: int = 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 (moleculekit.molecule.Molecule) – The molecule to check the backbone of
remove_broken_terminals (bool, optional) – 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, optional) – 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: