Esempio n. 1
0
def getInputParam(text, param):
    "Gets input string, sets param value and returns updated string"
    # XXX: Parameters should be from "SYSTEM" namelist (extend for K-points)
    input = QEInput(config=text)
    input.parse()
    nl = input.namelist("system")
    return nl.param(param)
Esempio n. 2
0
    def setInput(self):
        "Set namelist 'input'"
        self._input      = QEInput(type='dynmat')
        nl  = Namelist("input")
        self._input.addNamelist(nl)

        nl.add("fildyn",    self._phresults.fildyn()) # from PH results
        self._addAsr(nl)
        self._addQPoint(nl)
Esempio n. 3
0
    def setInput(self):
        "Set namelist 'input'"
        self._input = QEInput(type='q2r')
        nl = self._input.namelist("input")
        zasr = ZASR[ZASRLIST[int(self._inv.zasr)]]

        nl.set("fildyn", self.fildyn())  # from PH results
        nl.set("zasr", zasr)
        nl.set("flfrc", FLFRC)
Esempio n. 4
0
    def _inputFromRecord(self):
        "Set input object from input configuration"
        inputs = self._director.clerk.getQEConfigurations(where="taskid='%s'" %
                                                          self._emTaskId())
        if len(inputs) == 0:  # No input created
            return

        input = inputs[0]
        fname = defaultInputName(input.type)
        inputStr = readRecordFile(self._director.dds, input, fname)
        self._input = QEInput(config=inputStr, type="cp")
        self._input.parse()
Esempio n. 5
0
    def filterInput(self, director):
        "Default behaviour: standard filtering"
        input = QEInput(config=self.inventory.text, type=self.inventory.type)
        filter = filters.filterFactory(self.inventory.type)  # Creating filter
        filter.apply(input)  # Apply filter to input
        fconfig = input.toString()  # Filtered config input

        return director.redirect(
            actor='material_simulations/espresso/input-create',
            routine='createRecord',
            text=fconfig,
            id=self.inventory.id,
            taskid=self.inventory.taskid,
            type=self.inventory.type,
            subtype=self.inventory.subtype,
            fname=self.inventory.fname,
            description=self.inventory.description)
Esempio n. 6
0
 def setInputpp(self):
     self._input = QEInput(type="dos")
     nl = self._input.namelist("inputpp")
     nl.add("Emin", self._inv.emin)
     nl.add("Emax", self._inv.emax)
     nl.add("DeltaE", self._inv.deltae)
Esempio n. 7
0
 def setInputpp(self):
     self._input = QEInput(type="bands")
     nl = self._input.namelist("inputpp")
     nl.add("filband", FILBAND)
     nl.add("lsym", LSIM)