From f059bb82b690aec89bbe89203ee6734b09ae5aed Mon Sep 17 00:00:00 2001 From: Cameron Hyde Date: Thu, 31 Oct 2024 07:45:35 +1000 Subject: [PATCH] Fix AF outputs.py _sniff_model_preset --- tools/alphafold/scripts/outputs.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/alphafold/scripts/outputs.py b/tools/alphafold/scripts/outputs.py index ec25f5ad..c1de913a 100644 --- a/tools/alphafold/scripts/outputs.py +++ b/tools/alphafold/scripts/outputs.py @@ -113,12 +113,13 @@ def parse(self) -> None: def _sniff_model_preset(self) -> bool: """Check if the run was multimer or monomer.""" - with open(self.workdir / 'relax_metrics.json') as f: - if '_multimer_' in f.read(): - return PRESETS.multimer - if '_ptm_' in f.read(): - return PRESETS.monomer_ptm - return PRESETS.monomer + for path in self.workdir.glob('*.pkl'): + if 'feature' not in path.name: + if '_multimer_' in path.name: + return PRESETS.multimer + if '_ptm_' in path.name: + return PRESETS.monomer_ptm + return PRESETS.monomer class ExecutionContext: