The optimizers package#

The optimizers inherit most of their functionality from BuildAMol. Check out the BuildAMol documentation for more information.

The utils module#

This module contains additional utility functions for the optimizers that are Glycosylator specific.

glycosylator.optimizers.utils.make_scaffold_graph(scaffold, only_clashing_glycans: bool = True, slice: int = 0, include_root: bool = False, include_n_ancestors: int = 0) tuple[ResidueGraph, list][source]#

Make a ResidueGraph from a glycosylated scaffold in order to optimize the conformations of the attached glycans.

Parameters:
  • scaffold (Scaffold) – The glycosylated scaffold to optimize

  • only_clashing_glycans (bool) – If True, only glycans that clash with the protein or each other will will contribute rotatable edges.

  • slice (int) – The number of residue connections to slice from each glycan. This will sub-sample the rotatable edges of the glycans. At 0 all rotatable edges are included. Set to -1 to exclude all glycan-internal rotatable edges. This is useful for glycans that are already optimized. And only their placement relative to the scaffold needs to be optimized (i.e. you only want to optimize the root connections).

  • include_root (bool) – If True, the root connection (to the scaffold) will always be included in the rotatable edges.

  • include_n_ancestors (int) – If > 0, the n ancestor atoms (upstream of the scaffold anchor atom) will also be included in the rotatable edges. This will allow for a more versatile placement of glycans as it allows partial movement of the scaffold rather than just the glycan. This requires include_root to be True.

Returns:

  • ResidueGraph – The graph of the glycosylated scaffold

  • list – The rotatable edges of the graph

Module contents#