map_fit: Fit atomic models in density maps

Atomic models or density maps can be fit in density maps. A local gradient ascent method is used to maximize the average density value at atom positions or the correlation between two maps.

Map fitting

Functions

fitmap(session, atoms_or_map, in_map=None, subtract_maps=None, metric=None, envelope=True, zeros=False, resolution=None, shift=True, rotate=True, symmetric=False, move_whole_molecules=True, search=0, placement='sr', radius=None, cluster_angle=6, cluster_shift=3, asymmetric_unit=True, level_inside=0.1, seed=0, sequence=0, max_steps=2000, grid_step_min=0.01, grid_step_max=0.5, list_fits=None, log_fits=None, each_model=False)

Experimental API . Fit an atomic model or a map in a map using a rigid rotation and translation by locally optimizing correlation. There are four modes: 1) fit all models into map as a single rigid group, 2) fit each model into the map separately, 3) fit each model separately while subtracting others (sequence mode), or 4) use random starting positions when fitting (search mode).

Parameters:
  • atoms_or_map – Atoms or map that will be moved.

  • in_map (Volume) – Target density map to fit into.

  • subtract_maps (Objects) – Subtract these maps or maps for these atoms from the target map before fitting.

  • ----------------------------------------------------------------------------

  • Mode

  • ----------------------------------------------------------------------------

  • each_model (bool) – Whether to fit each model independently or all as one rigid group.

  • sequence (integer) – Fit each model in sequence subtracting other models first for this number of specified fits.

  • search (integer) – Fit using N randomized initial placements and cluster similar results.

  • ----------------------------------------------------------------------------

  • settings (Fitting) –

  • ----------------------------------------------------------------------------

  • metric ('overlap', 'correlation', or 'cam') – Optimization function to use. Overlap is pointwise sum. Cam is correlation about mean (ie. mean value is subtracted from maps before computing correlation).

  • envelope (bool) – Whether to consider fit only within lowest displayed contour level of moving map. If no surface exists then all grid points are used.

  • zeros (bool) – If envelope is false, then the zeros option determines whether grid points of the moving map with zero values are used in the fit. Default false. If envelope is true, this option is ignored and zeros inside the envelope are used.

  • resolution (float) – Resolution for making simulated maps from atomic models. Required when correlation or cam metric is used and atomic models are being fit.

  • shift (bool) – Allow translation when fitting.

  • rotate (bool) – Allow rotation when fitting.

  • symmetric (bool) – Whether to use symmetry of the target map to take account of clashes between copies of the fit models.

  • max_steps (integer) – Maximum number of gradient ascent steps to take

  • grid_step_max (float) – Maximum motion during a fitting step in grid index units.

  • grid_step_min (float) – The fit is considered converged when Motion less than this value (grid index units).

  • ----------------------------------------------------------------------------

  • options (Output) –

  • ----------------------------------------------------------------------------

  • placement ('sr', 's', or 'r') – Whether random placements should include shift and rotation

  • radius (float) – Limits the random placements to within this distance of the starting position.

  • cluster_angle (float) – Rotational difference for a fit to form a new cluster.

  • cluster_shift (float) – Shift difference for a fit to form a new cluster.

  • asymmetric_unit (bool) – List only one symmetrically equivalent fit position if the target map has symmetry.

  • level_inside (float) – Fraction of fit atoms or map that must be inside the target map contour level in order to keep the fit.

  • ----------------------------------------------------------------------------

  • options

  • ----------------------------------------------------------------------------

  • move_whole_molecules (bool) – Move entire molecules, or only the atoms that were specified.

  • list_fits (bool) – Show the fits in a dialog.

  • log_fits (file path) – Write tab separated values giving fit translation and rotation and metrics to a file.