Ejemplo n.º 1
0
 def gammaDispersion(self, *pathNPoints):
     #self.pw.input.parse()
     #self.matdyn.input.parse()
     self.dispersion = PHDispersion(self.pw.input.structure.lattice,
                                    self.matdyn)
     if self.freqs.fitter.type != 'polynom':
         raise Exception('This method is only relevant for polynomial fit')
     self.dispersion = PHDispersion(self.pw.input.structure.lattice,
                                    self.matdyn)
     self.dispersion.setPath(*pathNPoints)
     self.dispersion.setValues(-self.freqs.coeff()[:, :, -1])
     self.dispersion.save('gamma_disp')
     self.dispersion.plot()
Ejemplo n.º 2
0
    def __init__(self,
                 filename=None,
                 configString=None,
                 sectionList=None,
                 taskList=None):
        QECalc.__init__(self)

        # tasks definition:
        # specify taskName/taskConstructur pairs
        self._taskSpec = [['pw', PWTask], ['ph', PHTask], ['q2r', Q2RTask],
                          ['matdyn', MatdynTask]]
        # Merging map sets tasks to be merged. Last two columns identify name
        # of default task (its input and output objects will be directly
        #accessible) and last column is the name of merged task object (e.g.'pwph')

        #is not implemented yet !!!!
        self._mergingMap = [
            ['pw', 'ph', 'pw', 'pwph'],
        ]

        self._populateTasks(filename, configString, sectionList, taskList)

        self.pwph = PWPHMerger(self.pw, self.ph, cleanOutDir=True)
        self.taskList = [self.pwph, self.q2r, self.matdyn]

        self._dispersion = PHDispersion(self.pw.input.structure.lattice,
                                        self.matdyn)

        self.dos = PhononDOS(self.matdyn)
Ejemplo n.º 3
0
[matdyn.x]
# input/output files relevant to multiple phonon calculation
matdynInput:   matdyn.in
matdynOutput:  matdyn.out
flfrc:         mgb2666.fc
"""

if __name__ == "__main__":
    matdyn = MatdynTask(configString=configString)
    pw = PWTask(configString=configString)
    pw.input.parse()

    matdyn.input.parse()
    matdyn.syncSetting()

    phDisp = PHDispersion(pw.input.structure.lattice, matdyn)

    #phDisp.launch('M', 'Gamma', 'A', 'L', 200, 200, 200)
    nP = 100
    phDisp.launch('Gamma', 'K', 'M', 'Gamma', 'A', 'H', 'L', 'A', nP, nP, nP,
                  nP, nP, nP, nP)
    #phDisp.launch('Gamma', 'H', nP)
    #phDisp.launch('Gamma', 'K', 'M', 'Gamma', nP , nP, nP)
    #phDisp.launch( 'Gamma', 'K',  nP )

    # phDisp.solveIndex((0,0,0), [-0.1,0.2,0.4])

    #    matdyn.output.parse()
    #
    #    Pol, Omegas, qPoints = matdyn.output.property('multi phonon')
    #    Pol2 = Pol.reshape(Pol.shape[0], Pol.shape[1], Pol.shape[2]*Pol.shape[3])