mmtbx.refinement.real_space package

Submodules

mmtbx.refinement.real_space.fit_residue module

mmtbx.refinement.real_space.fit_residue.backrub_move(prev_res, cur_res, next_res, angle, move_oxygens=False, accept_worse_rama=False, rotamer_manager=None, rama_manager=None)
mmtbx.refinement.real_space.fit_residue.flatten(l)
mmtbx.refinement.real_space.fit_residue.get_rotamer_iterator(mon_lib_srv, residue)
class mmtbx.refinement.real_space.fit_residue.monitor(id_str, selection, map_data, unit_cell, weights, pairs, cmv, rotamer_evaluator, log)

Bases: object

add(residue, state)
finalize(residue)
show()
class mmtbx.refinement.real_space.fit_residue.run(residue, mon_lib_srv, rotamer_manager, sin_cos_table, cmv, unit_cell, rotatable_hd=None, vdw_radii=None, xyzrad_bumpers=None, target_map=None, target_map_for_cb=None, backbone_sample=False, accept_only_if_max_shift_is_smaller_than=None, log=None)

Bases: object

fit_c_beta(c_beta_rotation_cluster)
fit_proline()

PRO is a special case. Just sample two possible rotamers. Skip if map isn’t available: can’t do much in this case!

fit_side_chain(clusters)
get_rotamer_iterator()
get_target_value(sites_cart, selection=None, target_map=None)
class mmtbx.refinement.real_space.fit_residue.run_with_minimization(target_map, residue, vdw_radii, xray_structure, mon_lib_srv, rotamer_manager, geometry_restraints_manager, real_space_gradients_delta, selection_radius=5, rms_bonds_limit=0.03, rms_angles_limit=3.0, backbone_sample_angle=None, cmv=None, allow_modified_residues=False)

Bases: object

fit_backbone()
fit_rotamers()
grid_sample_around_c_n_axis()
real_space_refine(optimize_weight, start_trial_weight_value)
class mmtbx.refinement.real_space.fit_residue.tune_up(target_map, residue, mon_lib_srv, rotamer_manager, unit_cell, exclude_hd=True, monitor=None, torsion_search_start=-20, torsion_search_stop=20, torsion_search_step=2)

Bases: object

mmtbx.refinement.real_space.fit_residues module

class mmtbx.refinement.real_space.fit_residues.fix_outliers(pdb_hierarchy, rotamer_manager, sin_cos_table, mon_lib_srv, f_map=None, fdiff_map=None, unit_cell=None, accept_only_if_max_shift_is_smaller_than=None, log=None)

Bases: object

class mmtbx.refinement.real_space.fit_residues.run(pdb_hierarchy, crystal_symmetry, rotamer_manager, sin_cos_table, mon_lib_srv, filter_by_cc=False, d_min=None, map_data_scale=2.5, diff_map_data_threshold=-2.5, exclude_selection=None, rotatable_hd=None, bselection=None, map_data=None, vdw_radii=None, backbone_sample=False, diff_map_data=None, log=None)

Bases: object

count_outliers()
get_nonbonded_bumpers(residue, radius)
loop(function)
one_residue_iteration(residue)
show(prefix='')

mmtbx.refinement.real_space.fit_water module

mmtbx.refinement.real_space.fit_water.run(pdb_hierarchy, target_map, unit_cell, real_space_gradients_delta, max_allowed_shift=1.5, max_iterations=50, log=None)

mmtbx.refinement.real_space.individual_sites module

class mmtbx.refinement.real_space.individual_sites.box_refinement_manager(xray_structure, target_map, geometry_restraints_manager, gradients_method='fd', real_space_gradients_delta=0.25, max_iterations=50, ncs_groups=None)

Bases: object

refine(selection, optimize_weight=True, start_trial_weight_value=50, selection_buffer_radius=5, box_cushion=2, rms_bonds_limit=0.03, rms_angles_limit=3.0)
update_target_map(new_target_map)
update_xray_structure(new_xray_structure)
class mmtbx.refinement.real_space.individual_sites.diff_map(miller_array, crystal_gridding, map_target, geometry_restraints_manager, restraints_target_weight=1, max_iterations=500, min_iterations=500)

Bases: object

refine(weight, sites_cart=None, xray_structure=None)
sites_cart()
class mmtbx.refinement.real_space.individual_sites.easy(map_data, xray_structure, pdb_hierarchy, geometry_restraints_manager, gradients_method='fd', selection=None, selection_real_space=None, rms_bonds_limit=0.015, rms_angles_limit=2.0, max_iterations=150, w=None, states_accumulator=None, log=None)

Bases: object

Simplest interface to most automated and fast real-space refinement. To keep it simple not all parameters are exposed.

class mmtbx.refinement.real_space.individual_sites.minimize_wrapper_with_map(model, target_map, refine_ncs_operators=False, number_of_cycles=1, cycles_to_converge=2, min_mode='simple_cycles', resolution=3.0, log=None)

Bases: object

class mmtbx.refinement.real_space.individual_sites.refinery(refiner, xray_structure, start_trial_weight_value=50.0, weight_sample_rate=10, rms_bonds_limit=0.03, rms_angles_limit=3.0, optimize_weight=True)

Bases: object

adjust_weight_sample_rate(weight)
rmsds(sites_cart)
class mmtbx.refinement.real_space.individual_sites.simple(target_map, selection, geometry_restraints_manager, gradients_method='fd', real_space_gradients_delta=0.25, selection_real_space=None, max_iterations=150, states_accumulator=None, ncs_groups=None)

Bases: object

refine(weight, xray_structure)
rmsds()
sites_cart()

