quickcsa

Performs charge shift analysis (CSA) from TeraChem output. This script sums the atom-wise partial charges for each residue in the QM region (for both holo and apo structures) and then calculates the difference (holo minus apo) for those residues common to both. In advanced CSA for metalloenzymes, some coordinating residues are mutated to alanine in the apo structure, so the reference for apo charge calculation is provided via <pdbname>_apo.pdb. Results are saved as CSV files.

Module Contents

Functions

clean_dir(→ str)

Searches the current directory for required files and organizes them into a

file_mover(→ None)

Checks the current directory for the required files and moves them into the

get_mask_res(→ List)

Reads the residue list file for the specified type (apo or holo) and returns a list

mask_maker(→ None)

Creates the apo or holo mask file from the appropriate reference PDB.

collect_charges(→ None)

Collects and sums the partial charges for each residue from the TeraChem charge file.

get_res_diff(→ List)

Computes the set difference between the residues present in the holo and apo mullres files.

charge_diff(→ None)

Calculates the difference in summed charges (holo minus apo) for residues that are common

quick_csa_intro(→ None)

Introduces the user to Quick CSA and describes the required input files and naming conventions.

quick_csa(→ None)

The central handler for the Quick CSA program. Organizes input files, creates masks using

quickcsa.clean_dir() str

Searches the current directory for required files and organizes them into a three-folder system: 1_input, 2_temp, and 3_out. Prompts the user for the PDB filename.

Returns:

pdb_name – The name of the PDB file (with .pdb extension) as provided by the user.

Return type:

str

quickcsa.file_mover(file_system_exists, pdb_name) None

Checks the current directory for the required files and moves them into the 1_input folder. For the advanced CSA, the apo reference PDB (pdbname_apo.pdb) is also required.

Parameters:
  • file_system_exists (bool) – Indicator if the folder structure already exists.

  • pdb_name (str) – The name of the holo PDB file.

quickcsa.get_mask_res(type) List

Reads the residue list file for the specified type (apo or holo) and returns a list of residue numbers (as strings) that define the QM region.

Parameters:

type (str) – Specifies whether to use the ‘apo’ or ‘holo’ list file.

Returns:

mask_list – List of residue numbers (as strings) included in the QM region.

Return type:

List[str]

quickcsa.mask_maker(mask, pdb_name, type) None

Creates the apo or holo mask file from the appropriate reference PDB. For the holo structure, the reference is pdb_name; for the apo structure, it is pdb_name_apo.pdb. Only the residues specified in the mask (from apo_list/holo_list) are extracted.

Parameters:
  • mask (List[str]) – List of residue numbers (as strings) to be extracted.

  • pdb_name (str) – The name of the holo PDB file.

  • type (str) – Indicates whether the mask is for ‘apo’ or ‘holo’.

quickcsa.collect_charges(type) None

Collects and sums the partial charges for each residue from the TeraChem charge file. It uses the mask file (generated from the correct reference PDB) to map atoms to residues. Also processes link atom charges by adding the link atom charge to the following residue.

Parameters:

type (str) – Specifies whether processing ‘apo’ or ‘holo’ data.

quickcsa.get_res_diff() List

Computes the set difference between the residues present in the holo and apo mullres files. These are residues that are in the holo structure but missing in the apo (e.g. substrate).

Returns:

res_diff – A list of residue labels (from the holo structure) that are present in holo but not apo.

Return type:

List[str]

quickcsa.charge_diff(cutoff) None

Calculates the difference in summed charges (holo minus apo) for residues that are common to both structures, based on the mullres and linkres files. Results are saved as CSV files. The residue name in the output is taken from the holo structure.

Parameters:

cutoff (float) – Minimum absolute charge difference to report in the filtered output.

quickcsa.quick_csa_intro() None

Introduces the user to Quick CSA and describes the required input files and naming conventions.

quickcsa.quick_csa() None

The central handler for the Quick CSA program. Organizes input files, creates masks using the appropriate PDB references, collects charges, computes charge differences, and outputs the results.