def run(): exercise_all_twelve_neighbors() exercise_groel_sampling(verbose=("--Verbose" in sys.argv[1:])) debug_utils.parse_options_loop_space_groups( sys.argv[1:], run_call_back, ("strictly_inside", "all_twelve_neighbors", "write_pdb")) print("OK")
def run(): show_times = libtbx.utils.show_times() debug_utils.parse_options_loop_space_groups(argv=sys.argv[1:], call_back=run_call_back, show_cpu_times=False) xray.structure_factors.global_counters.show() show_times()
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back_1, symbols_to_stdout=True, symbols_to_stderr=False) debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, symbols_to_stdout=True, symbols_to_stderr=False) test_grid_step() print "OK"
def run(args): from scitbx.array_family import flex import random random.seed(0) flex.set_random_seed(0) from cctbx.development import debug_utils debug_utils.parse_options_loop_space_groups(args, run_call_back)
def run(): show_times = libtbx.utils.show_times() debug_utils.parse_options_loop_space_groups(argv=sys.argv[1:], call_back=run_call_back, show_cpu_times=False) exercise_negative_parameters() show_times()
def exercise(): if (mtz is None): print \ "Skipping iotbx/regression/tst_reflection_statistics.py:" \ " ccp4io not available" return debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): exercise_1() exercise_2() exercise_3() exercise_4() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, symbols_to_stdout=True, symbols_to_stderr=False)
def run(): exercise_all_twelve_neighbors() exercise_groel_sampling(verbose=("--Verbose" in sys.argv[1:])) debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, ( "strictly_inside", "all_twelve_neighbors", "write_pdb")) print "OK"
def run(): show_times = libtbx.utils.show_times() debug_utils.parse_options_loop_space_groups( argv=sys.argv[1:], call_back=run_call_back, show_cpu_times=False) xray.structure_factors.global_counters.show() show_times()
def run(): debug_utils.parse_options_loop_space_groups( sys.argv[1:], call_back=exercise, keywords=('include_high_symmetry', 'fix_seed', 'repeats'), symbols_to_stderr=False, n_sampled=50, )
def run(): exercise_symmetry() exercise_correct_rhombohedral_setting_if_necessary() exercise_non_crystallographic_symmetry() exercise_special_position_settings() exercise_select_crystal_symmetry() verify_definitions_in_paper_zwart_2007() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): show_times = libtbx.utils.show_times() debug_utils.parse_options_loop_space_groups( argv=sys.argv[1:], call_back=run_call_back, show_cpu_times=False) exercise_negative_parameters() show_times()
def exercise_charge_flipping(): # exercise_sucrose(flipping_type=charge_flipping.weak_reflection_improved_iterator, # anomalous_flag=False, # d_min=0.7) import sys debug_utils.parse_options_loop_space_groups( sys.argv[1:], exercise, keywords=("repeats", "on", "algo", "fix_seed", "high_symmetry"), symbols_to_stderr=False )
def tst_run_requiring_cns(args, call_back): import libtbx.path if (libtbx.path.full_command_path(command="cns") is None): print("Skipping tests: cns not available.") else: debug_utils.parse_options_loop_space_groups( argv=args, call_back=call_back, show_cpu_times=False) from libtbx.utils import format_cpu_times print(format_cpu_times())
def tst_run_requiring_cns(args, call_back): import libtbx.path if (libtbx.path.full_command_path(command="cns") is None): print "Skipping tests: cns not available." else: debug_utils.parse_options_loop_space_groups( argv=args, call_back=call_back, show_cpu_times=False) from libtbx.utils import format_cpu_times print format_cpu_times()
def run(): exercise_reference_table() for space_group_number in range(1,230+1): asu = reference_table.get_asu(space_group_number) exercise_shape_vertices(asu=asu, unit_cell=None) debug_utils.parse_options_loop_space_groups( sys.argv[1:], run_call_back, show_cpu_times=False) exercise_is_simple_interaction() exercise_non_crystallographic_asu_mappings() print(format_cpu_times())
def run(): exercise_reference_table() for space_group_number in xrange(1,230+1): asu = reference_table.get_asu(space_group_number) exercise_shape_vertices(asu=asu, unit_cell=None) debug_utils.parse_options_loop_space_groups( sys.argv[1:], run_call_back, show_cpu_times=False) exercise_is_simple_interaction() exercise_non_crystallographic_asu_mappings() print format_cpu_times()
def exercise_charge_flipping(): #exercise_sucrose(flipping_type=charge_flipping.weak_reflection_improved_iterator, #anomalous_flag=False, #d_min=0.7) import sys debug_utils.parse_options_loop_space_groups( sys.argv[1:], exercise, keywords=("repeats", 'on', 'algo', 'fix_seed', 'high_symmetry'), symbols_to_stderr=False, )
def run(args): master_phil = libtbx.phil.parse(""" general_positions_only = True .type = bool curvature_rescaling = True .type = bool minimizer = *lbfgs lbfgs_raw lbfgsb .type = choice .optional = False diagco = 0 .type = int lbfgs_impl_switch = 1 .type = int iprint = 1, 0 .type = ints(size=2) curv_filter_lim_eps = 1e-3 .type = float use_max_stp = True .type = bool shake_sites_rmsd = 0.5 .type = float shake_adp_spread = 20 .type = float pickle_root_name = None .type = str unpickle = None .type = path """) argument_interpreter = master_phil.command_line_argument_interpreter() phil_objects = [] remaining_args = [] for arg in args: if (arg.find("=") >= 0): phil_objects.append(argument_interpreter.process(arg=arg)) else: remaining_args.append(arg) work_phil = master_phil.fetch(sources=phil_objects) work_phil.show() print params = work_phil.extract() if (params.unpickle is None): debug_utils.parse_options_loop_space_groups( argv=remaining_args, call_back=run_call_back, params=params) else: structure_ideal, structure_shake = easy_pickle.load( file_name=params.unpickle) run_refinement( structure_ideal=structure_ideal, structure_shake=structure_shake, params=params, run_id=params.unpickle)
def run(args): master_phil = libtbx.phil.parse(""" general_positions_only = True .type = bool curvature_rescaling = True .type = bool minimizer = *lbfgs lbfgs_raw lbfgsb .type = choice .optional = False diagco = 0 .type = int lbfgs_impl_switch = 1 .type = int iprint = 1, 0 .type = ints(size=2) curv_filter_lim_eps = 1e-3 .type = float use_max_stp = True .type = bool shake_sites_rmsd = 0.5 .type = float shake_adp_spread = 20 .type = float pickle_root_name = None .type = str unpickle = None .type = path """) argument_interpreter = master_phil.command_line_argument_interpreter() phil_objects = [] remaining_args = [] for arg in args: if (arg.find("=") >= 0): phil_objects.append(argument_interpreter.process(arg=arg)) else: remaining_args.append(arg) work_phil = master_phil.fetch(sources=phil_objects) work_phil.show() print params = work_phil.extract() if (params.unpickle is None): debug_utils.parse_options_loop_space_groups(argv=remaining_args, call_back=run_call_back, params=params) else: structure_ideal, structure_shake = easy_pickle.load( file_name=params.unpickle) run_refinement(structure_ideal=structure_ideal, structure_shake=structure_shake, params=params, run_id=params.unpickle)
def exercise(): if (mtz is None): print "Skipping iotbx/mtz/tst.py: ccp4io not available" return from cctbx import sgtbx exercise_unmerged(sgtbx.space_group_info("I23")) exercise_wavelength() exercise_extract_delta_anomalous() exercise_repair_ccp4i_import_merged_data() exercise_miller_array_data_types() for anomalous_flag in [False, True]: exercise_hl_ab_only(anomalous_flag=anomalous_flag) exercise_util() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): match_symmetry = emma.euclidean_match_symmetry( space_group_info=sgtbx.space_group_info(symbol="P1"), use_k2l=True, use_l2n=False) out = StringIO() match_symmetry.show(title="test", f=out) assert not show_diff(out.getvalue(), """\ euclidean_match_symmetry: test P -1 ((1, 0, 0), (0, 1, 0), (0, 0, 1)) """) # debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, ( "StaticModels",))
def exercise(): if mtz is None: print "Skipping iotbx/mtz/tst.py: ccp4io not available" return from cctbx import sgtbx exercise_unmerged(sgtbx.space_group_info("I23")) exercise_wavelength() exercise_extract_delta_anomalous() exercise_repair_ccp4i_import_merged_data() exercise_miller_array_data_types() for anomalous_flag in [False, True]: exercise_hl_ab_only(anomalous_flag=anomalous_flag) exercise_util() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(args): master_phil = dev.get_master_phil() argument_interpreter = master_phil.command_line_argument_interpreter() phil_objects = [] remaining_args = [] for arg in args: if (arg.find("=") >= 0): phil_objects.append(argument_interpreter.process(arg=arg)) else: remaining_args.append(arg) work_phil = master_phil.fetch(sources=phil_objects) work_phil.show() print() params = work_phil.extract() debug_utils.parse_options_loop_space_groups( argv=remaining_args, call_back=run_call_back, params=params)
def run(args): master_phil = dev.get_master_phil() argument_interpreter = master_phil.command_line_argument_interpreter() phil_objects = [] remaining_args = [] for arg in args: if (arg.find("=") >= 0): phil_objects.append(argument_interpreter.process(arg=arg)) else: remaining_args.append(arg) work_phil = master_phil.fetch(sources=phil_objects) work_phil.show() print params = work_phil.extract() debug_utils.parse_options_loop_space_groups( argv=remaining_args, call_back=run_call_back, params=params)
def run(): cmd_args = ['--F', '--F_sq', '--debugging'] extra = [] args = [] for arg in sys.argv[1:]: if arg in cmd_args: extra.append(arg[2:]) else: args.append(arg) extra = tuple(extra) debug = () if 'debugging' in extra: extra = () if 0: extra += ('F_sq',) assert not('F' in extra and 'F_sq' in extra) if 'F' in extra: print 'Refinement against F' if 'F_sq' in extra: print 'Refinement against F^2' debug_utils.parse_options_loop_space_groups( args, run_call_back, keywords=extra+debug)
def run(): cmd_args = ['--F', '--F_sq', '--debugging'] extra = [] args = [] for arg in sys.argv[1:]: if arg in cmd_args: extra.append(arg[2:]) else: args.append(arg) extra = tuple(extra) debug = () if 'debugging' in extra: extra = () if 0: extra += ('F_sq',) assert not('F' in extra and 'F_sq' in extra) if 'F' in extra: print('Refinement against F') if 'F_sq' in extra: print('Refinement against F^2') debug_utils.parse_options_loop_space_groups( args, run_call_back, keywords=extra+debug)
def run(args): if (libtbx.path.full_command_path(command="shelxl") is None): print "shelxl not available." return debug_utils.parse_options_loop_space_groups(args, run_call_back)
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, ("Frac", "Cart"))
def run(): import sys debug_utils.parse_options_loop_space_groups(sys.argv[1:], exercise)
def run(): exercise_sys_absent_intensity_distribution() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) print("OK")
def run(): structure = exercise_with_fixed_structure() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], exercise_all_wyckoff)
def run(): debug_utils.parse_options_loop_space_groups( argv=sys.argv[1:], call_back=run_call_back, keywords=("quick",), symbols_to_stdout=True, symbols_to_stderr=False)
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) if (0): print "len(cond_dict):", len(cond_dict) for k in cond_dict.keys(): print k
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) print "OK"
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, ( "HighSymmetry", "Atom", "Molecule", "Shift"))
def run(args): debug_utils.parse_options_loop_space_groups(args, run_call_back, ( "chunk", "isotropic", "anisotropic", "tag"))
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): exercise_constraint_matrix() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back)
def run(): exercise_sys_absent_intensity_distribution() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) print "OK"
def run(): debug_utils.parse_options_loop_space_groups(argv=sys.argv[1:], call_back=run_call_back, keywords=("quick", ), symbols_to_stdout=True, symbols_to_stderr=False)
def run(): debug_utils.parse_options_loop_space_groups( sys.argv[1:], run_call_back, keywords=("fix_random_seeds",), )
def run(args): exercise( space_group_info=sgtbx.space_group_info(symbol="P222"), redundancy_counter=1) debug_utils.parse_options_loop_space_groups(args, run_call_back)
def run(): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) exercise_overloads()
def run(args): debug_utils.parse_options_loop_space_groups(args, run_call_back, ("isotropic", "anisotropic"))
mo3 = mmtbx.masks.mask_from_xray_structure( xray_structure=xrs, p1=True, solvent_radius=1, shrink_truncation_radius=1, for_structure_factors=True, n_real=n_real) f_mask_3 = dummy_set.structure_factors_from_map(map=mo3.mask_data, use_scale = True, anomalous_flag = False, use_sg = False) # Note use_sg = False ! # assert approx_equal(f_mask_1.data(), f_mask_2.data()) assert approx_equal(f_mask_1.data(), f_mask_3.data()) def run_call_back(flags, space_group_info): exercise_mask_data_1(space_group_info) exercise_mask_data_2(space_group_info) exercise_mask_data_3(space_group_info) if (__name__ == "__main__"): debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back, symbols_to_stdout=True, symbols_to_stderr=False) try: run() except Exception : log = cout.getvalue() if len(log) != 0: print "<<<<<<<< Start Log:" print cout.getvalue() print ">>>>>>>> End Log" raise
def run(): exercise_incompatible_flags_replacement() exercise_split_unmerged() debug_utils.parse_options_loop_space_groups(sys.argv[1:], run_call_back) print "OK"