From 9e1ff60fa026465b57fd308738a81185e7e951da Mon Sep 17 00:00:00 2001 From: Alex Morehead Date: Sat, 1 Jun 2024 21:26:52 -0500 Subject: [PATCH] Handle for missing relaxed NeuralPLexer structures n some dataset contexts --- src/analysis/complex_alignment.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/analysis/complex_alignment.py b/src/analysis/complex_alignment.py index b705a4db..46ae728e 100644 --- a/src/analysis/complex_alignment.py +++ b/src/analysis/complex_alignment.py @@ -370,7 +370,18 @@ def main(cfg: DictConfig): raise ValueError(f"Invalid method: {cfg.method}") if len(output_ligand_files) < len(output_protein_files): - if cfg.method == "rfaa": + if cfg.method == "neuralplexer": + output_protein_files = sorted( + [ + file + for file in list(output_dir.rglob(f"prot_rank{cfg.rank_to_align}_*.pdb")) + if "_aligned" not in file.stem + and any( + [file.parent.stem in item.parent.stem for item in output_ligand_files] + ) + ] + ) + elif cfg.method == "rfaa": output_protein_files = sorted( [ item