Exemplo n.º 1
0
def bands():

    pw_scf_pc,pw_bands_pc = PwBandsTasks(BN,kpoints_pc,ecut,nscf_bands_pc,path_kpoints_pc,spin="spinor",pseudo_dir="../../../bn/pseudos")
    bands_flow = YambopyFlow.from_tasks('bands_pc',[pw_scf_pc,pw_bands_pc])
    bands_flow.create(agressive=True)
    bands_flow.run()

    pw_scf_sc,pw_bands_sc = PwBandsTasks(BN_sc,kpoints_sc,ecut,nscf_bands_sc,path_kpoints_sc,spin="spinor",pseudo_dir="../../../bn/pseudos")
    bands_flow = YambopyFlow.from_tasks('bands_sc',[pw_scf_sc,pw_bands_sc])
    bands_flow.create(agressive=True)
    bands_flow.run()
Exemplo n.º 2
0
    def test_flow_2_parts(self):
        """
        This is a two parts flow
        In the first flow we prepare the SAVE folder
        In the second flow we run a BSE convergence test with number of bands
        """
        #
        # SAVE Flow
        #
        self.clean('save_flow')

        qe_scf_task, qe_nscf_task, p2y_task = PwNscfTasks(BN,
                                                          kpoints=[3, 3, 1],
                                                          ecut=20,
                                                          nscf_bands=10)

        #create yamboflow
        yambo_flow = YambopyFlow.from_tasks(
            'save_flow', [qe_scf_task, qe_nscf_task, p2y_task])
        yambo_flow.create()
        yambo_flow.dump_run()
        print(yambo_flow)
        yambo_flow.run()

        #
        # BSE convergence Flow
        #
        self.clean('bse_flow')

        #create a yambo optics task and run
        tasks = [p2y_task]
        for BSEEhEny in [5, 6, 7, 8]:
            #create a list of yambo optics task and run
            yamboin_dict = dict(NGsBlkXs=[1, 'Ry'],
                                BndsRnXs=[1, 10],
                                BSEBands=[1, 10],
                                BEnRange=[[0.0, 6.0], 'eV'],
                                BSEEhEny=[[0, BSEEhEny], 'eV'],
                                BEnSteps=1000)

            yambo_task = YamboTask.from_runlevel(p2y_task,
                                                 '-b -o b -k sex -y d -V all',
                                                 yamboin_dict,
                                                 dependencies=p2y_task)

            tasks.append(yambo_task)

        yambo_flow = YambopyFlow.from_tasks('bse_flow', tasks)
        print(yambo_flow)
        yambo_flow.run()
Exemplo n.º 3
0
    def test_full_flow(self):
        self.clean('flow')

        qe_scf_task, qe_nscf_task, p2y_task = PwNscfTasks(BN,
                                                          kpoints=[3, 3, 1],
                                                          ecut=20,
                                                          nscf_bands=10)

        #create a yambo optics task and run
        yamboin_dict = dict(FFTGvecs=[20, 'Ry'],
                            BndsRnXs=[[1, 10], ''],
                            QpntsRXd=[[1, 1], ''],
                            ETStpsXd=[500, ''])

        yambo_task = YamboTask.from_runlevel(p2y_task,
                                             '-o c',
                                             yamboin_dict,
                                             dependencies=p2y_task)
        print(yambo_task)

        #create yamboflow
        yambo_flow = YambopyFlow.from_tasks(
            'flow', [qe_scf_task, qe_nscf_task, p2y_task, yambo_task])
        print(yambo_flow)
        yambo_flow.create()
        yambo_flow.dump_run()
        print(yambo_flow)
        yambo_flow.run()
Exemplo n.º 4
0
    def test_qpbse_flow(self):
        self.clean('qpbse_flow')

        tasks = []
        tmp_tasks = PwNscfTasks(Si, kpoints=[4, 4, 4], ecut=20, nscf_bands=10)
        qe_scf_task, qe_nscf_task, p2y_task = tmp_tasks
        tasks.extend(tmp_tasks)

        #create a yambo qp run
        qp_dict = dict(FFTGvecs=[20, 'Ry'],
                       BndsRnXp=[1, 20],
                       NGsBlkXp=[1, 'Ry'],
                       EXXRLvcs=[10, 'Ry'],
                       QPkrange=[1, 13, 3, 6],
                       GbndRnge=[1, 10])

        #create a yambo bse run
        bse_dict = dict(BEnSteps=1000,
                        BEnRange=[[0, 5], 'eV'],
                        BndsRnXp=[1, 20],
                        NGsBlkXp=[1, 'Ry'],
                        FFTGvecs=[20, 'Ry'],
                        BSENGexx=[10, 'Ry'],
                        BSENGBlk=[1, 'Ry'],
                        KfnQPdb="E < run/ndb.QP",
                        BSEBands=[3, 6])

        qp_task, bse_task = YamboQPBSETasks(p2y_task, qp_dict, bse_dict)
        tasks.extend([qp_task, bse_task])

        yambo_flow = YambopyFlow.from_tasks('qpbse_flow', tasks)
        yambo_flow.create()
        print(yambo_flow)
        yambo_flow.run()
