def _minimize(self):
     m1 = self.model.deep_copy()
     rama_params = rama_master_phil.fetch().extract(
     ).ramachandran_plot_restraints
     rama_params.favored = 'oldfield'
     rama_params.allowed = 'oldfield'
     rama_params.outlier = 'oldfield'
     m1.set_ramachandran_plot_restraints(rama_params=rama_params)
     run2(
         restraints_manager=m1.get_restraints_manager(),
         pdb_hierarchy=m1.get_hierarchy(),
         correct_special_position_tolerance=1.0,
         riding_h_manager=None,
         ncs_restraints_group_list=
         [],  # These are actually for NCS CONSTRAINTS!
         max_number_of_iterations=500,
         number_of_macro_cycles=5,
         selection=None,
         bond=True,
         nonbonded=True,
         angle=True,
         dihedral=True,
         chirality=True,
         planarity=True,
         parallelity=True,
         log=null_out())
     m1.set_sites_cart_from_hierarchy(multiply_ncs=True)
     return m1
Beispiel #2
0
def exercise_1(prefix="tst_model_ramachandran_1"):
    """ Make sure that set_ramachandran_plot_restraints() works. """
    inp = iotbx.pdb.input(lines=tst_pdb_str, source_info=None)
    model = mmtbx.model.manager(model_input=inp)
    rama_params = master_phil.fetch().extract().ramachandran_plot_restraints
    rama_params.favored = 'oldfield'
    rama_params.allowed = 'oldfield'
    rama_params.outlier = 'oldfield'
    model.set_ramachandran_plot_restraints(rama_params=rama_params)
    n = model.get_restraints_manager(
    ).geometry.ramachandran_manager.get_n_oldfield_proxies()
    assert n == 2

    rama_params.favored = 'emsley'
    rama_params.allowed = 'emsley'
    rama_params.outlier = 'emsley'
    model.set_ramachandran_plot_restraints(rama_params=rama_params)
    n = model.get_restraints_manager(
    ).geometry.ramachandran_manager.get_n_emsley_proxies()
    assert n == 2