示例#1
0
def tst_0():
    model, map_data, crystal_symmetry = make_map_from_pdb(
        raw_records=raw_records)

    method = "rscc"
    pdb_hierarchy_new = maptbx.loc_res(map=map_data,
                                       model=model,
                                       crystal_symmetry=crystal_symmetry,
                                       chunk_size=10,
                                       soft_mask_radius=3.,
                                       method=method)

    b_values, occs = get_b_and_occ(
        hierarchy=pdb_hierarchy_new,
        atom_selection="name CA and (resid 5 or resid 15)")
    print("\nBvalues (resolutions): for %s: %s" % (method, str(b_values)))

    assert approx_equal(b_values, [7.5, 3.0])

    method = "fsc"
    pdb_hierarchy_new = maptbx.loc_res(map=map_data,
                                       model=model,
                                       crystal_symmetry=crystal_symmetry,
                                       chunk_size=10,
                                       soft_mask_radius=3.,
                                       method=method,
                                       fsc_cutoff=0.143)
    b_values, occs = get_b_and_occ(
        hierarchy=pdb_hierarchy_new,
        atom_selection="name CA and (resid 5 or resid 15)")
    print("\nBvalues (resolutions): for %s: %s" % (method, str(b_values)))
    assert approx_equal(b_values, [2.72, 2.27], eps=.05)
示例#2
0
def tst_0():
  ph,map_data,crystal_symmetry=make_map_from_pdb(raw_records=raw_records)

  method="rscc"
  pdb_hierarchy_new  = maptbx.loc_res(
     map              = map_data,
     pdb_hierarchy    = ph,
     crystal_symmetry = crystal_symmetry,
     chunk_size       = 10,
     soft_mask_radius = 3.,
     method           = method)

  b_values,occs=get_b_and_occ(hierarchy=pdb_hierarchy_new,
     atom_selection="name CA and (resid 5 or resid 15)")
  print "\nBvalues (resolutions): for %s: %s" %(method,str(b_values))

  assert  approx_equal(b_values,[5.8, 3.0])

  method = "fsc"
  pdb_hierarchy_new  = maptbx.loc_res(
     map              = map_data,
     pdb_hierarchy    = ph,
     crystal_symmetry = crystal_symmetry,
     chunk_size       = 10,
     soft_mask_radius = 3.,
     method           = method,
     fsc_cutoff       = 0.143)
  b_values,occs=get_b_and_occ(hierarchy=pdb_hierarchy_new,
     atom_selection="name CA and (resid 5 or resid 15)")
  print "\nBvalues (resolutions): for %s: %s" %(method,str(b_values))
  assert  approx_equal(b_values,[8.286411404892835, 2.1497394511476364],eps=.05)
示例#3
0
def tst_1():

    for set_b_iso, expected_b_values, expected_occs in zip(
        [-200, 0, 200], [[200.0, 200.0], [-20.0, -20.0], [-160.0, -180.0]],
        [[3.0, 3.0], [3.4, 3.0], [3.2, 3.1]]):

        model, map_data, crystal_symmetry = make_map_from_pdb(
            raw_records=raw_records_2, set_b_iso=set_b_iso)

        method = "rscc_d_min_b"
        print("Running test of rscc_d_min_b")
        pdb_hierarchy_new = maptbx.loc_res(
            map=map_data,
            model=model,
            crystal_symmetry=crystal_symmetry,
            chunk_size=10,
            method=method,
            soft_mask_radius=3.,
            hard_d_min=3.,
            b_range_low=-1000,
            b_range_high=1000,
        )

        b_values, occs = get_b_and_occ(
            hierarchy=pdb_hierarchy_new,
            atom_selection="name CA and (resid 5 or resid 15)")
        print("Bvalues (b_sharpen)  expected: %s     found: %s " %
              (str(expected_b_values), str(b_values)))
        print("Occ values(d_min)  expected: %s     found: %s " %
              (str(expected_occs), str(occs)))
        assert approx_equal(expected_b_values, b_values)
        assert approx_equal(expected_occs, occs)