File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -272,7 +272,8 @@ def trigger_pandda_xchem(
272272 .filter (BLSample .name == dtag )
273273 )
274274
275- user_sg = gemmi .find_spacegroup_by_name (query .one ()[0 ]).hm
275+ if query .one ()[0 ]:
276+ user_sg = gemmi .find_spacegroup_by_name (query .one ()[0 ]).hm
276277
277278 # Find corresponding XChem visit directory and database
278279 xchem_dir = pathlib .Path (f"/dls/labxchem/data/{ proposal_string } " )
@@ -535,11 +536,13 @@ def trigger_pandda_xchem(
535536 )
536537
537538 df = pd .read_sql (query .statement , query .session .bind )
538- df_filteredbysg = df [df ["spaceGroup" ] == user_sg ]
539539
540540 # use datasets processed in user spacegroup if possible
541- if not df_filteredbysg .empty :
542- df = df_filteredbysg
541+ if "user_sg" in locals ():
542+ df_filteredbysg = df [df ["spaceGroup" ] == user_sg ]
543+
544+ if not df_filteredbysg .empty :
545+ df = df_filteredbysg
543546
544547 # rank datasets by I/sigI*completeness*# unique reflections
545548 df ["heuristic" ] = (
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ def run(self):
219219 )
220220
221221 cifs = list (ligand_dir .glob ("*.cif" ))
222- cut = self .map_sigma (restricted_build_dmap , sigma = 1 )
222+ cut = self .map_sigma (restricted_build_dmap )
223223
224224 rhofit_log = dataset_pdir / "rhofit.log"
225225 attachments .extend ([event_map , z_map , rhofit_log ])
@@ -360,7 +360,7 @@ def read_pandda_map(self, xmap_file):
360360 dmap = dmap_ccp4 .grid
361361 return dmap
362362
363- def map_sigma (self , xmap , sigma ):
363+ def map_sigma (self , xmap , sigma = 1 ):
364364 ccp4 = gemmi .read_ccp4_map (str (xmap ))
365365 ccp4 .setup (0.0 )
366366 grid = ccp4 .grid
You can’t perform that action at this time.
0 commit comments