Hello,

I would like to use a refinement protocol against ensembles of different 
sizes (2, 4 ,6, 8, 10) for a multidomain protein (a tandem of SH2s 
domains, one SH3 and one splitPH domain separated by flexible linkers).
I'm using restraints from SAXS intensities and chemical shift 
perturbations for the interaction surface between the splitPH and one of 
the SH2 domains.
When I run the script below, which has been adapted from SAXS_EI 
protocol in the eginput xplor-nih2.29 directory, XPLOR crashes at 
different stages of the protocol generating a number of error messages 
(such as : /dms/prog/src/xplor-nih/bin/xplor: line 525:  1401 
Segmentation fault).
Does anyone have any suggestion on how to solve this problem? Thanks for 
your help.


numberOfStructures = 2 #number of structure to calculate

import protocol
protocol.initRandomSeed(63342)

from glob import glob
startStructures=glob("dock_*.pdb")

ensembleSize = 2 # 2, 4, 6, 8, 10 members

import simulation
sim = xplor.simulation

pdbTemplate="SCRIPT_%d_STRUCTURE_MEMBER.fit" % ensembleSize

# create Simulation with ensembleSize ensemble members
from ensembleSimulation import EnsembleSimulation
esim = EnsembleSimulation("ensemble",ensembleSize)

protocol.loadPDB("SA.pdb",deleteUnknownAtoms=True) # generate psf from 
starting structure

splitPH  = "resid 488:521 or resid 874:933"
SH3 = "resid 790:852"
SH2s = "resid 549:768"
SASel = "resid 488:521 or resid 549:768 or resid 790:852 or resid 874:933"

# splitPH/SH2 perturbed residues
spPHsc = "((resid 489:490 or resid 493 or resid 502 or resid 506 or 
resid 508:509 or resid 511 or resid 518:521 or resid 874:876) and (not 
(name n or name c or name ca or name o or name hn or name ha)))"
cSH2sc = "((resid 668:671 or resid 694:695 or resid 702 or resid 718:723 
or resid 726 or resid 730 or resid 732:733) and (not (name n or name c 
or name ca or name o or name hn or name ha)))"

from potList import PotList
potList = PotList()
crossTerms=PotList('cross terms')

crossTerms=PotList('cross terms')
from simulationTools import StaticRamp, MultRamp
from simulationTools import InitialParams, FinalParams
rampedParams=[]
highTempParams=[]

from avePot import AvePot
from xplorPot import XplorPot

# set up NOE potential
noe=PotList('NOE')
potList.append(noe)
from noePotTools import create_NOEPot
for (name,scale,file) in [('inte',1,"interface.tbl"),
                           ]:
     pot = AvePot(create_NOEPot(name,file))
     pot.setAveType("sum")
     pot.setPotType("soft") # - if you think there may be bad NOEs
     pot.setScale(scale)
     noe.append(pot)
rampedParams.append( MultRamp(2,100, "noe.setScale( VALUE )") )

