cctbx.geometry_restraints.manager module

cctbx.geometry_restraints.manager.construct_non_crystallographic_conserving_bonds_and_angles(sites_cart, edge_list_bonds, edge_list_angles, bond_weight=100, angle_weight=50, vdw_distance=1.2, non_crystallographic_unit_cell_buffer_layer=5, asu_mappings_buffer_thickness=5, max_reasonable_bond_distance=10)
cctbx.geometry_restraints.manager.format_distances_for_error_message(pair_sym_table, larger_than, orthogonalization_matrix, sites_frac, sites_cart, site_labels)
class cctbx.geometry_restraints.manager.manager(crystal_symmetry=None, model_indices=None, conformer_indices=None, sym_excl_indices=None, site_symmetry_table=None, donor_acceptor_excl_groups=None, bond_params_table=None, shell_sym_tables=None, nonbonded_params=None, nonbonded_types=None, nonbonded_charges=None, nonbonded_function=None, nonbonded_distance_cutoff=None, nonbonded_buffer=1, angle_proxies=None, dihedral_proxies=None, reference_coordinate_proxies=None, reference_dihedral_manager=None, ncs_dihedral_manager=None, den_manager=None, chirality_proxies=None, planarity_proxies=None, parallelity_proxies=None, ramachandran_manager=None, external_energy_function=None, plain_pairs_radius=None, max_reasonable_bond_distance=None, min_cubicle_edge=5, log=<_io.StringIO object>)

Bases: Base_geometry

add_angles_in_place(additional_angle_proxies)
add_chi_torsion_restraints_in_place(pdb_hierarchy, sites_cart, selection=None, sigma=2.5, limit=15.0, chi_angles_only=False, top_out_potential=False)
add_dihedrals_in_place(additional_dihedral_proxies, check_for_duplicates=True)
add_new_bond_restraints_in_place(proxies, sites_cart, max_distance_between_connecting_atoms=5, skip_max_proxy_distance_calculation=False)

Add new bond restraints for list of proxies to this geometry restraints manager, _in_place_! Returns nothing. proxies - list of bond_proxy objects. The symmetry operation for the paired atoms is determined here, therefore the proxy.rt_mx_ji may be anything.

add_new_hbond_restraints_in_place(proxies, sites_cart, max_distance_between_connecting_atoms=5, skip_max_proxy_distance_calculation=False)
add_parallelities_in_place(additional_parallelity_proxies)
add_planarities_in_place(additional_planarity_proxies)
add_reference_coordinate_restraints_in_place(all_chain_proxies=None, pdb_hierarchy=None, selection=None, exclude_outliers=True, sigma=0.2, limit=1.0, top_out=False, n_atoms_in_target_model=None)
adopt_den_manager(den_manager)
adopt_reference_coordinate_restraints_in_place(reference_coordinate_proxies)
adopt_reference_dihedral_manager(manager)
append_reference_coordinate_restraints_in_place(reference_coordinate_proxies)
construct_tardy_tree(sites=None, sites_cart=None, selection=None, omit_bonds_with_slack_greater_than=0, constrain_dihedrals_with_sigma_less_than=10, near_singular_hinges_angular_tolerance_deg=5)
create_den_manager(den_params, pdb_hierarchy, log)
discard_symmetry(new_unit_cell)
energies_sites(sites_cart, flags=None, custom_nonbonded_function=None, compute_gradients=False, gradients=None, disable_asu_cache=False, normalization=False, external_energy_function=None, extension_objects=[], site_labels=None)

Crucial function to override in child. Maybe we should put some info here later.

get_all_angle_proxies()
get_all_bond_proxies(sites_cart=None)
get_angle_proxies_without_user_supplied()
get_bond_proxies_without_user_supplied(sites_cart=None)
get_c_beta_torsion_proxies()
get_chi_torsion_proxies()
get_covalent_angle_proxies()
get_covalent_bond_proxies(sites_cart=None)
get_dihedral_proxies()
get_dihedral_proxies_without_user_supplied()
get_hbond_proxies_iseqs()
get_n_angle_proxies()
get_n_bond_proxies()
get_n_c_beta_torsion_proxies()
get_n_chi_torsion_proixes()
get_n_den_proxies()
get_n_hangle_proxies()
get_n_hbond_proxies()
get_n_parallelity_bp_proxies()
get_n_planarity_bp_proxies()
get_n_planarity_proxies()
get_n_ramachandran_proxies()
get_n_reference_coordinate_proxies()
get_n_reference_dihedral_proxies()
get_n_stacking_proxies()
get_parallelity_proxies_without_user_supplied()
get_planarity_proxies_without_user_supplied()
get_reference_coordinate_proxies()
get_struct_conn_mmcif(hierarchy)
get_user_supplied_restraints()
harmonic_restraints(variables, type_indices, type_weights)

