haddock.modules.analysis.alascan.scan module

alascan module.

class haddock.modules.analysis.alascan.scan.AddDeltaBFactor(model: PDBFile, path: Path, model_results: List[MutationResult])[source]

Bases: AddDeltaBFactor

Add alascan delta score in the b-factor column of a PDB.

module_name: str = 'alascan'

filename suffix / module identifier; overridden by subclasses

class haddock.modules.analysis.alascan.scan.ClusterOutputer(cluster_scan_data: Dict[str, Dict[str, float | int]], clt_id: str, clt_population: int, scan_residue: str | None = None, generate_plot: bool = False, offline: bool = False, splitplot: bool = False)[source]

Bases: ClusterOutputer

Manage the generation of alascan outputs for cluster-based analysis.

default_scan_residue: str = 'ALA'
module_name: str = 'alascan'
sort_columns = ['chain', 'resid']
zscore_reference: str = 'residues'
class haddock.modules.analysis.alascan.scan.InterfaceScanner(model: str | Path | Any, mutation_res: str = 'ALA', params: Dict[str, Any] | None = None)[source]

Bases: object

Scan interface of a model to get tartget residues and create corresponding mutation jobs.

run()[source]

Get interface residues and create the mutation jobs for this model.

The jobs are returned (not executed): the caller hands them to a haddock Engine so that all mutations are scheduled together.

Returns:

List[ModelPointMutation] – The mutation jobs to perform for this model.

class haddock.modules.analysis.alascan.scan.ModelPointMutation(model_path: Path, model_id: str, chain: str, resid: int, ori_resname: str, target_resname: str, native_scores: Tuple[float, float, float, float, float], output_mutants: bool = False, ligand_param_fname: Path | str = '', ligand_top_fname: Path | str = '')[source]

Bases: object

Executes a single point mutation.

run()[source]

Execute the point mutation.

haddock.modules.analysis.alascan.scan.group_scan_by_cluster(models, results_by_model)[source]

Group alascan data per cluster, keyed by residue.

haddock.modules.analysis.alascan.scan.mutate(pdb_f, target_chain, target_resid, mut_resname)[source]

Mutate a residue in a PDB file into a different residue.

Parameters:
  • pdb_f (str) – Path to the pdb file.

  • target_chain (str) – Chain of the residue to be mutated.

  • target_resid (int) – Residue number of the residue to be mutated.

  • mut_resname (str) – Residue name of the residue to be mutated.

Returns:

mut_pdb_fname (str) – Path to the mutated pdb file.

haddock.modules.analysis.alascan.scan.write_scan_out(results, model_id)[source]

Save alascan mutation results for one model to a tsv file.