Skip to content

Commit f598865

Browse files
committed
Fix complex alignment for Chai-1
1 parent ac8b5c3 commit f598865

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -740,7 +740,7 @@ python3 posebench/models/ensemble_generation.py ensemble_methods=\[chai-lab\] in
740740
# NOTE: the suffixes for both `output_dir` and `ensemble_benchmarking_repeat_index` should be modified to e.g., 2, 3, ...
741741
...
742742
# now score the CASP15-compliant submissions using the official CASP scoring pipeline
743-
python3 posebench/analysis/inference_analysis_casp.py method=chai-lab dataset=casp15 repeat_index=1
743+
python3 posebench/analysis/inference_analysis_casp.py method=chai-lab dataset=casp15 repeat_index=1 targets='[H1135, T1127v2, T1146, T1152, T1158v1, T1158v2, T1158v3, T1158v4, T1186, T1187, T1188]'
744744
...
745745
```
746746

posebench/analysis/complex_alignment.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,11 @@ def main(cfg: DictConfig):
411411
output_protein_files = sorted(
412412
[
413413
item
414-
for item in output_dir.rglob("*protein.pdb")
415-
if any(
414+
for item in output_dir.rglob(
415+
f"pred.model_idx_{cfg.rank_to_align - 1}_protein*.pdb"
416+
)
417+
if "_aligned" not in item.stem
418+
and any(
416419
[item.parent.stem in file.parent.stem for file in output_ligand_files]
417420
)
418421
]
@@ -426,7 +429,9 @@ def main(cfg: DictConfig):
426429
), f"Numbers of protein ({len(output_protein_files)}) and ligand ({len(output_ligand_files)}) files do not match."
427430

428431
# align protein-ligand complexes
429-
for protein_file, ligand_file in tqdm(zip(output_protein_files, output_ligand_files)):
432+
for protein_file, ligand_file in tqdm(
433+
zip(output_protein_files, output_ligand_files), desc="Aligning complexes"
434+
):
430435
protein_id, ligand_id = protein_file.stem, ligand_file.stem
431436
if protein_id != ligand_id and cfg.method == "dynamicbind":
432437
protein_id, ligand_id = (

scripts/build_inference_script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
"python3 posebench/models/ensemble_generation.py ensemble_methods=[chai-lab] ensemble_ranking_method={ensemble_ranking_method} input_csv_filepath=data/test_cases/casp15/ensemble_inputs.csv output_dir=data/test_cases/casp15/top_chai-lab_ensemble_predictions_{repeat_index} skip_existing=true relax_method_ligands_post_ranking=true relax_protein={relax_protein} export_file_format=casp15 export_top_n=5 combine_casp_output_files=true max_method_predictions=40 method_top_n_to_select=5 resume=true ensemble_benchmarking=true ensemble_benchmarking_dataset=casp15 cuda_device_index={cuda_device_index} ensemble_benchmarking_repeat_index={repeat_index}",
157157
],
158158
"analyze_casp15": [
159-
"python3 posebench/analysis/inference_analysis_casp.py method=chai-lab dataset=casp15 repeat_index={repeat_index} relax_protein={relax_protein}",
159+
"python3 posebench/analysis/inference_analysis_casp.py method=chai-lab dataset=casp15 repeat_index={repeat_index} relax_protein={relax_protein} targets='[H1135, T1127v2, T1146, T1152, T1158v1, T1158v2, T1158v3, T1158v4, T1186, T1187, T1188]'",
160160
],
161161
},
162162
"vina": {

0 commit comments

Comments
 (0)