Not clear what it is

is_bonded_atoms(i_seq, j_seq)
new_included_bonded_atoms(proxies, sites_cart, site_symmetry_table, nonbonded_types, nonbonded_charges, max_distance_between_connecting_atoms=5, skip_max_proxy_distance_calculation=False)

Produce new geometry_restraints_manager object that will include new atoms each with exactly one bond to the existing atom. proxies - list of bond_proxy objects. Symmetry operation will be determined automatically, so proxy.rt_mx_ji is ignored. Essentially this function wraps self.new_including_isolated_sites() and self.add_new_bond_restraints_in_place(). sites_cart should contain all coordinates, for old and new atoms. new

coordinates should follow old ones and the order should be consistent with i_seqs mentioned in proxy objects.

site_symmetry_table - table only for new atoms nonbonded_types - only for new atoms nonbonded_charges - only for new atoms.

new_including_isolated_sites(n_additional_sites, model_indices=None, conformer_indices=None, sym_excl_indices=None, donor_acceptor_excl_groups=None, site_symmetry_table=None, nonbonded_types=None, nonbonded_charges=None)
nonbonded_model_distances(sites_cart=None)
pair_proxies(sites_cart=None, flags=None, asu_is_inside_epsilon=None, bonded_distance_cutoff_epsilon=None, site_labels=None)
reduce_for_tardy(tardy_tree, omit_bonds_with_slack_greater_than=0, include_den_restraints=False)
remove_angles_in_place(selection)
remove_c_beta_torsion_restraints_in_place(selection=None)
remove_chi_torsion_restraints_in_place(selection=None)
remove_chiralities_in_place(selection)
remove_dihedrals_in_place(selection)
remove_ncs_dihedrals_in_place()
remove_parallelities_in_place(selection)
remove_planarities_in_place(selection)
remove_ramachandran_in_place()
remove_reference_coordinate_restraints_in_place(selection=None)
remove_reference_dihedral_manager()
remove_reference_dihedrals_in_place(selection)
remove_secondary_structure_restraints()
remove_user_supplied_restraints_in_place()

Problem is in removing bond restraints, which is not yet implemented at all and rather complicated.

replace_site_symmetry(new_site_symmetry_table, special_position_settings, sites_cart)
reset_internals()
rigid_clusters_due_to_dihedrals_and_planes(constrain_dihedrals_with_sigma_less_than)
select(selection=None, iselection=None)

This is cruicial function and should be defined in child. Given selection return manager only with selected atoms and restraints

set_external_energy_function(energy_function)
set_ramachandran_restraints(manager)
set_secondary_structure_restraints(ss_manager, hierarchy, log)
shift_sites_cart(shift)

Sometimes coordinates of the model are shifted (e.g. in boxing with map). In case any element of restraints cares, do what is appropriate here.

show_sorted(flags=None, sites_cart=None, site_labels=None, f=None)

Similar to geo file

simple_edge_list(omit_slack_greater_than=0)
sites_cart_used_for_pair_proxies()
sync_reference_dihedral_with_ncs(log)
ta_harmonic_restraints(sites_cart, ta_harmonic_restraint_info, weight=0.001, slack=0.5)

Not clear what it is

update_atom_nonbonded_type(i_seq, nonbonded_type, charge=0)
update_dihedral_ncs_restraints(model, log)
update_plain_pair_sym_table(sites_frac)
update_ramachandran_restraints_phi_psi_targets(hierarchy)
write_geo_file(sites_cart=None, site_labels=None, file_name=None, file_descriptor=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, header='# Geometry restraints\n')

Define this if you want the .geo file