Ejemplo n.º 1
0
 def noise_filtered_map_coefficients(self, map_coefficients):
     from mmtbx.maps import fem
     f_map = self.fmodel.electron_density_map().map_coefficients(
         map_type="2mFo-DFc",
         isotropize=True,
         exclude_free_r_reflections=False,
         fill_missing=True)
     selection = fem.good_atoms_selection(
         crystal_gridding=self.crystal_gridding,
         map_coeffs=f_map,  #map_coefficients,
         xray_structure=self.fmodel.xray_structure)
     fft_map = cctbx.miller.fft_map(crystal_gridding=self.crystal_gridding,
                                    fourier_coefficients=map_coefficients)
     fft_map.apply_sigma_scaling()
     m = fft_map.real_map_unpadded()
     m = fem.low_volume_density_elimination(m=m,
                                            fmodel=self.fmodel,
                                            selection=selection,
                                            end=11)
     ### Filter by 2mFo-DFc filled map
     fft_map = cctbx.miller.fft_map(crystal_gridding=self.crystal_gridding,
                                    fourier_coefficients=f_map)
     fft_map.apply_sigma_scaling()
     filter_mask = fft_map.real_map_unpadded()
     filter_mask = fem.low_volume_density_elimination(m=filter_mask,
                                                      fmodel=self.fmodel,
                                                      selection=selection,
                                                      end=6)  #11)
     sel = filter_mask < 0.25
     filter_mask = filter_mask.set_selected(sel, 0)
     sel = filter_mask >= 0.25
     filter_mask = filter_mask.set_selected(sel, 1)
     ###
     return map_coefficients.structure_factors_from_map(
         map=m * filter_mask,
         use_scale=True,
         anomalous_flag=False,
         use_sg=False)
Ejemplo n.º 2
0
 def noise_filtered_map_coefficients(self, map_coefficients):
   from mmtbx.maps import fem
   f_map = self.fmodel.electron_density_map().map_coefficients(
     map_type                   = "2mFo-DFc",
     isotropize                 = True,
     exclude_free_r_reflections = False,
     fill_missing               = True)
   selection = fem.good_atoms_selection(
     crystal_gridding = self.crystal_gridding,
     map_coeffs       = f_map,#map_coefficients,
     xray_structure   = self.fmodel.xray_structure)
   fft_map = cctbx.miller.fft_map(
     crystal_gridding     = self.crystal_gridding,
     fourier_coefficients = map_coefficients)
   fft_map.apply_sigma_scaling()
   m = fft_map.real_map_unpadded()
   m = fem.low_volume_density_elimination(m=m, fmodel=self.fmodel,
     selection=selection, end=11)
   ### Filter by 2mFo-DFc filled map
   fft_map = cctbx.miller.fft_map(
     crystal_gridding     = self.crystal_gridding,
     fourier_coefficients = f_map)
   fft_map.apply_sigma_scaling()
   filter_mask = fft_map.real_map_unpadded()
   filter_mask = fem.low_volume_density_elimination(m=filter_mask,
     fmodel=self.fmodel, selection=selection, end=6)#11)
   sel = filter_mask<0.25
   filter_mask = filter_mask.set_selected(sel, 0)
   sel = filter_mask>=0.25
   filter_mask = filter_mask.set_selected(sel, 1)
   ###
   return map_coefficients.structure_factors_from_map(
     map            = m*filter_mask,
     use_scale      = True,
     anomalous_flag = False,
     use_sg         = False)