def METHOD_NAME():
  """
  Exercise maptbx.target_and_gradients_simple in action: minimization
  (bigger model).
  """
  def compute_map(xray_structure, d_min=1., resolution_factor=1./4):
    fc = xray_structure.structure_factors(d_min = d_min).f_calc()
    fft_map = fc.fft_map(resolution_factor=resolution_factor)
    fft_map.apply_sigma_scaling()
    result = fft_map.real_map_unpadded()
    return result, fc, fft_map
  xrs = random_structure.xray_structure(
    space_group_info  = sgtbx.space_group_info("P212121"),
    elements          = ["N","C","O","S","P"]*10,
    volume_per_atom   = 150)
  map_target,tmp,tmp = compute_map(xray_structure = xrs)
  xrs_sh = xrs.deep_copy_scatterers()
  xrs_sh.shake_sites_in_place(mean_distance=0.3)
  start_error = flex.mean(xrs.distances(other = xrs_sh))
  assert start_error > 0.29
  map_current, miller_array, crystal_gridding = compute_map(
    xray_structure = xrs_sh)
  xrs_sh_ = xrs_sh.deep_copy_scatterers()
  minimized = minimization.run(
    xray_structure              = xrs_sh_,
    miller_array                = miller_array,
    crystal_gridding            = crystal_gridding,
    map_target                  = map_target,
    max_iterations              = 500,
    min_iterations              = 25,
    step                        = 0.5,
    geometry_restraints_manager = None,
    target_type                 = "simple")
  xrs_sh_ = xrs_sh_.replace_sites_cart(minimized.sites_cart)
  final_error = flex.mean(xrs.distances(other = xrs_sh_))
  assert final_error < 0.015