Example #1
0
def negate_map_around_selected_atoms_except_selected_atoms(
        xray_structure, map_data, negate_selection, atom_radius):
    # XXX time and memory inefficient
    sites_cart_p1 = xray_structure.select(negate_selection).expand_to_p1(
        sites_mod_positive=True).sites_cart()
    around_atoms_selections = maptbx.grid_indices_around_sites(
        unit_cell=xray_structure.unit_cell(),
        fft_n_real=map_data.focus(),
        fft_m_real=map_data.all(),
        sites_cart=sites_cart_p1,
        site_radii=flex.double(sites_cart_p1.size(), atom_radius))
    return maptbx.negate_selected_in_place(map_data=map_data,
                                           selection=around_atoms_selections)
Example #2
0
def negate_map_around_selected_atoms_except_selected_atoms(
      xray_structure,
      map_data,
      negate_selection,
      atom_radius):
  # XXX time and memory inefficient
  sites_cart_p1 = xray_structure.select(negate_selection).expand_to_p1(
    sites_mod_positive=True).sites_cart()
  around_atoms_selections = maptbx.grid_indices_around_sites(
    unit_cell  = xray_structure.unit_cell(),
    fft_n_real = map_data.focus(),
    fft_m_real = map_data.all(),
    sites_cart = sites_cart_p1,
    site_radii = flex.double(sites_cart_p1.size(), atom_radius))
  return maptbx.negate_selected_in_place(map_data=map_data,
    selection=around_atoms_selections)