cctbx.maptbx package

Submodules

Module contents

cctbx.maptbx.as_CObjectZYX(map_unit_cell, first, last, apply_sigma_scaling=True)
cctbx.maptbx.assert_same_gridding(map_1, map_2, Sorry_message='Maps have different gridding.')
class cctbx.maptbx.atom_curves(scattering_type, scattering_table='wk1995', scattering_dictionary=None)

Bases: object

Class-toolkit to compute various 1-atom 1D curves: exact electron density, Fourier image of specified resolution, etc.

bcr_approx(d_min, radius_max, radius_step, mxp=5, epsc=0.001, kpres=0)
exact_density(b_iso, radius_max=5.0, radius_step=0.001)
exact_density_at_r(r, b_iso)
exact_gradient_at_r(r, t, t0, b_iso)
form_factor(ss, b_iso)
get_xray_structure(box, b)
image(d_min, b_iso, d_max=None, radius_min=0, radius_max=5.0, radius_step=0.001, n_integration_steps=2000)
image_from_3d(box, b, step, unit_cell, space_group_info, miller_array)
image_from_miller_indices(miller_indices, b_iso, uc, radius_max, radius_step)
integrand(r, b_iso)
one_gaussian_approximation(d_min, b, use_inflection_point=True)
one_gaussian_exact(r, A0, B0, b=0)
cctbx.maptbx.atom_radius_as_central_peak_width(element, b_iso, d_min, scattering_table)

Estimate atom radius as half-width of the central peak of Fourier image.

class cctbx.maptbx.boxes(n_real, fraction=None, log=None, max_boxes=2000, prefix='')

Bases: object

Split box defined by n_real into boxes where each box is a fraction of the whole box.

class cctbx.maptbx.boxes_by_dimension(n_real, abc, dim, log=None, prefix='')

Bases: object

cctbx.maptbx.cc_peak(cutoff, map_1=None, map_2=None, map_coeffs_1=None, map_coeffs_2=None)
Compute CCpeak as described in

Acta Cryst. (2014). D70, 2593-2606 Metrics for comparison of crystallographic maps A. Urzhumtsev, P. V. Afonine, V. Y. Lunin, T. C. Terwilliger and P. D. Adams

cctbx.maptbx.ccv(map_1, map_2, modified, centered, cutoff=None, n_bins=10000)
class cctbx.maptbx.cluster_site_info(peak_list_index, grid_index, grid_height, site, height)

Bases: object

class cctbx.maptbx.crystal_gridding(unit_cell, d_min=None, resolution_factor=None, step=None, symmetry_flags=None, space_group_info=None, mandatory_factors=None, max_prime=5, assert_shannon_sampling=True, pre_determined_n_real=None)

Bases: object

change_space_group(space_group_info)
crystal_symmetry()
d_min()
mandatory_factors()
max_prime()
n_grid_points()
n_real()
resolution_factor()
space_group()
space_group_info()
symmetry_flags()
tags()
unit_cell()
class cctbx.maptbx.crystal_gridding_tags(gridding)

Bases: crystal_gridding

tags()
class cctbx.maptbx.d99(map=None, f_map=None, crystal_symmetry=None)

Bases: object

show(log)
cctbx.maptbx.d_min_corner(map_data, unit_cell)
cctbx.maptbx.d_min_from_map(map_data, unit_cell, resolution_factor=0.5)
cctbx.maptbx.get_diff_score_towards_periodic(map_data, minimum_fraction_data_points=None)

Evaluate consistency of high-pass filtered difference map analysis with that expected for a map that is periodic.

The difference map is difference between the map and the map lacking high- resolution terms. This difference map shows only high-frequency information

A map that is periodic should give a difference map that is more or less uniform everywhere. A non-periodic map should have a discontinuity at the borders and have high variation in the difference map at the edges.

cctbx.maptbx.get_edge_score_towards_periodic(map_data, use_minimum=True)

Measure of whether facing edges have correlated data with correlation

similar to that found for adjacent planes and different than randomly chosen points

If use_minimum is set, take minimum of values on all pairs of faces

cctbx.maptbx.get_relative_cc(boundary_zero_data=None, boundary_one_data=None, one_data=None)
cctbx.maptbx.get_resolution_where_significant_data_present(ma, minimum_fraction_data_points=0.1)
cctbx.maptbx.is_bounded_by_constant(map_data, relative_sd_tol=0.1)

Determine if this map is bounded on all sides by values that are zero or a constant, within relative tolerance of relative_sd_tol to the SD of the map as a whole

Returns True if map boundary values are nearly constant,

and False if they vary

Requires that map is at origin (0,0,0)

cctbx.maptbx.is_periodic(map_data, minimum_fraction_data_points=0.1, high_confidence_delta=0.2, medium_confidence_delta=0.25)

Determine if this map is periodic. If values on opposite faces are about as similar as values on adjacent planes, it is probably periodic.

Two tests are used: (1) correlation of facing edges of map and

(2) test whether difference map between original and map without high resolution data shows most variation at edges (due to mismatch of edge data at facing edges of map).

Map edge correlation score: Normally values on adjacent planes are very highly correlated (> 0.9) and random points in a map have very low correlation (< 0.1). This allows a test based on correlation of facing edges of a map and comparison to random pairs of points in map.