Exemplo n.º 5
0
 def get_flow(self,path,scf_kpoints,ecut,nscf_kpoints,chi_bands,spin_bands,**kwargs):
     tasks = self.get_tasks(scf_kpoints=scf_kpoints,ecut=ecut,nscf_kpoints=nscf_kpoints,
                            chi_bands=chi_bands,spin_bands=spin_bands,**kwargs)
    
     #put all the tasks in a flow
     self.yambo_flow = YambopyFlow.from_tasks(path,tasks,**kwargs)
     return self.yambo_flow
Exemplo n.º 6
0
    def get_flow(self,path,kpoints,ecut,nscf_bands,nscf_kpoints=None,imodes_list=None,**kwargs):

        tasks = self.get_tasks(path=path,kpoints=kpoints,ecut=ecut,nscf_bands=nscf_bands,
                               nscf_kpoints=nscf_kpoints,imodes_list=imodes_list,**kwargs)
       
        #put all the tasks in a flow
        self.yambo_flow = YambopyFlow.from_tasks(path,tasks)
        return self.yambo_flow
Exemplo n.º 7
0
def relax():
    qe_relax_atoms_task, qe_relax_cell_task, qe_scf_task = PwRelaxTasks(
        Si, kpoints, ecut, cell_dofree='all', pseudo_dir=pseudo_dir)

    relax_flow = YambopyFlow.from_tasks(
        'relax_flow', [qe_relax_atoms_task, qe_relax_cell_task, qe_scf_task])
    relax_flow.create(agressive=True)
    relax_flow.run()
Exemplo n.º 8
0
def bands():
    pw_scf, pw_bands = PwBandsTasks(Si,
                                    kpoints,
                                    ecut,
                                    nscf_bands,
                                    path_kpoints,
                                    pseudo_dir=pseudo_dir)
    bands_flow = YambopyFlow.from_tasks('bands_flow', [pw_scf, pw_bands])
    bands_flow.create(agressive=True)
    bands_flow.run()
Exemplo n.º 9
0
    def test_phonon_flow(self):
        self.clean('phonon_flow')

        tasks = PhPhononTasks(Si,
                              kpoints=[3, 3, 3],
                              qpoints=[1, 1, 1],
                              ecut=30)
        yambo_flow = YambopyFlow.from_tasks('phonon_flow', tasks)
        print(yambo_flow)
        yambo_flow.create()
        yambo_flow.run()
Exemplo n.º 10
0
def nscf():
    pw_scf, pw_nscf, p2y_task = PwNscfTasks(Si,
                                            kpoints,
                                            ecut,
                                            nscf_bands,
                                            nscf_kpoints,
                                            pseudo_dir=pseudo_dir)
    nscf_flow = YambopyFlow.from_tasks('nscf_flow',
                                       [pw_scf, pw_nscf, p2y_task])
    nscf_flow.create(agressive=True)
    nscf_flow.run()
    print(nscf_flow)
Exemplo n.º 11
0
def nscf():
    pw_scf,pw_nscf,p2y_task = PwNscfTasks(BN,kpoints,ecut,nscf_bands,nscf_kpoints,spin="spinor",pseudo_dir="/Users/alejandro/Software/yambopy/tutorial/bn/pseudos")
    nscf_flow = YambopyFlow.from_tasks('nscf_flow',[pw_scf,pw_nscf,p2y_task])
    nscf_flow.create(agressive=True)
    nscf_flow.run()
    print(nscf_flow)
