time_c = time.time() print time_c - time_a #print nonbonded['PROT'] orig_angles = angles orig_bonds = bonds if symm: bonds = go_lib.average_bonded_list(bonds) angles = go_lib.average_bonded_list(angles) nonbonded = go_lib.average_nonbonded_matrix(nonbondedx) dihedrals = dihedrals[chains[0]] else: unmerged_bonds = bonds unmerged_angles = angles unmerged_dihedrals = dihedrals bonds = go_lib.merge_bonded(bonds) angles = go_lib.merge_bonded(angles) dihedrals = go_lib.merge_dihe(dihedrals) if len(Tf) == 1: nonbonded, NSFAC = go_lib.merge_nonbonded_matrix(nonbondedx, xyz, Tf) else: nonbonded, NSFAC = go_lib.merge_nonbonded_matrix( nonbondedx, xyz, Tf[1:]) time_d = time.time() print time_d - time_a #print len(nonbonded['nnc']) if threebodyexcl > 0: threebody = go_lib.merge_threebody_matrix(threebody, xyz) if len(sequence) > 0:
angles_a = go_lib.calc_angles(meta_crd[chains[0]], link) angles_b = go_lib.calc_angles(meta_crd[chains[1]], link) dihedrals_a = go_lib.setup_dihe(meta_crd[chains[0]], link) dihedrals_b = go_lib.setup_dihe(meta_crd[chains[1]], link) nonbonded_a = go_lib.calc_ncon_intra(meta_crd[chains[0]], ngdist, gamma) nonbonded_b = go_lib.calc_ncon_intra(meta_crd[chains[1]], ngdist, gamma) nonbonded_ab = go_lib.calc_ncon_inter(meta_crd[chains[0]], meta_crd[chains[1]], ngdist, gamma) if symm: bonds = go_lib.average_bonded(bonds_a, bonds_b) angles = go_lib.average_bonded(angles_a, angles_b) nonbonded = go_lib.average_nonbonded_intra(nonbonded_a, nonbonded_b) nonbonded_ab_sym = go_lib.symmetrize_nb(nonbonded_ab, nres_tot) dihedrals = dihedrals_a else: bonds = go_lib.merge_bonded(bonds_a, bonds_b) angles = go_lib.merge_bonded(angles_a, angles_b) nonbonded = go_lib.merge_nonbonded(nonbonded_a, nonbonded_b, nonbonded_ab) dihedrals = go_lib.merge_bonded(dihedrals_a, dihedrals_b) go_map,nongo_map, qlist, nat_scale_fac = go_lib.make_go_nongo_map(nonbonded, \ eps_res, nres_tot) go_and_nongo = go_lib.mergemap(go_map, nongo_map) GOMODEL_nbfix = go_lib.gotozero(go_map, nongo_map, nres_tot) # write out parameters # ====================================================================== go_lib.write_parms(outp_base + "_parm.inp", key, bonds, angles, dihedrals, nonbonded['sig'], go_and_nongo, nat_scale_fac, Tf) go_lib.write_parms(outp_base + "_GOMODEL_parm.inp", key, bonds, angles,