Difference map score: If a map is boxed then if it is treated as a periodic map, there will be a discontinuity at the edges of the map. This can be detected by calculating the Fourier transform of the high-resolution map coefficients for the map and detecting if this high-pass filtered map is dominated by features at the edge of the map.

Returns True if periodic, False if not, and None if map gridding is too small (too few planes) or sampling is insufficiently fine to tell.

Requires that map is at origin (0,0,0)

cctbx.maptbx.loc_res(map_model_manager, chunk_size=10, method='fsc', b_min=0, b_max=500, b_step=5, res_min=1.5, res_max=10.0, res_step=0.1, fsc_cutoff=0.143)
class cctbx.maptbx.local_scale(crystal_gridding, crystal_symmetry, f_map=None, map_data=None, miller_array=None, d_min=None)

Bases: object

cctbx.maptbx.map_accumulator(n_real, use_max_map, smearing_b=5, max_peak_scale=2, smearing_span=10, use_exp_table=True)
Good defaults for 2mFo-DFc type maps:

smearing_b = 1, max_peak_scale = 100, smearing_span = 5

cctbx.maptbx.map_coefficients_to_map(map_coeffs, crystal_symmetry, n_real)
cctbx.maptbx.map_peak_3d_as_2d(map_data, unit_cell, center_cart, radius, step=0.01, s_angle_sampling_step=10, t_angle_sampling_step=10)
cctbx.maptbx.map_to_map_coefficients(m, cs, d_min)
cctbx.maptbx.map_values_along_line_connecting_two_points(map_data, points_cart, step, unit_cell, interpolation)

Calculate interpolated map values along the line connecting two points in space.

cctbx.maptbx.mask(xray_structure, n_real, mask_value_inside_molecule=0, mask_value_outside_molecule=1, solvent_radius=0, atom_radius=None)
class cctbx.maptbx.peak_cluster_analysis(peak_list, special_position_settings, general_positions_only=False, effective_resolution=None, significant_height_fraction=None, cluster_height_fraction=None, min_cross_distance=None, max_clusters=None, min_cubicle_edge=5)

Bases: object

all(max_clusters=None)
all_site_cluster_analysis(max_clusters=None)
all_with_effective_resolution(max_clusters=None)
append_fixed_site(site, height=0)
cluster_height_fraction()
discard_last()
effective_resolution()
fixed_site_indices()
general_positions_only()
heights()
max_clusters()
max_grid_height()
min_cross_distance()
next()
next_site_cluster_analysis()
next_with_effective_resolution()
peak_list()
peak_list_indices()
significant_height_fraction()
site_cluster_analysis()
sites()
special_position_settings()
class cctbx.maptbx.peak_list(data, tags, peak_search_level=1, max_peaks=0, peak_cutoff=None, interpolate=True)

Bases: peak_list

class cctbx.maptbx.peak_search_parameters(peak_search_level=1, max_peaks=0, peak_cutoff=None, interpolate=True, min_distance_sym_equiv=None, general_positions_only=False, effective_resolution=None, significant_height_fraction=None, cluster_height_fraction=None, min_cross_distance=None, max_clusters=None, min_cubicle_edge=5)

Bases: object

cluster_height_fraction()
effective_resolution()
general_positions_only()
interpolate()
max_clusters()
max_peaks()
min_cross_distance()
min_cubicle_edge()
min_distance_sym_equiv()
peak_cutoff()
peak_search_level()
significant_height_fraction()
cctbx.maptbx.peak_volume_estimate(map_data, sites_cart, crystal_symmetry, cutoff, atom_radius=1.5)
class cctbx.maptbx.positivity_constrained_density_modification(f, f_000, n_cycles=100, resolution_factor=0.25, d_min=None, crystal_gridding=None, complete_set=None)

Bases: object

assert_equal()
cctbx.maptbx.principal_axes_of_inertia(real_map, site_cart, unit_cell, radius)
cctbx.maptbx.region_density_correlation(large_unit_cell, large_d_min, large_density_map, sites_cart, site_radii, work_scatterers)
cctbx.maptbx.relative_sd_on_edges(map_data, skip_if_greater_than=None, use_maximum=None)

Determine relative SD of values on edges to the map as a whole

Requires that map is at origin (0,0,0)

cctbx.maptbx.sharpen2(map, xray_structure, resolution, file_name_prefix)
cctbx.maptbx.shift_origin_if_needed(map_data=None, sites_cart=None, crystal_symmetry=None, ncs_object=None, origin_grid_units=None, n_xyz=None)
cctbx.maptbx.smooth_map(map, crystal_symmetry, rad_smooth, method='exp', non_negative=True)
class cctbx.maptbx.spherical_variance_around_point(real_map, unit_cell, site_cart, radius, n_points=40, spline_interpolation=True, write_sphere_points_to_pdb_file=None)

Bases: object

show(out=None, prefix='')
cctbx.maptbx.sphericity_by_heuristics(map_data, unit_cell, center_cart, radius, s_angle_sampling_step=20, t_angle_sampling_step=20)
class cctbx.maptbx.statistics(map)

Bases: statistics

cctbx.maptbx.truncate(map_data, by_sigma_less_than, scale_by, set_value=0)

Trunate map inplace by standard deviation (sigma) while scale it with specified scale, such as volume (scale_by = 1/volume) or sigma (scale_by = 1/standard_deviation). Input map_data is expected to be unscaled ( right out of FT).

cctbx.maptbx.value_at_closest_grid_point(map, x_frac)