poli.core.util.proteins.foldx.FoldxInterface#
- class poli.core.util.proteins.foldx.FoldxInterface(working_dir: Union[Path, str], verbose: bool = False)#
A class for interacting with FoldX, a protein engineering software.
- Parameters
working_dir (Union[Path, str]) – The working directory where FoldX files and output will be stored.
- repair(pdb_file, remove_and_rename=False, pH=7.0, remove_heteroatoms=True)#
Repairs a PDB file with FoldX, overwriting the original file if remove_and_rename is True.
- _repair_if_necessary_and_provide_path(pdb_file)#
Repairs a PDB file if necessary and returns the path of the repaired PDB.
- _simulate_mutations(pdb_file, mutations=None)#
Simulates mutations on a PDB file with FoldX.
- _read_energy(pdb_file)#
Reads the energy from a FoldX results file.
- _compute_sasa(pdb_file)#
Computes the SASA (solvent-accessible surface area) from a FoldX results file.
- compute_stability(pdb_file, mutations=None)#
Computes the stability of a protein structure using FoldX.
- compute_sasa(pdb_file, mutations=None)#
Computes the SASA (solvent-accessible surface area) of a protein structure using FoldX.
- compute_stability_and_sasa(pdb_file, mutations=None)#
Computes the stability and SASA (solvent-accessible surface area) of a protein structure using FoldX in a single run.
- copy_foldx_files(pdb_file)#
Copies the necessary FoldX files to the working directory.
- write_mutations_to_file(wildtype_resiudes, mutations, output_dir)#
Writes the list of mutations to a file in the given directory.
- working_dir#
The working directory for FoldX.
- Type
Union[Path, str]
- verbose#
If True, the FoldX output will be printed to stdout.
- Type
bool
Notes
This class expects you to use the binary for FoldX v.5. Previous versions relied on a “rotabase.txt” file, which is no longer used.
- __init__(working_dir: Union[Path, str], verbose: bool = False)#
Initialize the FoldX object.
- Parameters
working_dir (Union[Path, str]) – The working directory for FoldX.
verbose (bool, optional) – If True, the FoldX output will be printed to stdout. Default is False.
Methods
__init__
(working_dir[, verbose])Initialize the FoldX object.
compute_sasa
(pdb_file[, mutations])Compute the solvent-accessible surface area (SASA) score for a given protein structure.
compute_stability
(pdb_file[, mutations])Compute the stability of a protein structure using FoldX.
compute_stability_and_sasa
(pdb_file[, mutations])Computes stability and sasa with a single foldx run, instead of two separate runs.
copy_foldx_files
(pdb_file)Copies the pdb file to the working directory.
repair
(pdb_file[, remove_and_rename, pH, ...])Repairs a PDB file with FoldX, overwriting the original file if remove_and_rename is True (default: False).
write_mutations_to_file
(wildtype_resiudes, ...)Writes the list of mutations to a file in the given directory.