Пример #1
0
def parse_options_loop_space_groups(
      argv,
      call_back,
      keywords=(),
      symbols_to_stdout=True,
      symbols_to_stderr=False,
      show_cpu_times=True,
      **kwds):
  flags = parse_options(
    argv=argv,
    keywords=(
      "Verbose",
      "Debug",
      "Threads",
      "ChunkSize",
      "ChunkMember",
      "RandomSeed",
      "AllSpaceGroups",
      "ChiralSpaceGroups",
      "AllSettings",
      "UnusualSettings") + keywords,
    case_sensitive=False)
  return loop_space_groups(
    argv, flags, call_back, symbols_to_stdout, symbols_to_stderr,
    show_cpu_times, **kwds)
Пример #2
0
def run():
  show_times = libtbx.utils.show_times()
  from scitbx.python_utils import command_line
  flags = command_line.parse_options(sys.argv[1:], [
    "RandomSeed",
    "Verbose",
  ])
  if (not flags.RandomSeed): random.seed(0)
  assert fftpack.adjust_gridding(13, 5) == 15
  assert fftpack.adjust_gridding(13, 5, 6) == 18
  assert fftpack.adjust_gridding_triple((13,22,34), 5) == (15,24,36)
  assert fftpack.adjust_gridding_triple((13,22,34), 5, (6,10,8)) == (18,30,40)
  f = fftpack.factorization(30, False)
  assert f.n() == 30
  assert tuple(f.factors()) == (2, 3, 5)
  test_complex_to_complex(flags.Verbose)
  test_real_to_complex(flags.Verbose)
  test_complex_to_complex_2d(flags.Verbose)
  test_complex_to_complex_3d(flags.Verbose)
  test_real_to_complex_3d(flags.Verbose)
  exercise_real_to_complex_padding_area()
  max_transform_size = 300
  test_comprehensive_cc_1d(max_transform_size)
  test_comprehensive_rc_1d(max_transform_size)
  show_times()
Пример #3
0
def run():
    show_times = libtbx.utils.show_times()
    from scitbx.python_utils import command_line
    flags = command_line.parse_options(sys.argv[1:], [
        "RandomSeed",
        "Verbose",
    ])
    if (not flags.RandomSeed): random.seed(0)
    assert fftpack.adjust_gridding(13, 5) == 15
    assert fftpack.adjust_gridding(13, 5, 6) == 18
    assert fftpack.adjust_gridding_triple((13, 22, 34), 5) == (15, 24, 36)
    assert fftpack.adjust_gridding_triple((13, 22, 34), 5,
                                          (6, 10, 8)) == (18, 30, 40)
    f = fftpack.factorization(30, False)
    assert f.n() == 30
    assert tuple(f.factors()) == (2, 3, 5)
    test_complex_to_complex(flags.Verbose)
    test_real_to_complex(flags.Verbose)
    test_complex_to_complex_2d(flags.Verbose)
    test_complex_to_complex_3d(flags.Verbose)
    test_real_to_complex_3d(flags.Verbose)
    exercise_real_to_complex_padding_area()
    max_transform_size = 300
    test_comprehensive_cc_1d(max_transform_size)
    test_comprehensive_rc_1d(max_transform_size)
    show_times()
Пример #4
0
def parse_options_loop_space_groups(
      argv,
      call_back,
      keywords=(),
      symbols_to_stdout=True,
      symbols_to_stderr=False,
      show_cpu_times=True,
      **kwds):
  flags = parse_options(
    argv=argv,
    keywords=(
      "Verbose",
      "Debug",
      "Threads",
      "ChunkSize",
      "ChunkMember",
      "RandomSeed",
      "AllSpaceGroups",
      "ChiralSpaceGroups",
      "AllSettings",
      "UnusualSettings") + keywords,
    case_sensitive=False)
  return loop_space_groups(
    argv, flags, call_back, symbols_to_stdout, symbols_to_stderr,
    show_cpu_times, **kwds)
Пример #5
0
    for space_group_number in range(1, 231):
        cmd = "cctbx.python %s" % sys.argv[0] \
            + " %d,%d,%d " % n +str(space_group_number)
        print(cmd)
        sys.stdout.flush()
        easy_run.call(cmd)
        print()
        sys.stdout.flush()


if (__name__ == "__main__"):
    flags = command_line.parse_options(sys.argv[1:], [
        "show_asu",
        "strip",
        "strip_grid",
        "strip_polygons",
        "enantiomorphic",
        "soft",
        "multiplicities",
        "plane_group",
    ])
    assert len(flags.regular_args) > 0
    gridding = flags.regular_args[0].split(",")
    assert len(gridding) in (1, 3)
    gridding = tuple([int(n) for n in gridding])
    if (len(gridding) == 1): gridding *= 3
    if (not os.path.isdir("asu_gallery")):
        os.mkdir("asu_gallery")
    if (len(flags.regular_args) == 1):
        if (not flags.enantiomorphic):
            test_all(gridding)
        else: