Hi,
Generate noe.tbl restraints using “xf”, then you can run XPLOR-NIH.
I asked Gemini to create Xplor-NIH. If you work in NMRbox, it will be seamless.
# --- Updated User-Defined Variables ---
# The DNA sequence (A, C, G, T) is represented by three-letter codes: ADE, CYT, GUA, THY.
seq = "GUA GUA CYT THY ADE THY CYT ADE ADE GUA GUA"
mol_type = "dna"
# --- Potential Definition: NOE Restraints ---
# Note: Spaces are used instead of newlines for separation.
noeTerm = (
'from noePotTools import create_NOEPot; '
'noe = create_NOEPot("noe", "noe.tbl"); '
'noe.setPotType("soft"); '
'potList.append(noe); '
'rampedParams.append(MultRamp(2.0,30.0, "noe.setScale( VALUE )")); '
)
# --- Xplor-NIH Protocol Construction (Flat String) ---
# The f-string now uses the concrete values for seq and mol_type.
xplor_protocol_flat = (
# 1. Initialization and Topology
'import protocol; '
'protocol.initRandomSeed(3421); '
'protocol.initTopology("nucleic-3.1"); '
'protocol.initParams("nucleic-3.1"); '
'import psfGen; '
f'psfGen.seqToPSF("{seq}", seqType="{mol_type}"); ' # <-- Updated with seq and mol_type
'protocol.genExtendedStructure(); '
'from simulationTools import StaticRamp, MultRamp, InitialParams, AnnealIVM; '
'highTempParams = []; '
'rampedParams = []; '
'from potList import PotList; '
'potList = PotList(); '
'crossTerms=PotList("cross terms"); '
# 2. Force Field and Repel Potentials
# Torsion Database
'from torsionDBPotTools import create_TorsionDBPot; '
f'tDB = create_TorsionDBPot("tDB", system="{mol_type}"); ' # <-- Updated with mol_type
'potList.append(tDB); '
'rampedParams.append(MultRamp(0.5, 4, "tDB.setScale(VALUE)")); '
# Repel (van der Waals)
'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)") ); '
'highTempParams.append( StaticRamp("""initRepel(repel, use14=True, scale=0.004, repel=1.2, movetol=45, interactingAtoms="name C1*")""")); '
# Terminal 1-4 Repel
'from torsionDBPotTools import create_Terminal14Pot; '
'repel14 = create_Terminal14Pot("repel14"); '
'potList.append(repel14); '
'highTempParams.append(StaticRamp("repel14.setScale(0)")); '
'rampedParams.append(MultRamp(0.004, 4, "repel14.setScale(VALUE)")); '
# Covalent Potentials (BOND, ANGL, IMPR)
'from xplorPot import XplorPot; '
'potList.append(XplorPot("BOND")); '
'potList.append(XplorPot("ANGL")); '
'rampedParams.append(MultRamp(0.4, 1.0, "potList[\\"ANGL\\"].setScale(VALUE)")); '
'potList.append(XplorPot("IMPR")); '
'rampedParams.append(MultRamp(0.1, 1.0, "potList[\\"IMPR\\"].setScale(VALUE)")); '
# 3. NOE Term (Injected)
f'{noeTerm} '
# 4. Dynamics and Annealing Protocol
'protocol.massSetup(); '
'from ivm import IVM; '
'dyn = IVM(); '
'import monteCarlo; '
'monteCarlo.randomizeTorsions(dyn); '
'protocol.fixupCovalentGeom(maxIters=100, useVDW=1); '
'InitialParams(rampedParams); '
'InitialParams(highTempParams); '
'protocol.initDynamics(dyn, potList=potList, bathTemp=3500, initVelocities=1, finalTime=15, numSteps=15001, printInterval=100); '
'dyn.setETolerance(35); '
'dyn.run(); '
'InitialParams(rampedParams); '
'protocol.initDynamics(dyn, potList=potList, finalTime=0.2, numSteps=201, printInterval=100); '
'AnnealIVM(initTemp=3500, finalTemp=25, tempStep=12.5, ivm=dyn, rampedParams=rampedParams).run(); '
'protocol.initMinimize(dyn, potList=potList, printInterval=50); '
'dyn.run(); '
'protocol.writePDB("thread.pdb")'
)
# --- Final Command to Execute the Script ---
cmd = f"echo '{xplor_protocol_flat}' | xplor -py"
|
[External Email - Use Caution]
|