Hi Justin,

If the extended conformation is intended as the starting structure for a 
standard folding protocol (where van der Waals interactions are initially very 
limited), there's absolutely no problem in simply using the 
protocol.genExtendedStructure() function. It does everything for you.

However, if for some reason you'd rather use your script, I suggest a couple of 
modifications: (1) after creating the IVM object, configure it for Cartesian 
dynamics/minimization by adding the following line: 
protocol.cartesianTopology(dyn); (2) remove the line 
loopInfo.writeStructure(potList) from calcOneStructure() to avoid writing two 
pdb files with the same coordinates (the argument doWriteStructures=True within 
StructureLoop already specifies the writing).

Best,

Guillermo

 
________________________________________
From: [email protected] [[email protected]] on behalf of Justin Douglas 
[[email protected]]
Sent: Friday, March 18, 2016 12:24 PM
To: Bermejo, Guillermo (NIH/CIT) [E]; [email protected]
Subject: Re: [Xplor-nih] Generate Extended Peptide Structure

Guillermo,

Thanks you.  Your comments were very helpful.

Rather than use the genExtendedStructure() method, I have tried to recreate the 
minimization procedure from the old-school script.  To my eyes, the resulting 
PDB looks reasonable.

(As you are well aware) I don't really know what I'm doing with the python 
interface, but they say 1000 monkeys at 1000 typewriters can produce Hamlet, so 
chipped away at it using the contents of eginput as templates.  My script is 
below for anyone in the future facing the same problem.

Thanks again,

Justin

****



xplor.parseArguments()


# Filename for output structures.  This string must contain the STRUCTURE
# literal so that each calculated structure has a unique name. The SCRIPT
# literal is replaced by this filename (or stdin if redirected using <),
# but it is optional.
#
outFilename = "extended.pdb"


# The protocol module has many high-level helper functions.
import protocol

protocol.initRandomSeed(331)   # set random seed

# Generate PSF from sequence (initialize the correct parameters as side effect!)

seq = "ACE AIB AIB AIB AIB ALA ALA ALA ALA ALA ALA ALA ALA ALA ALA ALA ALA"
import psfGen
psfGen.residueTypes['protein'].append("AIB")

import protocol
protocol.initTopology('protein')
protocol.initParams('protein')

xplor.command("""
topology

 residue AIB
   group
     atom N   type=NH1 charge=-0.36 end
     atom HN  type=H   charge= 0.36 end
   group
     atom CA  type=CT  charge= 0.00 end
   group
     atom CB1  type=CT  charge=-0.30 end
     atom HB11 type=HA  charge= 0.10 end
     atom HB12 type=HA  charge= 0.10 end
     atom HB13 type=HA  charge= 0.10 end
   group
     atom CB2  type=CT  charge=-0.30 end
     atom HB21 type=HA  charge= 0.10 end
     atom HB22 type=HA  charge= 0.10 end
     atom HB23 type=HA  charge= 0.10 end
   group
     atom C   type=C   charge= 0.48 end
     atom O   type=O   charge=-0.48 end

   bond N  HN
   bond N  CA
   bond CA  CB1   bond CB1  HB11   bond CB1  HB12     bond CB1  HB13
   bond CA  CB2   bond CB2  HB21   bond CB2  HB22     bond CB2  HB23
   bond CA  C
   bond C   O

   improper HB11 HB12 CA HB13  !stereo CB1
   improper HB21 HB22 CA HB23  !stereo CB2


end

end
""")

psfGen.seqToPSF(seq,amidate_cterm=True,startResid=0)

protocol.genExtendedStructure()

from potList import PotList
potList = PotList()

from xplorPot import XplorPot

potList.append( XplorPot('VDW') )
potList.append( XplorPot("BOND") )
potList.append( XplorPot("ANGL") )
potList.append( XplorPot("IMPR") )
potList.append( XplorPot("ELEC") )

protocol.massSetup()

from ivm import IVM

dyn = IVM()


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

    protocol.initNBond(cutnb=5.5,
                       rcon=20.0,
                       nbxmod=2,
                       repel=0.9)
    potList.removeAll()
    potList.append( XplorPot("BOND"))
    potList.append( XplorPot("ANGL"))
    potList.append( XplorPot("VDW"))

    protocol.initMinimize(dyn,
                          potList,
                          printInterval=10,
                          numSteps=50)

    dyn.run()

    potList.append( XplorPot("IMPR"))

    protocol.initMinimize(dyn,
                          potList,
                          printInterval=10,
                          numSteps=50)

    dyn.run()

    protocol.initDynamics(dyn,
                          bathTemp = 300.0,
                          numSteps = 50,
                          stepsize = 0.001,
                          potList = potList,
                          printInterval=50)

    dyn.run()

    protocol.initNBond(rcon=2.0,
                       nbxmod=3,
                       repel=0.75)

    dyn.run()

    protocol.initMinimize(dyn,
                          potList,
                          printInterval=25,
                          numSteps=100)
    dyn.run()

    protocol.initDynamics(dyn,
                          bathTemp = 300.0,
                          numSteps = 500,
                          stepsize = 0.005,
                          potList = potList,
                          printInterval=100)

    dyn.run()

    potList.append( XplorPot("ELEC"))
    protocol.initMinimize(dyn,
                          potList,
                          printInterval=50,
                          numSteps=200)

    dyn.run()

    loopInfo.writeStructure(potList)
    pass


from simulationTools import StructureLoop
StructureLoop(numStructures=1,
              doWriteStructures=True,
              pdbTemplate=outFilename,
              structLoopAction=calcOneStructure,
              ).run()


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

Reply via email to