Hi
I tried to modify the RNA-ligand refinement script for my DNA-ligand
system. I have attached my modified script. However, I am being shown this
error repeatedly-

refine.py(184): import torsionDBPotTools
refine.py(185): torsiondb =
torsionDBPotTools.create_TorsionDBPot(name='torsiondb',system='dna')
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "/Volumes/DATA2/xplor-nih-2.44/python/trace.py", line 180, in run
    exec cmd in dict, dict
  File "<string>", line 1, in <module>
  File "refine.py", line 185, in <module>
    torsiondb =
torsionDBPotTools.create_TorsionDBPot(name='torsiondb',system='dna')
  File "/Volumes/DATA2/xplor-nih-2.44/python/torsionDBPotTools.py", line
606, in create_TorsionDBPot
    filenames = getdbfilepath(system, database, ext)
  File "/Volumes/DATA2/xplor-nih-2.44/python/torsionDBPotTools.py", line
113, in getdbfilepath
    raise Exception, msg
Exception: No files associated to name 'default' in current dir or in
/Volumes/DATA2/xplor-nih-2.44/databases/torsions/dna

Can you please help me address this problem? Thank you for your time.

Regards
Sudakshina Ganguly
Department of Biophysics
Bose Institute
Kolkata, India
#
# Protocol refining an input folded RNA structure in torsion angle space (with
# optional final Cartesian minimization).
#
# This script comprises the following stages:
#  (1) High temperature (sampling) stage, with small force constants for the
#      different energy terms and limited van der Waals-like repulsions.
#  (2) Simulated annealing stage, where force constants are increased.
#  (3) Minimization in torsion angle space.
#  (4) Minimization in Cartesian space (optional).
#
# The experimental restraints consist of distances (from NOEs and hydrogen
# bonds), torsion angles (e.g., from J-couplings), and RDCs.  Additionally,
# planarity restraints are implemented to prevent undue buckling across Watson-
# Crick pairs.
#
# The force field covalent energy terms for bond lengh and angles, and improper
# dihedral angles are supplemented with statistical potentials for torsion
# angles (which reduces backbone conformational outliers) and a base-base
# positional preferences.  This is the so-called RNA-ff1 force field,
# implemented here as originally described in:
# Bermejo et al., Improving NMR Structures of RNA, Structure (2016) 24: 806-815.
#
# This script is intended to serve as a reference for RNA structure calculation,
# allowing the easy removal/addition of experimental energy terms.
#
# Authors: Guillermo A. Bermejo and Charles D. Schwieters.
#


#
# Total number of structures.
#
nstructures = 200


#
# Base name for output PDB files.
# ---
# This string must contain the "STRUCTURE" literal to be replaced by the
# structure number in the PDB filename.  The (optional) "SCRIPT" literal is
# replaced by the name of this file (or stdin if redirected using <).
#
outfilename = 'SCRIPT_STRUCTURE.sa'


#
# Set random seed.
#
import protocol
protocol.initRandomSeed(3421)   # by specific seed number


#
# Read PSF file(s).
#
protocol.initStruct(['D1.psf', 'QC.psf'])

#
# Load paramaters.
# ---
# Read covalent and nonbonded parameters from parameter file(s).
# Note that only covalent parameters for bond lengths and angles, and impropers
# dihedrals are used in this script.  The torsion angle parameters, if any, are
# ommited because they are provided by a statistical potential below.
#
protocol.initParams(['nucleic-2.0.par', 'UNK.par'])


#
# Read input structure.
#
#import glob
#infilename = QCD1.pdb # name of top-ranked struct. from fold.py
protocol.initCoords("QC_D1.pdb")


#
# Create a potList.PotList() to contain the energy terms that will be active
# during structure calculations.
#
from potList import PotList
potList = PotList()


#
# Lists highTempParams and rampedParams will hold simulationTools.StaticRamp and
# simulationTools.MultRamp objects to handle parameter changes between the high
# termperature and annealing stage, and within the annealing stage (e.g., ramped
# force constants).
#
from simulationTools import StaticRamp, MultRamp, InitialParams, AnnealIVM

highTempParams = []
rampedParams = []


# Below, the entire setup of each energy term (including their treatment during
# the high temperature and annealing stages) is performed in self-contained
# sections, so that removal of a term or addition of a new one can be done
# simply by commenting out or adding the corresponding section, respcetively.
    

#
# Set up RDC potential.
#

# List with RDC data.
# ---
# Each entry, a tuple, must contain strings for (in this order): arbitrary name
# for the alignment medium, arbitrary name for the experiment (e.g., "CH" for
# C-H RDCs), and the path of the corresponding restraint table.
#          medium  exp.  table
#rdcData = [('pf1', 'CH', 'dip_all.tbl'),
           # add additional entries here
           

