コード例 #1
0
    def __init__(self,number,basedir,mode,forward,forwardpart,interface = -1):
        self.number = number
        self.interface = interface
        self.options = options.gromacstpsoptions(basedir,mode)

        
        #self.crossingHisto = crossinghistogram.crossinghisto(1000, -2.0, 2.0,forward)
        self.tisaccepted = False
        self.tpsaccepted = False
        self.fullTrajectory = []
        self.fullTrajectoryblength = 0
        self.fullTrajectoryflength = 0
        
        self.lastAcceptedFullTrajectory = []
        self.lastAcceptedFullTrajectoryblength = 0
        self.lastAcceptedFullTrajectoryflength = 0
        
        self.lastAcceptedDirString = 0
        
        # shooting time is the shooting position in the last accepted trajectory
        self.shootingTime = 0
        
        self.options.readOptions(os.path.join(basedir,"options","runoptions.txt"), self.options.mdpoptions)
        self.options.readOptions(os.path.join(basedir,"options","runoptions.txt"), self.options.runoptions)
        
        self.forward = forward
        self.forwardpart = forwardpart
        self.finishedState = -1
        self.srcatchbase = os.path.join(self.options.paths["scratchpath"],"GTIS")
        if self.forward:
            self.nfsbaseworkdir = os.path.join(self.options.paths["initialpath"],"f%02d" % (number,))
            self.nfsladir = os.path.join(self.options.paths["initialpath"],"la/f%02d" % (number,))
            self.nfsalldir = os.path.join(self.options.paths["initialpath"],"all/f%02d" % (number,))
            
            self.baseworkdir = os.path.join(self.options.paths["scratchpath"],"GTIS/f%02d" % (number,))
            self.ladir = os.path.join(self.options.paths["scratchpath"],"GTIS/la/f%02d" % (number,))
            self.alldir = os.path.join(self.options.paths["scratchpath"],"GTIS/all/f%02d" % (number,))
            
        else:
            self.nfsbaseworkdir = os.path.join(self.options.paths["initialpath"],"b%02d" % (number,))
            self.nfsladir = os.path.join(self.options.paths["initialpath"],"la/b%02d" % (number,))
            self.nfsalldir = os.path.join(self.options.paths["initialpath"],"all/b%02d" % (number,))
            
            self.baseworkdir = os.path.join(self.options.paths["scratchpath"],"GTIS/b%02d" % (number,))
            self.ladir = os.path.join(self.options.paths["scratchpath"],"GTIS/la/b%02d" % (number,))
            self.alldir = os.path.join(self.options.paths["scratchpath"],"GTIS/all/b%02d" % (number,))
        
        
        
        if self.forwardpart:
            self.workdir = os.path.join(self.baseworkdir,"forward")
        else:
            self.workdir = os.path.join(self.baseworkdir,"backward")
        self.latemp = os.path.join(self.workdir,"latemp")
コード例 #2
0
 def __init__(self,number,basedir,mode,forward,forwardpart,interface = -1,state=0):
     self.number = number
     self.interface = interface
     self.options = options.gromacstpsoptions(basedir,mode)
     
     #self.crossingHisto = crossinghistogram.crossinghisto(1000, -1.5, 1.5,forward)
     self.tisaccepted = False
     self.fullTrajectory = []
     self.fullTrajectoryblength = 0
     self.fullTrajectoryflength = 0
     
     self.lastAcceptedFullTrajectory = []
     self.lastAcceptedFullTrajectoryblength = 0
     self.lastAcceptedFullTrajectoryflength = 0
     
     # shooting time is the shooting position in the last accepted trajectory
     self.shootingTime = 0
     
     self.options.readOptions(os.path.join(basedir,"options","runoptions.txt"), self.options.mdpoptions)
     self.options.readOptions(os.path.join(basedir,"options","runoptions.txt"), self.options.runoptions)
     
     self.forward = forward
     self.forwardpart = forwardpart
     self.finishedState = -1
     self.state = state
     
     self.status = 0
     
     if state == 0:
         namepart = "stateA" 
     else:
         namepart = "stateB"
     
     
     self.srcatchbase = os.path.join(self.options.paths["scratchpath"],"GTIS")
     if self.forward:
         self.nfsbaseworkdir = os.path.join(self.options.paths["initialpath"],namepart)
         self.nfsladir = os.path.join(self.options.paths["initialpath"],"la/"+namepart)
         self.nfsalldir = os.path.join(self.options.paths["initialpath"],"all/"+namepart)
         
         self.baseworkdir = os.path.join(self.options.paths["scratchpath"],"GTIS/"+namepart)
         self.ladir = os.path.join(self.options.paths["scratchpath"],"GTIS/la/"+namepart)
         self.alldir = os.path.join(self.options.paths["scratchpath"],"GTIS/all/"+namepart)
         
     else:
         print "Stable State is always forward"
     
     if self.forwardpart:
         self.workdir = os.path.join(self.baseworkdir,"forward")
     else:
         print "Stable State simulation has only forward part"
     self.nfsconfigstore = os.path.join(self.nfsladir,"startconfs")
     self.latemp = os.path.join(self.workdir,"latemp")