@@ -25,7 +25,6 @@ def run(self):
2525 )
2626
2727 slurm_task_id = os .environ .get ("SLURM_ARRAY_TASK_ID" )
28- # self.log.info((f"SLURM_ARRAY_TASK_ID: {slurm_task_id}"))
2928 params = self .recwrap .recipe_step ["job_parameters" ]
3029
3130 PANDDA_2_DIR = "/dls_sw/i04-1/software/PanDDA2"
@@ -37,7 +36,6 @@ def run(self):
3736 Path (auto_panddas_dir ).mkdir (exist_ok = True )
3837
3938 n_datasets = int (params .get ("n_datasets" ))
40- self .log .info (f"N_datasets: { n_datasets } " )
4139 if n_datasets > 1 :
4240 with open (model_dir / ".batch.json" , "r" ) as f :
4341 datasets = json .load (f )
@@ -104,7 +102,7 @@ def run(self):
104102 self .log .info (f"Restraints generated succesfully for dtag { dtag } " )
105103
106104 pandda2_command = f"source /dls_sw/i04-1/software/PanDDA2/venv/bin/activate; \
107- python -u /dls_sw/i04-1/software/PanDDA2/scripts/process_dataset.py --data_dirs={ model_dir } --out_dir={ auto_panddas_dir } --dtag={ dtag } --use_ligand_data=False"
105+ python -u /dls_sw/i04-1/software/PanDDA2/scripts/process_dataset.py --data_dirs={ model_dir } --out_dir={ auto_panddas_dir } --dtag={ dtag } --use_ligand_data=False --local_cpus=1 "
108106
109107 try :
110108 result = subprocess .run (
@@ -143,7 +141,6 @@ def run(self):
143141 # self.log.info(f"Could not update sqlite database for dataset {dtag}: {e}")
144142
145143 # -------------------------------------------------------
146- dataset_pdir = auto_panddas_dir / "processed_datasets" / dtag
147144 modelled_dir = dataset_pdir / "modelled_structures"
148145 out_dir = modelled_dir / "rhofit"
149146 out_dir .mkdir (parents = True , exist_ok = True )
@@ -242,12 +239,9 @@ def run(self):
242239
243240 protein_st .write_pdb (str (output_file ))
244241
245- try :
246- shutil .copy (
247- f"{ modelled_dir } /{ dtag } -pandda-model.pdb, { modelled_dir } /pandda-internal-fitted.pdb"
248- )
249- except Exception as e :
250- self .log .debug (f"{ e } " )
242+ pandda_model = {modelled_dir } / f"{ dtag } -pandda-model.pdb"
243+ if pandda_model .exists ():
244+ shutil .copy (pandda_model , modelled_dir / "pandda-internal-fitted.pdb" )
251245
252246 self .log .info ("Auto PanDDA2 pipeline finished successfully" )
253247 return True
0 commit comments