#for all calculations, allow the full alignment tensor to float for m in tensors: # m.setFreedom("fixDa, fixRh") #fix tensor Rh, Da, vary orientation m.setFreedom("varyDa, varyRh") #vary tensor Rh, Da, vary orientation from xplorPot import XplorPot from torsionPotTools import Xplor_readNEF try: Xplor_readNEF(nefData) except Exception as e: if not e.args[0].startswith('getBlock: could find no saveset'): print("Warning: no dihedral table read") raise pass pot = XplorPot('CDIH') pot.setThreshold(5) potList.append(XplorPot('CDIH')) highTempParams.append(StaticRamp("potList['CDIH'].setScale(10)")) rampedParams.append(StaticRamp("potList['CDIH'].setScale(200)")) if isDimer: # this assumes the two subunits have segids A and B: from distSymmTools import create_DistSymmPot, genDimerRestraints from selectTools import minResid, maxResid minResid = minResid("segid A") maxResid = maxResid("segid A") dSymm = create_DistSymmPot(
## no J couplings ## # set up J coupling - with Karplus coefficients ##from jCoupPotTools import create_JCoupPot ##jCoup = create_JCoupPot("jcoup","jna_coup.tbl", ## A=6.98,B=-1.38,C=1.72,phase=-60.0) ##potList.append(jCoup) # Set up dihedral angles from xplorPot import XplorPot dihedralRestraintFilename = "dihe_ss_1pga.tbl" ## modify, and check that if works if dihedral angles are incomplete ## protocol.initDihedrals( dihedralRestraintFilename, #useDefaults=False # by default, symmetric sidechain # restraints are included ) potList.append(XplorPot('CDIH')) highTempParams.append(StaticRamp("potList['CDIH'].setScale(10)")) rampedParams.append(StaticRamp("potList['CDIH'].setScale(200)")) # set custom values of threshold values for violation calculation # potList['CDIH'].setThreshold(5) # gyration volume term # from gyrPotTools import create_GyrPot gyr = create_GyrPot("Vgyr", "resid 1:56") # selection should exclude disordered tails potList.append(gyr) rampedParams.append(MultRamp(.002, 1, "gyr.setScale(VALUE)")) ## what is this exactly doing?? ##
potList.append(noe) from noePotTools import create_NOEPot for (name,scale,file) in [('all',1,"constraints/yourfolder/yourfoldernoe.tbl"), #add entries for additional tables ]: pot = create_NOEPot(name,file) # pot.setPotType("soft") - if you think there may be bad NOEs pot.setScale(scale) noe.append(pot) rampedParams.append( MultRamp(2,30, "noe.setScale( VALUE )") ) # Set up dihedral angles from xplorPot import XplorPot protocol.initDihedrals("constraints/yourfolder/yourfolder_dihed_g_all.tbl", useDefaults=False) potList.append( XplorPot('CDIH') ) rampedParams.append( StaticRamp("potList['CDIH'].setScale(200)") ) from simulationTools import StructureLoop def calcOneStructure( structData ): from waterRefineTools import refine refine(outFilename=structData.filename(), potList=potList, coolingParams=rampedParams, # keepWaters=True, waterResname=waterResname) pass
pot.setScale(scale) noe.append(pot) rampedParams.append(MultRamp(2, 30, "noe.setScale( VALUE )")) # set up J coupling - with Karplus coefficients #jCoup = create_JCoupPot("jcoup","jna_coup.tbl", # A=6.98,B=-1.38,C=1.72,phase=-60.0) #potList.append(jCoup) # Set up dihedral angles protocol.initDihedrals( "%s_dih.tbl" % pname, #useDefaults=False # by default, symmetric sidechain # restraints are included ) potList.append(XplorPot('CDIH')) highTempParams.append(StaticRamp("potList['CDIH'].setScale(10)")) rampedParams.append(StaticRamp("potList['CDIH'].setScale(200)")) # set custom values of threshold values for violation calculation # potList['CDIH'].setThreshold(5) # radius of gyration term # #protocol.initCollapse("resid -999:999", # Rtarget=10.16) #potList.append( XplorPot('COLL') ) # hbda - distance/angle bb hbond term # #protocol.initHBDA('hbda.tbl')
# set up NOE potential noe = create_NOEPot("noe", file=noeFilename) noe.setPotType("soft") noe.setRSwitch(0.5) noe.setAsympSlope(1.) noe.setSoftExp(1.) noe.setThreshold(0.5) print noe.info() potList.append(noe) # Set up dihedral angles protocol.initDihedrals( dihFilename, scale=5, #initial force constant useDefaults=0) potList.append(XplorPot('CDIH')) # # setup parameters for atom-atom repulsive term. (van der Waals-like term) # protocol.initNBond( nbxmod=4, # Can use 4 here, due to IVM dynamic repel=0.5) # initial effective atom radius potList.append(XplorPot('VDW')) # # annealing settings # init_t = 3500. # Need high temp and slow annealing to converge final_t = 100