# calculate parameters # ====================================================================== link = 0 eps_res = 0.0054 * Tf bonds_a = go_lib.calc_bonds(meta_crd[chains[0]], link) bonds_b = go_lib.calc_bonds(meta_crd[chains[1]], link) 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)
nresi) threebody[chaini][chaini] = go_lib.calc_threebody_intra(meta_crd[chaini], \ inte3, threebodyexcl) print len(threebody[chaini][chaini].keys()) # # inter-subunit contacts for j in range(i + 1, nchain): chainj = chains[j] if ignore_inter: # null intermolecular contacts nonbondedx[chaini][chainj] = { 'nc': {}, 'nnc': {}, 'hb': {}, 'siga': {}, \ 'sigb': {} } else: if aacut < 0.0: # do K&B nonbondedx[chaini][chainj] = go_lib.calc_ncon_inter(meta_crd[chaini], \ meta_crd[chainj], \ ngdist, gamma, geomh, fixrep) else: nonbondedx[chaini][chainj] = go_lib.calc_ncon_inter_simplecut(meta_crd[chaini], \ meta_crd[chainj], \ ngdist, gamma, fixrep, aacut) if kh == 1: khmap[chaini][chainj] = go_lib.calc_kh_inter( meta_crd[chaini], meta_crd[chainj], E0, LAMBDA) if len(crowdprot) > 0: bb_bonds_crow = go_lib.calc_bonds(meta_crd_crowd[crowd_chain], link) if (defbon == 1 or len(sequence) > 0): bb_bonds_crow = map(lambda x: (x[0], x[1], go_lib.std_bond), bb_bonds) bb_angles_crow = go_lib.calc_angles(meta_crd_crowd[crowd_chain], link, stata)
bonds = {} angles = {} dihedrals = {} nonbonded = {} for i in range(nchain): chaini = chains[i] bonds[chaini] = go_lib.calc_bonds(meta_crd[chaini], link) angles[chaini] = go_lib.calc_angles(meta_crd[chaini], link) dihedrals[chaini] = go_lib.setup_dihe(meta_crd[chaini], link) nonbonded[chaini] = {} nonbonded[chaini][chaini] = go_lib.calc_ncon_intra(meta_crd[chaini], ngdist, gamma) for j in range(i + 1, nchain): chainj = chains[j] nonbonded[chaini][chainj] = go_lib.calc_ncon_inter( meta_crd[chaini], meta_crd[chainj], ngdist, gamma) #bonds = go_lib.average_bonded_list(bonds) #print nonbonded.keys() #print nonbonded['A'.keys() #print nonbonded.keys() #print "inter" #x = nonbonded['A ']['B '] #nbx = x['nc'] #for k in nbx.keys(): # print k[0],k[1],nbx[k][0], nbx[k][1] # #print "intra" #x = nonbonded['A ']['A ']