Beispiel #1
0
class PWTask(QETask):
    def __init__(self, filename=None, configString=None, cleanOutDir=None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        #self.name = 'pw.x'

        # pwscf input and output
        configDic = {
            'pwscfInput': 'scf.in',
            'pwscfOutput': 'scf.out',
        }
        self.setting.section(self.name(), configDic)
        self.input = PWInput(self.setting.pwscfInput)
        self.output = QEOutput(self.setting, type='pw')
#        self._cmdStr = self.setting.paraPrefix + " pw.x " +  \
#                       self.setting.paraPostfix + " -inp " + \
#                       self.setting.pwscfInput + " > " + \
#                       self.setting.pwscfOutput + "< /dev/null"

    def cmdLine(self):
        return self.setting.paraPrefix + " pw.x " +  \
                       self.setting.paraPostfix + " -inp " + \
                       self.setting.pwscfInput + " > " + \
                       self.setting.pwscfOutput + "< /dev/null"

    def name(self):
        return 'pw.x'

    def _syncSetting(self):
        """
        When this method is called on launch(), the input file is already
        parsed and will be saved before the run...
        """
        self.input.namelist('control').add('outdir', \
                                               "'" +  self.setting.outDir + "'")
Beispiel #2
0
    def __init__(self, filename = None,configString = None, cleanOutDir = False,\
                                                            sectionName = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        self.setParallel()


        # pw main input and output
        configDic = {
        'pwInput': 'scf.in',
        'pwOutput': 'scf.out',
        }

        # QE input file's path containing variables' defaults (will be moved to
        # QE input parser)
        self._path_defaults = {
        'outdir': './',
        'pseudo_dir': './',
        'prefix': 'pwscf'
        }

        if sectionName == None:
            name = self.name()
        else:
            name = sectionName

        self.setting.section(name, configDic)
        self.input = PWInput( self.setting.get('pwInput') )
        self.output = QEOutput(self.setting, type='pw')
Beispiel #3
0
class PWTask(QETask):
    def __init__(self, filename = None,configString = None, cleanOutDir = False,\
                                                            sectionName = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        self.setParallel()


        # pw main input and output
        configDic = {
        'pwInput': 'scf.in',
        'pwOutput': 'scf.out',
        }

        # QE input file's path containing variables' defaults (will be moved to
        # QE input parser)
        self._path_defaults = {
        'outdir': './',
        'pseudo_dir': './',
        'prefix': 'pwscf'
        }

        if sectionName == None:
            name = self.name()
        else:
            name = sectionName

        self.setting.section(name, configDic)
        self.input = PWInput( self.setting.get('pwInput') )
        self.output = QEOutput(self.setting, type='pw')


    def cmdLine(self):
        return self._getCmdLine('pw.x', 'pwInput', 'pwOutput')


    def name(self):
        return 'pw.x'

    def syncSetting(self):
        """
        When this method is called on launch(), the input file is already
        parsed and will be saved before the run...
        """

        self.input.parse()
        
        self.setting.syncPathInNamelist('outdir', 'control', 'outdir', \
                                                self.input, self._path_defaults)
        self.setting.syncPathInNamelist('pseudo_dir', 'control', 'pseudo_dir', \
                                                self.input, self._path_defaults)
        self.setting.syncPathInNamelist('prefix', 'control', 'prefix', \
                                                self.input, self._path_defaults)


        # Solve for pseudopotential locations
        species = self.input.structure.atomicSpecies
        for specie in species.keys():
            setattr(self.setting._paths, 'ps' + specie, self.setting.get('pseudo_dir') + species[specie].pseudopotential )
Beispiel #4
0
    def __init__(self, filename=None, configString=None, cleanOutDir=None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        #self.name = 'pw.x'

        # pwscf input and output
        configDic = {
            'pwscfInput': 'scf.in',
            'pwscfOutput': 'scf.out',
        }
        self.setting.section(self.name(), configDic)
        self.input = PWInput(self.setting.pwscfInput)
        self.output = QEOutput(self.setting, type='pw')
Beispiel #5
0
    def __init__(self, filename = None,configString = None, cleanOutDir = False,\
                                                            sectionName = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        self.setParallel()


        # pw main input and output
        configDic = {
        'pwInput': 'scf.in',
        'pwOutput': 'scf.out',
        }

        # QE input file's path containing variables' defaults (will be moved to
        # QE input parser)
        self._path_defaults = {
        'outdir': './'
        }

        if sectionName == None:
            name = self.name()
        else:
            name = sectionName

        self.setting.section(name, configDic)
        self.input = PWInput( self.setting.get('pwInput') )
        self.output = QEOutput(self.setting, type='pw')
Beispiel #6
0
class PWTask(QETask):
    def __init__(self, filename = None,configString = None, cleanOutDir = False,\
                                                            sectionName = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        self.setParallel()


        # pw main input and output
        configDic = {
        'pwInput': 'scf.in',
        'pwOutput': 'scf.out',
        }

        # QE input file's path containing variables' defaults (will be moved to
        # QE input parser)
        self._path_defaults = {
        'outdir': './'
        }

        if sectionName == None:
            name = self.name()
        else:
            name = sectionName

        self.setting.section(name, configDic)
        self.input = PWInput( self.setting.get('pwInput') )
        self.output = QEOutput(self.setting, type='pw')


    def cmdLine(self):
        return self._getCmdLine('pw.x', 'pwInput', 'pwOutput')


    def name(self):
        return 'pw.x'

    def syncSetting(self):
        """
        When this method is called on launch(), the input file is already
        parsed and will be saved before the run...
        """

        self.input.parse()
        
        self.setting.syncPathInNamelist('outdir', 'control', 'outdir', \
                                                self.input, self._path_defaults)
Beispiel #7
0
class PWTask(QETask):
    def __init__(self, filename = None,configString = None, cleanOutDir = False,\
                                                            sectionName = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        self.setParallel()

        # pw main input and output
        configDic = {
            'pwInput': 'scf.in',
            'pwOutput': 'scf.out',
        }

        # QE input file's path containing variables' defaults (will be moved to
        # QE input parser)
        self._path_defaults = {'outdir': './'}

        if sectionName == None:
            name = self.name()
        else:
            name = sectionName

        self.setting.section(name, configDic)
        self.input = PWInput(self.setting.get('pwInput'))
        self.output = QEOutput(self.setting, type='pw')

    def cmdLine(self):
        return self._getCmdLine('pw.x', 'pwInput', 'pwOutput')

    def name(self):
        return 'pw.x'

    def syncSetting(self):
        """
        When this method is called on launch(), the input file is already
        parsed and will be saved before the run...
        """

        self.input.parse()

        self.setting.syncPathInNamelist('outdir', 'control', 'outdir', \
                                                self.input, self._path_defaults)
Beispiel #8
0
    def __init__(self, filename = None,configString = None, cleanOutDir = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        #self.name = 'pw.x'

        # pwscf input and output
        configDic = {
        'pwscfInput': 'scf.in',
        'pwscfOutput': 'scf.out',
        }
        self.setting.section(self.name(), configDic)
        self.input = PWInput(self.setting.pwscfInput)
        self.output = QEOutput(self.setting, type='pw')
Beispiel #9
0
class PWTask(QETask):
    def __init__(self, filename = None,configString = None, cleanOutDir = None):
        QETask.__init__(self, filename, configString, cleanOutDir)

        #self.name = 'pw.x'

        # pwscf input and output
        configDic = {
        'pwscfInput': 'scf.in',
        'pwscfOutput': 'scf.out',
        }
        self.setting.section(self.name(), configDic)
        self.input = PWInput(self.setting.pwscfInput)
        self.output = QEOutput(self.setting, type='pw')
#        self._cmdStr = self.setting.paraPrefix + " pw.x " +  \
#                       self.setting.paraPostfix + " -inp " + \
#                       self.setting.pwscfInput + " > " + \
#                       self.setting.pwscfOutput + "< /dev/null"


    def cmdLine(self):
        return self.setting.paraPrefix + " pw.x " +  \
                       self.setting.paraPostfix + " -inp " + \
                       self.setting.pwscfInput + " > " + \
                       self.setting.pwscfOutput + "< /dev/null"


    def name(self):
        return 'pw.x'

    def _syncSetting(self):
        """
        When this method is called on launch(), the input file is already
        parsed and will be saved before the run...
        """
        self.input.namelist('control').add('outdir', \
                                               "'" +  self.setting.outDir + "'")
Beispiel #10
0
    def __init__(self, filename, cleanOutDir=None):
        QETask.__init__(self, filename, cleanOutDir)

        self.name = 'pw.x'

        # pwscf input and output
        configDic = {
            'pwscfInput': 'scf.in',
            'pwscfOutput': 'scf.out',
        }
        self.setting.section(self.name, configDic)
        self.input = PWInput(self.setting.pwscfInput)
        self.output = QEOutput(self.setting, type='pw')
        self._cmdStr = self.setting.paraPrefix + " pw.x " +  \
                       self.setting.paraPostfix + " -inp " + \
                       self.setting.pwscfInput + " > " + \
                       self.setting.pwscfOutput + "< /dev/null"