Exemplo n.º 1
0
      argument = arg.split("=")
      if argument[0] == "basedir":
          basedir = argument[1]
      elif argument[0] == "mode":
          mode = argument[1]
      elif argument[0] == "dirnumber":
          dirnumber = int(float(argument[1]))
      else:
          print "argument should be one of those: basedir,mode, startwith,rstartwith,runs"
 
  if basedir !="":
      if mode == 'initial':
          dirstring = "%07d" % (dirnumber,)
          newdirstring = "%07d" % (dirnumber + 1,)
          
          sim = gtis.gromacstis(basedir,"tis",kernel="reverse")
          sim.preperationReverse()
          sim.shootingQueueReverse()
          sim.finalizeReverse(dirstring,newdirstring)
          for i in range(len(sim.reversePaths)):
              sim.getFullTrajectoryReverse(i, newdirstring)
              sim.reversePaths[i].lastAcceptedFullTrajectory = sim.reversePpaths[i].fullTrajectory[:]
          sim.outputAllFullTrajectoriesReverse(newdirstring)
          
          sim.deleteScratchFiles()
          
      elif mode == 'tis':
          sim = gtis.gromacstis(basedir,"tis",kernel="reverse")
          dirstring = "%07d" % (dirnumber,)
          newdirstring = "%07d" % (dirnumber + 1,)
          
Exemplo n.º 2
0
        argument = arg.split("=")
        if argument[0] == "basedir":
            basedir = argument[1]
        elif argument[0] == "mode":
            mode = argument[1]
        elif argument[0] == "dirnumber":
            dirnumber = int(float(argument[1]))
        else:
            print "argument should be one of those: basedir,mode, startwith,rstartwith,runs"

    if basedir != "":
        if mode == 'initial':
            dirstring = "%07d" % (dirnumber, )
            newdirstring = "%07d" % (dirnumber + 1, )

            sim = gtis.gromacstis(basedir, "tis", kernel="reverse")
            sim.preperationReverse()
            sim.shootingQueueReverse()
            sim.finalizeReverse(dirstring, newdirstring)
            for i in range(len(sim.reversePaths)):
                sim.getFullTrajectoryReverse(i, newdirstring)
                sim.reversePaths[
                    i].lastAcceptedFullTrajectory = sim.reversePpaths[
                        i].fullTrajectory[:]
            sim.outputAllFullTrajectoriesReverse(newdirstring)

            sim.deleteScratchFiles()

        elif mode == 'tis':
            sim = gtis.gromacstis(basedir, "tis", kernel="reverse")
            dirstring = "%07d" % (dirnumber, )
Exemplo n.º 3
0
        if argument[0] == "basedir":
            basedir = argument[1]
        elif argument[0] == "mode":
            mode = argument[1]
        elif argument[0] == "startwith":
            dirnumber = int(float(argument[1]))
        elif argument[0] == "rstartwith":
            rdirnumber = int(float(argument[1]))
        elif argument[0] == "runs":
            runs = int(float(argument[1]))
        else:
            print "Arguments should be one of those: basedir, mode, startwith, rstartwith, runs"

    if basedir != "":
        if mode == 'initial':
            sim = gtis.gromacstis(basedir, "initial", kernel="head")
            for i in range(sim.kernels.nkernels):
                pythonpath = sim.paths[0].options.paths["pythonpath"]
                mqsubs = sim.paths[0].options.runoptions["qsubsystem"]
                mwalltime = sim.paths[0].options.runoptions["qsubwalltime"]

                filename = sim.qsubsystem.writeKernelQsubFile(
                    basedir,
                    i,
                    pythonpath,
                    "initial",
                    0,
                    qsubs=mqsubs,
                    walltime=mwalltime)

                if mqsubs == "LL":
  for arg in sys.argv[1:]:
      argument = arg.split("=")
      if argument[0] == "basedir":
          basedir = argument[1]
      elif argument[0] == "mode":
          mode = argument[1]
      elif argument[0] == "dirnumber":
          dirnumber = int(float(argument[1]))
      elif argument[0] == "kernel":
          kernel = int(float(argument[1]))
      else:
          print "argument should be one of those: basedir,mode, startwith,rstartwith,runs"
 
  if basedir != "":
      if mode == 'initial':
          sim = gtis.gromacstis(basedir,"initial",kernel)
          successfull = [False for x in sim.kernels.kernelPaths]
          k = 0
          while(True):
              sim.preperationFromStart()
              sim.shootingInitialGroFiles()
              sim.shootingQueue()
              sim.checkAllTisPathsAccepted()
              sim.finalizeInitial()
              
              for i in range(len(sim.kernels.kernelPaths)):
                  if sim.paths[i].tisaccepted:
                      successfull[i] = True
              print k, successfull
              if all(successfull):
                  break
Exemplo n.º 5
0
'''
Created on May 3, 2010

@author: Wolfgang Lechner 
'''
import pygromacstps.tis as gtis
import sys

if __name__ == '__main__':

    if len(sys.argv) == 1:
        print 'excepted parameters are "initial" and "tis"'
    else:
        if sys.argv[1] == 'initial':
            sim = gtis.gromacstis("/home/cpd/wolf/membranes/firsttis",
                                  "initial")
            sim.preperationFromStart()
            sim.reverseBackwardGroFile()
            for i in range(10):
                sim.shootingGroFile()
                sim.shootingQueue()
                sim.finalizeShooting("%07d" % i)
        elif sys.argv[1] == 'tis':
            sim = gtis.gromacstis("/home/cpd/wolf/membranes/firsttis", "tis")

            sim.getStartTrajectories()
            #sim.trialReplicaExchange("0000000")
            sim.preperationTIS()
            sim.lastAcceptedToGro("start")
            sim.pickConfigurationsTIS("start")
            sim.shootingQueue()
Exemplo n.º 6
0
'''
Created on May 3, 2010

@author: Wolfgang Lechner 
'''
import pygromacstps.tis as gtis
import sys

if __name__ == '__main__':
    
    if len(sys.argv) == 1:
        print 'excepted parameters are "initial" and "tis"'
    else:
        if sys.argv[1] == 'initial': 
            sim = gtis.gromacstis("/home/cpd/wolf/membranes/firsttis","initial")
            sim.preperationFromStart()
            sim.reverseBackwardGroFile()
            for i in range(10):
                sim.shootingGroFile()
                sim.shootingQueue()
                sim.finalizeShooting("%07d" % i)
        elif sys.argv[1] == 'tis':
            sim = gtis.gromacstis("/home/cpd/wolf/membranes/firsttis","tis")
            
            sim.getStartTrajectories()
            #sim.trialReplicaExchange("0000000")
            sim.preperationTIS()
            sim.lastAcceptedToGro("start")
            sim.pickConfigurationsTIS("start")
            sim.shootingQueue()
            sim.checkAllTisPathsAccepted()