Ejemplo n.º 1
0
 def __init__(self,basedir=".",mode="initial",cores=-1):
     self.basedir = basedir
     self.mode = mode
     self.lastAcceptedPath = "start"
     if cores == -1:
         self.cores = multiprocessing.cpu_count()
     else:
         self.cores = cores
     self.wrapper = wrappers.gromacswrapper()
     self.distparser = parser.gdistparser()
     self.filesystem = filesystem.filesystem()
     self.interfaces = interfaces.interfaces()
     self.stablestates = stablestates.stablestates()
     self.helper = helpers.helpers()
     #Initialize the logger
     self.log = gtpslogging.log("debug",basedir)
     self.log.log.debug("logfile created")
     self.log.log.info(str(self.cores) + " CPUs detected")
     
     #read the stables states from a file
     self.stablestates.readStates(os.path.join(basedir,"stablestates.txt"))
     self.log.log.info("Read States : " + str(self.stablestates.states))
     
     """
     This array holds all the information about the paths. Each trajectory consists of a 
     forward-part and a backward-part. The trajectory can either be a forward trajectory
     or a backward trajectory. Forward trajectroies start in A.
     """
     self.paths = []
     self.paths.append(pathsimulation.pathdata(0,basedir,mode,forward=True,forwardpart=True))
     self.paths.append(pathsimulation.pathdata(0,basedir,mode,forward=True,forwardpart=False))
Ejemplo n.º 2
0
 def __init__(self,basedir=".",mode="initial",kernel=0):
     self.basedir = basedir
     self.mode = mode
     self.cores = multiprocessing.cpu_count()
     self.wrapper = wrappers.gromacswrapper()
     self.distparser = parser.gdistparser()
     self.filesystem = filesystem.filesystem()
     self.helper = helpers.helpers()
     self.kernels = kernels.kernels(kernel)
     self.qsubsystem = qsubsystem.qsubsystem()
     
     #Initialize the logger
     if kernel=="head":
         self.log = gtpslogging.log("info",basedir,kernel)
     else:
         self.log = gtpslogging.log("debug",basedir,kernel)
     self.log.log.debug("logfile created")
     self.log.log.info(str(self.cores) + " CPUs detected")
     
     self.kernels.readKernelOptions(os.path.join(basedir,"options","kerneloptions.txt"))
     
     #read the stables states from a file
     self.stablestates.readStates(os.path.join(basedir,"options","stablestates.txt"))
     self.log.log.info("Read States : " + str(self.stablestates.states))
     
     """
     This array holds all the information about the paths. Each trajectory consists of a 
     forward-part and a backward-part. The trajectory can either be a forward trajectory
     or a backward trajectory. Forward trajectroies start in A.
     """
     
     self.paths = []
     self.npaths = 0
     for i in range(self.kernels.ntps):
         self.paths.append(pathdata.pathdata(i,basedir,mode,forward=True,forwardpart=True,interface=0))
         self.paths.append(pathdata.pathdata(i,basedir,mode,forward=True,forwardpart=False,interface=0))
         self.npaths += 1
     
     self.kernels.generateKernelLists(self.npaths)
Ejemplo n.º 3
0
 def __init__(self,basedir=".",mode="initial",kernel=0):
     self.basedir = basedir
     self.mode = mode
     self.cores = multiprocessing.cpu_count()
     self.wrapper = wrappers.gromacswrapper()
     self.distparser = parser.gdistparser()
     self.filesystem = filesystem.filesystem()
     self.interfaces = interfaces.interfaces()
     self.orderparameters = orderparameters.orderparameters()
     self.helper = helpers.helpers()
     self.kernels = kernels.kernels(kernel)
     self.qsubsystem = qsubsystem.qsubsystem()
     
     #Initialize the logger
     if kernel=="head":
         self.log = gtpslogging.log("info",basedir,kernel)
     elif kernel=="reverse":
         self.log = gtpslogging.log("info",basedir,kernel)   
     else:
         self.log = gtpslogging.log("info",basedir,kernel)
     
     self.log.log.debug("logfile created")
     self.log.log.info(str(self.cores) + " CPUs detected")
     
     self.interfaces.readInterfaces(os.path.join(basedir,"options","interfaces.txt"))
     self.log.log.info("Read Interfaces Forward : " + str(self.interfaces.interfaces[0]))
     self.log.log.info("Read Interfaces Backward : " + str(self.interfaces.interfaces[1]))
     
     self.kernels.readKernelOptions(os.path.join(basedir,"options","kerneloptions.txt"))
     
     #read the stables states from a file
     self.orderparameters.readOP(os.path.join(basedir,"options","orderparameters.txt"))
     self.log.log.info("Read OP : " + str(self.orderparameters.op[0]))
     
     
     """
     This array holds all the information about the paths. Each trajectory consists of a 
     forward-part and a backward-part. The trajectory can either be a forward trajectory
     or a backward trajectory. Forward trajectroies start in A.
     """
     
     self.paths = []
     self.npaths = 0
     for i in range(self.interfaces.ninterfaces[0]):
         self.paths.append(pathdata.pathdata(i,basedir,mode,forward=True,forwardpart=True,interface=self.interfaces.interfaces[0][i]))
         self.paths.append(pathdata.pathdata(i,basedir,mode,forward=True,forwardpart=False,interface=self.interfaces.interfaces[0][i]))
         self.npaths += 1
     for i in range(self.interfaces.ninterfaces[1]):
         n = i + self.interfaces.ninterfaces[0]
         self.paths.append(pathdata.pathdata(n,basedir,mode,forward=False,forwardpart=True,interface=self.interfaces.interfaces[1][i]))
         self.paths.append(pathdata.pathdata(n,basedir,mode,forward=False,forwardpart=False,interface=self.interfaces.interfaces[1][i]))
         self.npaths += 1
     
     self.reversePaths = []
     for rp in self.interfaces.reversepaths[0]:
         self.reversePaths.append(pathdatareverse.pathdatareverse(0, basedir, mode, forward=True, forwardpart=True, interface=rp, state=0))    
     for rp in self.interfaces.reversepaths[1]:
         self.reversePaths.append(pathdatareverse.pathdatareverse(0, basedir, mode, forward=True, forwardpart=True, interface=rp, state=1))
     
     self.kernels.generateKernelLists(self.npaths)
     
     self.interfacedir = int(float(self.paths[0].options.runoptions["interfacecoordinate"]))
     print self.interfacedir