def exercise_2(): model = get_necessary_inputs(pdb_str_2) model = run( args=[], model = model) rotamers = [] for res in model.get_hierarchy().only_chain().only_conformer().residues(): rotamers.append(model.get_rotamer_manager().evaluate_residue(res)) assert rotamers == ['mtt180', 'tttt', 't0', 'pt', 'm', 'pt0', 'm-40', 'EXCEPTION', 'tt', 'tttt'], rotamers
def exercise_1(): """ 58 is outlier """ model = get_necessary_inputs(pdb_str_1) # pdb_h.write_pdb_file("fix_rot_out_ex1_start.pdb") model = run(args=[], model=model) rotamers = [] # pdb_h.write_pdb_file("fix_rot_out_ex1_end.pdb") for res in model.get_hierarchy().only_chain().only_conformer().residues(): rotamers.append(model.get_rotamer_manager().evaluate_residue(res)) # print rotamers assert rotamers == ['m-80', 'p'], rotamers