Exemplo n.º 12
0
def bands():
    pw_scf,pw_bands = PwBandsTasks(BN,kpoints,ecut,nscf_bands,path_kpoints,spin="spinor",pseudo_dir="/Users/alejandro/Software/yambopy/tutorial/bn/pseudos")
    bands_flow = YambopyFlow.from_tasks('bands_flow',[pw_scf,pw_bands])
    bands_flow.create(agressive=True)
    bands_flow.run()
Exemplo n.º 13
0
def relax():
    qe_relax_atoms_task, qe_relax_cell_task, qe_scf_task = PwRelaxTasks(BN,kpoints,ecut,cell_dofree='2Dxy',pseudo_dir="/Users/alejandro/Software/yambopy/tutorial/bn/pseudos")

    relax_flow = YambopyFlow.from_tasks('relax_flow',[qe_relax_atoms_task,qe_relax_cell_task,qe_scf_task])
    relax_flow.create(agressive=True)
    relax_flow.run()
Exemplo n.º 14
0
#create a QE scf task and run
qe_input = PwIn.from_structure_dict(MoS2,kpoints=[12,12,1],ecut=30)
qe_scf_task = PwTask.from_input(qe_input)

#create a QE nscf task and run
qe_input = qe_input.copy().set_nscf(20)
qe_nscf_task = PwTask.from_input([qe_input,qe_scf_task],dependencies=qe_scf_task)

#create a p2y nscf task and run
p2y_task = P2yTask.from_nscf_task(qe_nscf_task)

#create a yambo optics task and run
yamboin_dict = dict(NGsBlkXs=[1,'Ry'],
                    BndsRnXs=[[1,20],''],
                    BSEBands=[[8,11],''],
                    BEnRange=[[0.0,6.0],'eV'],
                    BEnSteps=[1000,''])

yambo_task = YamboTask.from_runlevel(p2y_task,'-b -o b -k sex -y d',
                                     yamboin_dict,dependencies=p2y_task)
print(yambo_task)

#create yamboflow
yambo_flow = YambopyFlow.from_tasks('flow',[qe_scf_task,qe_nscf_task,p2y_task,yambo_task])
print(yambo_flow)
yambo_flow.create()
yambo_flow.dump_run()
print(yambo_flow)
yambo_flow.run()
Exemplo n.º 15
0
               BEnRange=[[0, 5], 'eV'],
               BndsRnXs=[1, 60],
               NGsBlkXs=[1, 'Ry'],
               BSENGexx=[10, 'Ry'],
               BSENGBlk=[1, 'Ry'],
               BSEBands=[7, 10])

# Merge all dict variables
yamboin_dict = {**yamboin_dict, **cutoffdict, **paradict, **bsedict}

# Set Yambo task (BSE in this case)
# yamboin_args >> Add arguments (ExtendOut, WRbsWF, EvalKerr, etc.)

bse_task = YamboTask.from_runlevel([p2y_task],
                                   '-r -o b -b -k sex -y d -V all',
                                   yamboin_dict,
                                   yamboin_args=['WRbsWF'])

# Introduce each task in the list of task
tasks.append(bse_task)

# Set the Yambo flow
yambo_flow = YambopyFlow.from_tasks('bse_flow', tasks)
print(yambo_flow)

# Create the Yambo flow
yambo_flow.create(agressive=True)
# Run the Yambo flow
yambo_flow.run()
print(yambo_flow)
Exemplo n.º 16
0
# GW variables dictionary (standard variables, more advanced in Yambo Website)
gwdict = dict(FFTGvecs=[10,'Ry'],
              BndsRnXp=[1,60],
              NGsBlkXp=[1,'Ry'],
              GbndRnge=[1,60],
              EXXRLvcs=[10,'Ry'],
              VXCRLvcs=[10,'Ry'],
              QPkrange=[1,19,7,10])

# Merge all dict variables
yamboin_dict = {**yamboin_dict,**cutoffdict,**paradict,**gwdict}

# Set Yambo task (GW in this case)
# yamboin_args >> Add arguments (ExtendOut, WRbsWF, EvalKerr, etc.)

gw_task = YamboTask.from_runlevel([p2y_task],'-r -g n -p p -V all',yamboin_dict,yamboin_args=['ExtendOut'])

# Introduce each task in the list of task
tasks.append(gw_task)

# Set the Yambo flow
yambo_flow = YambopyFlow.from_tasks('gw_flow',tasks)
print(yambo_flow)

# Create the Yambo flow
yambo_flow.create(agressive=True)
# Run the Yambo flow
yambo_flow.run()
print(yambo_flow)