functions¶
Auxiliary functions for sampling.
Functions¶
|
Get, for each chain, lists of residues with pLDDT value below the threshold. |
|
Derive the list of residues to keep constrained based on sampling targets. |
|
Change a Pose's FoldTree in order to minimize "lever arm" effects during sampling. |
Module Contents¶
- ensemblify.generation.ensemble_utils.functions.get_targets_from_plddt(parameters)¶
Get, for each chain, lists of residues with pLDDT value below the threshold.
The input structure defined in the parameters dictionary must be an AlphaFold model, i.e. have the pLDDT value for each residue in the .pdb B-Factor column.
- Parameters:
parameters (
dict) – Dictionary following Ensemblify parameters template.- Returns:
Mapping of each chain to the residue numbers contained in it pertaining to sampled residues with pLDDT below the threshold. For example:
{‘A’: [[234,235,236,237],[536,537,538,539]], ‘B’: [[124,125,126,127,128,129]] },
when the contiguous_res parameter is equal to 4 residues.
- Return type:
dict[str,list[int]]
- ensemblify.generation.ensemble_utils.functions.derive_constraint_targets(pose, sampling_targets)¶
Derive the list of residues to keep constrained based on sampling targets.
Given a Pose and the target residue ranges for sampling, mark all non-sampled residues as constraint targets. In the case of a multichain input structure, assumes chains are properly labeled.
- Parameters:
pose (
pyrosetta.rosetta.core.pose.Pose) – Initial Pose object for sampling.sampling_targets (
dict[str,tuple[tuple[str,tuple[int,...],str,str],...]) – Dictionary detailing the target regions for sampling in each chain.
- Returns:
All the residue number pairs representing regions on which to apply constraints.
- Return type:
tuple[tuple[int,int],…]
- ensemblify.generation.ensemble_utils.functions.setup_fold_tree(pose, constraint_targets, contacts)¶
Change a Pose’s FoldTree in order to minimize “lever arm” effects during sampling.
Upate the given Pose’s FoldTree to minimize “lever arm” effects that might result in movement in constrained regions during sampling. The goal is to try to maximmize the amount of constrained residues that are ‘upstream’ in relation to sampled residues.
- Parameters:
pose (
pyrosetta.rosetta.core.pose.Pose) – Pose object whose FoldTree will be updated.constraint_targets (
tuple[tuple[int,int],...]) – Residues between which AtomPairConstraints will be applied.contacts (
tuple[tuple[tuple[str,tuple[int,int]],tuple[str,tuple[int,int]]],...], optional) – Residue ranges where two chains are interacting.
- Reference:
See https://docs.rosettacommons.org/demos/latest/tutorials/fold_tree/fold_tree for more information about the Rosetta FoldTree.