def exercise_00(debug=True): mon_lib_srv = monomer_library.server.server() ener_lib = monomer_library.server.ener_lib() for i, l in enumerate(loop): if(debug): print "-"*70, i ppf = monomer_library.pdb_interpretation.process( mon_lib_srv = mon_lib_srv, ener_lib = ener_lib, raw_records = flex.std_string(l[0].splitlines()), force_symmetry = True) geometry = ppf.geometry_restraints_manager( show_energies = False, plain_pairs_radius = 5.0) restraints_manager = mmtbx.restraints.manager( geometry = geometry, normalization = False) ph = ppf.all_chain_proxies.pdb_hierarchy sel = hydrogens.rotatable(pdb_hierarchy=ph, mon_lib_srv=mon_lib_srv, restraints_manager = restraints_manager, log=None) if(debug): print print sel print l[2] print l[0] print "\n".join([a.format_atom_record() for a in ph.atoms()]) ppf.all_chain_proxies.pdb_inp.write_pdb_file(file_name = "m%s.pdb"%str(i)) if(debug): print "-"*80 assert sel == l[2], "%s != %s" % (sel, l[2]) assert hydrogens.count_rotatable(sel) == l[1]
def exercise_02(debug=False): mon_lib_srv = monomer_library.server.server() ener_lib = monomer_library.server.ener_lib() ppf = monomer_library.pdb_interpretation.process( mon_lib_srv = mon_lib_srv, ener_lib = ener_lib, raw_records = flex.std_string(exercise_02_str.splitlines()), force_symmetry = True) geometry = ppf.geometry_restraints_manager( show_energies = False, plain_pairs_radius = 5.0) restraints_manager = mmtbx.restraints.manager( geometry = geometry, normalization = False) ph = ppf.all_chain_proxies.pdb_hierarchy sel = hydrogens.rotatable(pdb_hierarchy=ph, mon_lib_srv=mon_lib_srv, restraints_manager = restraints_manager, log = None) n_rot_h = hydrogens.count_rotatable(sel) assert n_rot_h == 43, n_rot_h