# Orientation tensor(s).
#import varTensorTools
#tensors = {}
#for item in rdcData:
  #  medium = item[0]
   # tensors[medium] = varTensorTools.create_VarTensor(medium)

# RDCs per se.
#import rdcPotTools
##rdcPotTools.correctGyromagneticSigns() # change sign of NH RDCs after scaling
#rdcs = PotList('rdc')
#for (medium, exp, table) in rdcData:
    #name = '%s_%s' % (exp, medium)
    #rdc = rdcPotTools.create_RDCPot(name, table, tensors[medium])
    #rdcPotTools.scale_toCH(rdc)
    #rdcs.append(rdc)
#potList.append(rdcs)
#rampedParams.append(MultRamp(0.05,1.0, "rdcs.setScale(VALUE)"))
    

# Calculate initial tensor orientation and setup tensor calculation during
# simulated annealing.
#for tensor in tensors.keys():  
    #highTempParams.append(StaticRamp(
        #"varTensorTools.calcTensor(tensors['%s'])" % medium))


#
# Set up distance restraint potential (e.g., from NOEs).
#
import noePotTools
noe = PotList('noe')
for (name, scale, table) in [('all', 1, 'noe_check.tbl'),
                             # add entries for more restraint tables here
                             ]:
    pot = noePotTools.create_NOEPot(name, table)
    pot.setPotType("soft") # if you suspect there are bad NOEs
    pot.setScale(scale)
    noe.append(pot)
potList.append(noe)
rampedParams.append(MultRamp(2, 30, "noe.setScale(VALUE)"))


#
# Set up torsion angle restraint potential (e.g., from J-couplings).
#
import xplorPot
dihedralTables = ['D1_dihedral.tbl']
protocol.initDihedrals(dihedralTables)
potList.append(xplorPot.XplorPot('CDIH'))
highTempParams.append(StaticRamp("potList['CDIH'].setScale(10)"))
rampedParams.append(StaticRamp("potList['CDIH'].setScale(200)"))


#
# Set up potential for base-pair planarity restraints.
#
#protocol.initPlanarity('plane.tbl')
#potList.append(xplorPot.XplorPot('PLAN'))
# (The setup of this term remains unchanged throughout; no need to involve
# highTempParams and/or rampedParams.)


#
# Set up statistical torsion angle potential (torsionDB).
#
import torsionDBPotTools
torsiondb = torsionDBPotTools.create_TorsionDBPot(name='torsiondb',system='dna')
potList.append(torsiondb)
rampedParams.append(MultRamp(0.5, 4, "torsiondb.setScale(VALUE)"))

#
# setup parameters for atom-atom repulsive term. (van der Waals-like term)
#
from repelPotTools import create_RepelPot,initRepel
repel = create_RepelPot('repel')
potList.append(repel)
rampedParams.append( StaticRamp("initRepel(repel,use14=False)") )
rampedParams.append( MultRamp(.004,4,  "repel.setScale( VALUE)") )
# nonbonded interaction only between CA atoms
highTempParams.append( StaticRamp("""initRepel(repel,
                                               use14=True,
                                               scale=0.004,
                                               repel=1.2,
                                               moveTol=45,
                                               interactingAtoms="name C1'"
                                               )""") )

# Selected 1-4 interactions.
import torsionDBPotTools
repel14 = torsionDBPotTools.create_Terminal14Pot('repel14')
potList.append(repel14)
highTempParams.append(StaticRamp("repel14.setScale(0)"))
rampedParams.append(MultRamp(0.004, 4, "repel14.setScale(VALUE)"))


#
# Set up bond length potential.
# (Needed even if no Cartesian minimization is used, for "broken" rings.)
#
potList.append(xplorPot.XplorPot('BOND'))
# (The setup of this term remains unchanged throughout; no need to involve
# highTempParams and/or rampedParams.)


#
# Set up bond angle potential.
# (Needed even if no Cartesian minimization is used, for "broken" rings.)
#
potList.append(xplorPot.XplorPot('ANGL'))
rampedParams.append(MultRamp(0.4, 1.0, "potList['ANGL'].setScale(VALUE)"))

#
# Set up improper dihedral angle potential.
# (Needed even if no Cartesian minimization is used, for "broken" rings.)
#
potList.append(xplorPot.XplorPot('IMPR'))
rampedParams.append(MultRamp(0.1, 1.0, "potList['IMPR'].setScale(VALUE)"))


