def run(): import sys libtbx.utils.show_times_at_exit() parser = space_group_option_parser() parser.option(None, '--skip_extra_tests', action='store_true', default=False) parser.option(None, '--fixed_random_seed', default=True) command_line = parser.process(sys.argv[1:]) if not command_line.options.skip_extra_tests: # the solution-to-target change-of-basis computed as # reference-to-target x solution-to-reference # is not a mere translation exercise( sgtbx.space_group_info( 'hall: -I 4 2c (1/2*x+1/2*y+1/12,-1/2*x+1/2*y-1/12,z-1/4)'), shifted_origin=(0, 0.4, 0.9), verbose=command_line.options.verbose) exercise(sgtbx.space_group_info('hall: C 2c 2 (x-y,x+y,z)'), shifted_origin=(0.4, 0.9, 0.6), verbose=command_line.options.verbose) # the centring translation search peaks (1/2, 0, 0) which is # a structure seminvariant: test whether this is rejected exercise(sgtbx.space_group_info('hall: -P 2a 2a'), shifted_origin=(0.1, 0.2, 0.6), verbose=command_line.options.verbose) # the traditional loop over a selection of space-groups # the last one, -I 4 2c (1/2*x+1/2*y+1/12,-1/2*x+1/2*y-1/12,z-1/4), # results in solution_to_target_cb_op being non-trivial. command_line.loop_over_space_groups(exercise, shifted_origin=(0.1, 0.2, 0.6))
def run(args): libtbx.utils.show_times_at_exit() parser = space_group_option_parser() parser.option("-x", "--xray_structure_pickle", default=None) parser.option(None, "--fixed_random_seed", default=True) commands = parser.process(args) n_directions = 2 if hasattr(commands.options, "xray_structure_pickle"): from libtbx import easy_pickle xs = easy_pickle.load(commands.options.xray_structure_pickle) t = consistency_test_cases(n_directions, inelastic_scattering=False) t.exercise(xray_structure=xs) else: exercise_trigonometric_ff() t = f_vs_f_sq_test_case(inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = f_vs_f_sq_test_case(inelastic_scattering=True) commands.loop_over_space_groups(t.exercise) t = custom_vs_std_test_case(inelastic_scattering=None) commands.loop_over_space_groups(t.exercise) t = smtbx_against_cctbx_test_case(inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = consistency_test_cases(n_directions, inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = consistency_test_cases(n_directions, inelastic_scattering=True) commands.loop_over_space_groups(t.exercise)
def run(args): libtbx.utils.show_times_at_exit() parser = space_group_option_parser() parser.option('-x', '--xray_structure_pickle', default=None) parser.option(None, '--fixed_random_seed', default=True) commands = parser.process(args) n_directions = 2 if hasattr(commands.options, 'xray_structure_pickle'): from libtbx import easy_pickle xs = easy_pickle.load(commands.options.xray_structure_pickle) t = consistency_test_cases(n_directions, inelastic_scattering=False) t.exercise(xray_structure=xs) else: exercise_trigonometric_ff() t = f_vs_f_sq_test_case(inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = f_vs_f_sq_test_case(inelastic_scattering=True) commands.loop_over_space_groups(t.exercise) t = custom_vs_std_test_case(inelastic_scattering=None) commands.loop_over_space_groups(t.exercise) t = smtbx_against_cctbx_test_case(inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = consistency_test_cases(n_directions, inelastic_scattering=False) commands.loop_over_space_groups(t.exercise) t = consistency_test_cases(n_directions, inelastic_scattering=True) commands.loop_over_space_groups(t.exercise)