コード例 #1
0
    def __init__(self, command):
        '''
        @param command: [_executable,_prompt,_exitCommand,_cleanUpCommand] 
        '''    
        logger.debug("Creating Shell Launcher.")
        Thread.__init__(self)
        Launcher.__init__(self)
        
    
        self._executable = command[0]
        self._prompt =  command[1]
        self._exitCommand =  command[2]
        self._cleanUpCommand = command[3]
        
        self.__out = None
        self.__err = None
        self.__process = None
        self.__pid = None
        self.__returnCode = None
        
        self._launchProcess()
        
        self._outQueue = Queue.Queue()
        self._errQueue = Queue.Queue()

        self._startThreads()
        self._startExecutable()
        
        self._params = None
        self._result = None
        self._resultFile = None
コード例 #2
0
ファイル: task.py プロジェクト: nityasagarjena/AbInitio
    def __init__(self, fname=None):
        # Default values, see explanations below:        
        taskDic = {
        'taskName': 'total energy',
        'tolerance': '1',
        'nMaxSteps': '10'
        }
        Estimator.__init__(self,fname)
        Launcher.__init__(self,fname)                
        # value to converge with respect to k-points or energy cutoffs
        # currently can be 'total energy', 'single phonon', or 'geometry':
        self.taskName = self.config.get('Task', 'taskName')

        # convergence criteria in percents:        
        self.tolerance = self.config.getfloat('Task','tolerance')
        
        # maximum number of optimization steps:
        self.nMaxSteps = self.config.getint('Task','nMaxSteps')  
        
        self.lookupTable = {
        'total energy' : (self.pwscfLauncher, self.getTotalEnergy),
        'single phonon': (self.singlePhononLauncher, self.getSinglePhonon),
        'geometry'     : (self.pwscfLauncher, self.getLatticeParameters),
        'multiple phonon': (self.multiPhononLauncher, self.getMultiPhonon)
        }        
        
        assert self.lookupTable.has_key(self.taskName), "Convergence \
コード例 #3
0
ファイル: qecalc.py プロジェクト: nityasagarjena/AbInitio
    def __init__(self, fname):
        
        Launcher.__init__(self, fname)
        Property.__init__(self, fname)

        self.qeConfig = QEConfig(self.pwscfInput)
        self.qeConfig.parse()

        self.structure = QEStructure(self.pwscfInput)

        self.dispersion = dispersion.Dispersion(self)

#        self._kpts = self.getkPoints()
        self._ekincutoff = self.getEkincutoff()
コード例 #4
0
 def __init__(self, initParams=None):
     '''
     
     '''    
     logger.debug("Creating Python Script Launcher...")
     
     
     Process.__init__(self)
     Launcher.__init__(self, initParams)
     
     self.globalVariables= {}
     self.localVariables= {}
     
     self.queueResult = Queue()
     self.queueOutput = Queue()
     
     self.localVariables = {}
     self.globalVariables = {}
     self.result = None
     self.output = None
     
     self.timeout = None
     self.command = None