Skip to content

Commit

Permalink
Make binding site cropping script more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Aug 12, 2024
1 parent 2e3394d commit 321684d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion configs/data/binding_site_crop_preparation.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dataset: posebusters_benchmark # the dataset to use - NOTE: must be one of (`posebusters_benchmark`, `astex_diverse`)
input_data_dir: ${oc.env:PROJECT_ROOT}/data/${dataset}_set # the input protein-ligand complex directory to recursively parse
input_protein_structure_dir: ${oc.env:PROJECT_ROOT}/data/${dataset}_set/${dataset}_holo_aligned_esmfold_structures # the input protein structure directory to parse
input_protein_structure_dir: ${oc.env:PROJECT_ROOT}/data/${dataset}_set/${dataset}_holo_aligned_predicted_structures # the input protein structure directory to parse
protein_ligand_distance_threshold: 4.0 # the heavy-atom distance threshold (in Angstrom) to use for finding protein binding site residues in interaction with ligand heavy atoms
num_buffer_residues: 7 # the number of sequence-regional buffer residues to include around the native binding site residues
4 changes: 2 additions & 2 deletions posebench/data/binding_site_crop_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def save_cropped_protein_binding_site(
for _, pdb_id in tqdm(smiles_and_pdb_id_list, desc="Cropping protein binding sites"):
pred_protein_filepath = os.path.join(
input_protein_structure_dir,
f"{pdb_id}_holo_aligned_esmfold_protein.pdb",
f"{pdb_id}_holo_aligned_predicted_protein.pdb",
)
ref_protein_filepath = os.path.join(input_data_dir, pdb_id, f"{pdb_id}_protein.pdb")
ref_ligand_filepath = os.path.join(input_data_dir, pdb_id, f"{pdb_id}_ligand.sdf")
Expand All @@ -214,7 +214,7 @@ def save_cropped_protein_binding_site(
binding_site_residue_indices,
output_protein_structure_dir,
pdb_id,
filename_midfix="_holo_aligned_esmfold",
filename_midfix="_holo_aligned_predicted",
)
crop_protein_binding_site(
ref_protein_filepath,
Expand Down

0 comments on commit 321684d

Please sign in to comment.