#
# Set up statistical base-base positional potential.
# ---
# The selection argument in initOrie below should select all residues to be
# affected by the potential.
# In this particular example, the small-molecule ligand (residue 34) is ommited,
# along with residue 27, known from preliminary calculations to stick out of the
# structure.  In general, however, all RNA residues should be selected (e.g.,
# for an isolated RNA molecule use selection='all').
# Reference: Clore, GM & Kuszewski, J, (2003) J. Am. Chem. Soc. 125:1518-1525.
#
protocol.initOrie(system='dna', selection='all')
potList.append(xplorPot.XplorPot('ORIE'))
rampedParams.append(MultRamp(0.002,0.3,"xplor.command('orie scale VALUE end')"))

#
# Done with energy terms.

#
# Give atoms uniform weights, except for anisotropy axes (if any).
#
protocol.massSetup()


#
# Set up IVM object(s).
#

# IVM object for torsion-angle dynamics/minimization.
import ivm
dyn = ivm.IVM()

# Make ligand (resid 34) rigid.
#dyn.group('''resid 25 and (name n1 or name c1 or name c2 or name o2
    # or name n3 or name c3 or name c4 or name n9 or name c8
     #or name n7 or name c5 or name c6 or name o6 or name h7)''')

# Orientation tensor setup.
# ---
# If RDCs are not included in the calculations by commenting out their setup
# section above, this set up has to be commented out also.
for tensor in tensors.values():
#    tensor.setFreedom("fixDa, fixRh")  # fix tensor Rh, Da, vary orientation
    tensor.setFreedom("varyDa, varyRh")  # vary tensor Rh, Da, vary orientation

# Argument flexRiboseRing below is a string that selects residues whose ribose
# rings will have all endocyclic angles flexible.  In general, all ribose rings
# should be selected.  In this example, the non-RNA ligand (residue 34) has to
# be excluded.
protocol.torsionTopology(dyn, flexRiboseRing='resid 1:24')


## Optional IVM object for final Cartesian minimization.
##minc = ivm.IVM()
##
##for tensor in tensors.values():
##    tensor.setFreedom("varyDa, varyRh") # allow all tensor parameters float here
##
##protocol.cartesianTopology(minc)



#
# Temperature set up.
#
temp_ini = 3000.0   # initial temperature
temp_fin = 25.0     # final temperature


def calcOneStructure(loopInfo):
    """Calculate a structure.

    """
    #
    # High Temperature Dynamics Stage.
    #

    # Initialize parameters for high temperature dynamics.
    InitialParams(rampedParams)
    InitialParams(highTempParams) # purposedly overides some
                                                  # setups in rampedParams

    # Set up IVM object and run.
    protocol.initDynamics(dyn,
                          potList=potList,
                          bathTemp=temp_ini,
                          initVelocities=1,
                          finalTime=15,   # run for finalTime or 
                          numSteps=15001, # numSteps * 0.001, whichever is less
                          printInterval=100)

    dyn.setETolerance(temp_ini/100) # used to find stepsize (default: temp/1000)

    dyn.run()
                          
    #
    # Simulated Annealing Stage.
    #
    
    # Initialize parameters for annealing.
    InitialParams(rampedParams)

    # Set up IVM object for annealing.
    protocol.initDynamics(dyn,
                          potList=potList,
                          finalTime=0.63,  # run for finalTime or 
                          numSteps=631,   # numSteps * 0.001, whichever is less
                          printInterval=100)    

    # Set up cooling loop and run.
    AnnealIVM(initTemp=temp_ini,
              finalTemp=temp_fin,
              tempStep=12.5,
              ivm=dyn,
              rampedParams=rampedParams).run()

    #
    # Torsion angle minimization.
    #
    protocol.initMinimize(dyn,
                          potList=potList,
                          printInterval=50)
    dyn.run()

##    #
##    # Cartesian minimization (optional).
##    #
##    protocol.initMinimize(minc,
##                          potList=potList,
##                          dEPred=10)
##    minc.run()



from simulationTools import StructureLoop
StructureLoop(numStructures=nstructures,
              pdbFilesIn=infilename,
              pdbTemplate=outfilename,
              doWriteStructures=True,
              structLoopAction=calcOneStructure,
              # Arguments for generating structure statistics:
              genViolationStats=True,
              averageSortPots=[potList['noe'], # terms for structure sorting
                               potList['CDIH'],
                               potList['rdc']],  
              averageTopFraction=0.1,  # top fraction of structs. to report on
              averagePotList=potList,  # terms analyzed
              averageFitSel='not (name H* or resname ANI)',
              ).run()
                              


_______________________________________________
Xplor-nih mailing list
[email protected]
https://dcb.cit.nih.gov/mailman/listinfo/xplor-nih

Reply via email to