def check_contaminants_if_bad(wf, mtz): ref_job = wf.get_final_refinement_job() if not ref_job or ref_job.data.get('free_r', 1) > GOOD_FINAL_RFREE: mtz_meta = wf.read_mtz_metadata(mtz) # it's cached info = contaminants.get_info(mtz_meta) if info: comment('\n' + info)
def special_mtz_mode(args): print('Usage: %s' % USAGE_SHORT) check_ccp4_envvars() wf = workflow.Workflow('') wf.enable_logs = False try: mtz_meta = wf.read_mtz_metadata(args[0]) print('Basic MTZ file info:') print(mtz_meta.info()) contam_info = contaminants.get_info(mtz_meta) if contam_info: print(contam_info) except (IOError, RuntimeError) as e: put_error(e)
def special_mtz_mode(args): print 'Usage: %s' % USAGE_SHORT check_ccp4_envvars() wf = workflow.Workflow('') wf.enable_logs = False try: mtz_meta = wf.read_mtz_metadata(args[0]) print 'Basic MTZ file info:' print mtz_meta.info() contam_info = contaminants.get_info(mtz_meta) if contam_info: print contam_info except (IOError, RuntimeError) as e: put_error(e)