# setup parameters for atom-atom repulsive term. (van der Waals-like term)
vdw = AvePot(XplorPot, "VDW")
potList.append(vdw)
rampedParams.append( StaticRamp("""protocol.initNBond()""") )
rampedParams.append( MultRamp(0.9,0.8,
                         "xplor.command('param nbonds repel VALUE end 
end')") )
rampedParams.append( MultRamp(.004,4,
                         "xplor.command('param nbonds rcon VALUE end 
end')") )
highTempParams.append( StaticRamp("""protocol.initNBond(rcon=0.1,
                                                         repel=1.2,
                                                         onlyCA=1)""") )

from solnXRayPotTools import create_solnXRayPot
import solnXRayPotTools
xray=create_solnXRayPot('xray',experiment='saxs.data',
                         numPoints=30, # originally used 100 points
                         maxQ=0.2,
                         normalizeIndex=-3,preweighted=False)

xrayCorrect=create_solnXRayPot('xray-c',experiment='saxs.data',
                                numPoints=30,
                                maxQ=0.2,
                                normalizeIndex=-3,preweighted=False)

solnXRayPotTools.useGlobs(xray)

xray.setNumAngles(50)
xrayCorrect.setNumAngles(500)
xray.setScale(400)
xray.setCmpType("plain")
potList.append(xray)
crossTerms.append(xrayCorrect)

print xray.calcEnergy()
from solnScatPotTools import fitParams

#corrects I(q) to higher accuracy, and include solvent contribution 
corrections
rampedParams.append( StaticRamp("fitParams(xrayCorrect)") )
rampedParams.append( 
StaticRamp("xray.calcGlobCorrect(xrayCorrect.calcd())") )

# Ratio of gyration potential
protocol.initCollapse("resid 488:933",
                       Rtarget=32) # approximate value from Guinier analysis
rgyr = AvePot(XplorPot, 'COLL')
potList.append(rgyr)


#RAP term to keep members of ensemble in similar orientations
from posRMSDPotTools import RAPPot
rap = RAPPot("rap","(name ca and resid 488:933)")
rap.setScale( 100.0 )
rap.setPotType( "square" )
rap.setTol( 25.0 ) #25A square well potential for members orientations
potList.append(rap)
crossTerms.append(rap)

#measure of difference between ensemble members
posRMSD = RAPPot("posRMSD","""(name ca and resid 488:933)""")
crossTerms.append(posRMSD)

#Xplor potentials
protocol.initRamaDatabase(type='protein')
rama = AvePot(XplorPot,'RAMA')
potList.append(rama)
rampedParams.append( MultRamp(.002,1,"potList['RAMA'].setScale(VALUE)") )

bond = AvePot(XplorPot,"BOND")
potList.append(bond)

angl = AvePot(XplorPot,"ANGL")
potList.append(angl)
rampedParams.append( MultRamp(0.4,1,"potList['ANGL'].setScale(VALUE)") )

impr = AvePot(XplorPot,"IMPR")
potList.append(impr)
rampedParams.append( MultRamp(0.1,1,"potList['IMPR'].setScale(VALUE)") )

protocol.massSetup()

from ivm import IVM
dynRigid = IVM()

dynRigid.fix("(%s) and not (%s)" % (SH2s,cSH2sc))
dynRigid.group("(%s) and not (%s)" % (splitPH,spPHsc)) #leaves the 
perturbed sc free
dynRigid.group("(%s)" % SH3)

protocol.torsionTopology(dynRigid)

from simulationTools import AnnealIVM
init_t  = 3000
cool = AnnealIVM(initTemp =init_t,
                  finalTemp=25,
                  tempStep =25,
                  ivm=dynRigid,
                  rampedParams = rampedParams)


def calcOneStructure(loopInfo):
     """ this function calculates a single structure, performs analysis 
on the
     structure, and then writes out a pdb file, with remarks.
     """

     InitialParams( rampedParams )
     InitialParams( highTempParams )

     #initial minimization
     protocol.initMinimize(dynRigid,
                           potList=potList,
                           numSteps=1000,
                           printInterval=200)
     dynRigid.run()

     #high-temp dynamics
     protocol.initDynamics(dynRigid,
                           potList=potList,
                           bathTemp=init_t,
                           initVelocities=1,
                           finalTime=800,   # stops at 800ps or 8000 steps
                           numSteps=8000,   # whichever comes first
                           printInterval=200)

     dynRigid.setETolerance( init_t/100 )  #used to det. stepsize. 
default: t/1000
     dynRigid.run()

     # initialize parameters for cooling loop
     InitialParams( rampedParams )

     # initialize integrator for simulated annealing
     #
     protocol.initDynamics(dynRigid,
                           potList=potList,
                           numSteps=100,       #at each temp: 100 steps or
                           finalTime=.2 ,       # .2ps, whichever is less
                           printInterval=100)

     # perform simulated annealing
     #
     cool.run()

     # final torsion angle minimization
     #
     protocol.initMinimize(dynRigid)
     dynRigid.run()

     #do analysis and write structure
     loopInfo.writeStructure(potList)
     pass

from simulationTools import StructureLoop, FinalParams
StructureLoop(numStructures=numberOfStructures,
               pdbTemplate=pdbTemplate,
               structLoopAction=calcOneStructure,
               genViolationStats=True,
               averageFilename="SCRIPT_ave.pdb",
               averageRegularize=False,
               averagePotList=potList,
               averageCrossTerms=crossTerms,
               averageTopNum=20, #report on the top 20 structs
               averageFitSel="name CA and (%s)" % SH2s,
               averageContext=FinalParams(rampedParams)).run()


-- 
Dr Diego Esposito
Division of Molecular Structure
The National Institute for Medical Research
The Ridgeway, Mill Hill
London, NW7 1AA, United Kingdom
Tel off    +44 (0)20 88162066
Tel lab   +44 (0)20 88162145
Fax    +44 (0)20 88162734
Fax    +44 (0)20 89064477

Reply via email to