mmtbx.refinement.real_space.rigid_body module

mmtbx.refinement.real_space.rigid_body.real_space_rigid_body_gradients_simple(unit_cell, density_map, sites_cart_0, center_of_mass, q, unit_quaternion_delta=0.01, translation_delta=0.3)
class mmtbx.refinement.real_space.rigid_body.refine(residue, density_map, geometry_restraints_manager, real_space_target_weight, real_space_gradients_delta, lbfgs_termination_params, unit_cell, cctbx_geometry_restraints_flags=None, states_collector=None)

Bases: object

compute_functional_and_gradients()
d_e_pot_d_sites(sites_moved)
class mmtbx.refinement.real_space.rigid_body.refine_groups(map_data, pdb_hierarchy, xray_structure, macro_cycles, d_min)

Bases: object

class mmtbx.refinement.real_space.rigid_body.refine_mz(map_data, pdb_hierarchy, xray_structure, d_min, use_mask=False, masking_atom_radius=5, max_iterations=50, macro_cycles=1, prefix='', log=None)

Bases: object

Efficient real-space rigid-body refinement. Analog of MZ rigid-body refinement in reciprocal space. Whole content of pdb_hierarchy is treated as one rigid group.

mmtbx.refinement.real_space.weight module

class mmtbx.refinement.real_space.weight.run(map_data, xray_structure, pdb_hierarchy, geometry_restraints_manager, gradients_method='fd', ncs_groups=None, rms_bonds_limit=0.015, rms_angles_limit=2.0, real_space_gradients_delta=0.25, max_iterations=100, range_size=10, n_ranges=10, default_weight=50)

Bases: object

show(log, prefix='')

Module contents

class mmtbx.refinement.real_space.aa_residue_axes_and_clusters(residue, mon_lib_srv, backbone_sample, log=None)

Bases: object

mmtbx.refinement.real_space.check_sites_match(ph_answer, ph_refined, tol, exclude_atom_names=[])
class mmtbx.refinement.real_space.cluster(axis, atoms_to_rotate, atom_names=None, vector=None, selection=None)

Bases: object

get_vector_flat()
show()
mmtbx.refinement.real_space.common_map_values(pdb_hierarchy, unit_cell, map_data)
mmtbx.refinement.real_space.flatten(l)
mmtbx.refinement.real_space.generate_angles_nested(clusters, residue, rotamer_eval, nested_loop, include, states=None)
mmtbx.refinement.real_space.get_radii(residue, vdw_radii)
mmtbx.refinement.real_space.get_radius(atom, vdw_radii)
mmtbx.refinement.real_space.negate_map_around_selected_atoms_except_selected_atoms(xray_structure, map_data, negate_selection, atom_radius)
class mmtbx.refinement.real_space.residue_monitor(residue, id_str, selection_all, selection_sidechain=None, selection_backbone=None, selection_c=None, selection_n=None, map_cc_sidechain=None, map_cc_backbone=None, map_cc_all=None, rotamer_status=None)

Bases: object

format_info_string()
class mmtbx.refinement.real_space.rsr_model(model, map_data=None, d_min=None)

Bases: object

initialize()
show(prefix='', log=None)
update(xray_structure=None, sites_cart=None)
update_statistics(prefix=None, log=None)
class mmtbx.refinement.real_space.score(unit_cell, target_map, residue, rotamer_eval=None, vector=None)

Bases: object

compute_target(sites_cart, selection=None)
reset(sites_cart, selection=None)
update(sites_cart, selection=None, tmp=None)
class mmtbx.refinement.real_space.score2(unit_cell, target_map, residue, vector=None, selection=None)

Bases: object

update(sites_cart, selection=None)
class mmtbx.refinement.real_space.score3(unit_cell, target_map, residue, rotamer_eval, exclude_hd=True)

Bases: object

compute_target(sites_cart, selection=None)
reset(sites_cart, selection=None)
update(sites_cart, selection=None)
class mmtbx.refinement.real_space.score4(unit_cell, target_map, residue, rotamer_eval, exclude_hd=True)

Bases: object

compute_target(sites_cart, selection=None)
reset(sites_cart, selection=None)
update(sites_cart, selection=None)
mmtbx.refinement.real_space.selection_around_to_negate(xray_structure, selection_within_radius, iselection, selection_good=None, iselection_backbone=None, iselection_n_external=None, iselection_c_external=None)
mmtbx.refinement.real_space.setup_test(pdb_answer, pdb_poor, i_pdb, d_min, resolution_factor, pdb_for_map=None, residues=None)
class mmtbx.refinement.real_space.side_chain_fit_evaluator(pdb_hierarchy, crystal_symmetry, exclude_selection=None, rotamer_evaluator=None, map_data=None, diff_map_data=None, map_data_scale=2.5, diff_map_data_threshold=-2.5, cmv=None)

Bases: object

sel_all()
sel_outliers()
sel_outliers_and_poormap()
sel_outliers_or_poormap()
sel_poormap()
show(log=None, prefix='')
class mmtbx.refinement.real_space.structure_monitor(pdb_hierarchy, xray_structure, target_map_object=None, geometry_restraints_manager=None)

Bases: object

assert_pdb_hierarchy_xray_structure_sync()
compute_map(xray_structure)
initialize()
map_cc(other_map, sites_cart=None, atom_radius=2, per_atom=False)
map_cc_histogram_per_atom(radius=2, n_slots=10)
show(prefix='', log=None)
show_residues(map_cc_all=0.8, map_cc_sidechain=0.8, log=None)
update(xray_structure, accept_as_is=True)
mmtbx.refinement.real_space.torsion_search_nested(clusters, scorer, sites_cart)