def generate_calculations(self): ''' Generates calculations.''' workflow = Workflow(dirname='{}/dft'.format(self.dirname)) for i in range(self.num_of_modulations): scftask = QeScfTask(dirname=pjoin(workflow.dirname, 'struct-{:03d}'.format(i + 1)), structure=Structure.from_file( '{}/structures/POSCAR-{:03d}'.format( self.dirname, i + 1)), **self.kwargs) workflow.add_tasks([scftask]) # Execution workflow.write() workflow.report()
""" Compute ground state charge density. Used by: 12-Wfn 13-Wfnq 14-Wfn_co 15-Wfn_fi 16-Wfnq_fi """ from BGWpy import Structure, AbinitScfTask task = AbinitScfTask( dirname = '11-Density', structure = Structure.from_file('../../Data/Structures/GaAs.json'), prefix = 'GaAs', pseudo_dir = '../../Data/Pseudos', pseudos = ['31-Ga.pspnc', '33-As.pspnc'], ngkpt = [2,2,2], # k-points grid kshift = [.5,.5,.5], # k-points shift ecut = 5.0, # Wavefunctions cutoff energy # These are the default parameters for the MPI runner. # Please adapt them to your needs. nproc = 1, nproc_per_node = 1, mpirun = 'mpirun', nproc_flag = '-n', nproc_per_node_flag = '--npernode',
""" Compute the absorption from the BSE. Depends on: 14-Wfn_co 15-Wfn_fi 16-Wfnq_fi 21-Epsilon 22-Sigma 23-Kernel """ from BGWpy import Structure, AbsorptionTask task = AbsorptionTask( dirname='24-Absorption', structure = Structure.from_file('../../Data/Structures/GaAs.cif'), ngkpt = [2,2,2], # k-points grid nbnd_val = 4, # Number of valence bands nbnd_cond = 4, # Number of conduction bands nbnd_val_co=4, # Number of valence bands on the coarse grid nbnd_cond_co=4, # Number of conduction bands on the coarse grid nbnd_val_fi=4, # Number of valence bands on the fine grid nbnd_cond_fi=4, # Number of conduction bands on the fine grid # These extra lines will be added verbatim to the input file. extra_lines = [ 'use_symmetries_coarse_grid', 'no_symmetries_fine_grid', 'no_symmetries_shifted_grid',
""" Compute DFT wavefunctions and eigenvalues on a k-shifted and q-shifted k-point grid, then adapt them for BGW. Depends on: 11-Density Used by: 21-Epsilon """ from BGWpy import Structure, QeBgwFlow task = QeBgwFlow( dirname='13-Wfnq', structure=Structure.from_file('../../Data/Structures/GaAs.json'), prefix='GaAs', pseudo_dir='../../Data/Pseudos', pseudos=['31-Ga.PBE.UPF', '33-As.PBE.UPF'], ngkpt=[2, 2, 2], # k-points grid kshift=[.5, .5, .5], # k-points shift qshift=[.001, .0, .0], # k-points q-shift ecutwfc=10.0, # Wavefunctions cutoff energy # Number of bands not specified (occupied only) charge_density_fname='11-Density/GaAs.save/charge-density.dat', data_file_fname='11-Density/GaAs.save/data-file.xml', # These are the default parameters for the MPI runner. # Please adapt them to your needs. nproc=1, nproc_per_node=1,
""" Compute DFT density and wavefunctions on a q-shifted k-point grid, then adapt them for BGW. """ from BGWpy import Structure, AbinitScfTask, AbinitWfnTask, Abi2BgwTask # Common arguments for tasks. common = dict( structure=Structure.from_file("../../Data/Structures/GaAs.json"), prefix="GaAs", pseudo_dir="../../Data/Pseudos", pseudos=["31-Ga.pspnc", "33-As.pspnc"], ngkpt=[2, 2, 2], # k-points grid kshift=[0.5, 0.5, 0.5], # k-points shift qshift=[0.001, 0.0, 0.0], # k-points q-shift ecut=5.0, # Wavefunctions cutoff energy # Number of bands not specified (occupied only) # These are the default parameters for the MPI runner. # Please adapt them to your needs. nproc=1, nproc_per_node=1, mpirun="mpirun", nproc_flag="-n", nproc_per_node_flag="--npernode", ) scftask = AbinitScfTask(dirname="01-Wavefunctions/Density", **common) # Wavefunctions and eigenvalues calculation (NSCF) on a k-shifted grid
""" Compute the absorption from the BSE. Depends on: 14-Wfn_co 15-Wfn_fi 16-Wfnq_fi 21-Epsilon 22-Sigma 23-Kernel """ from BGWpy import Structure, AbsorptionTask task = AbsorptionTask( dirname='24-Absorption', structure=Structure.from_file('../../Data/Structures/GaAs.cif'), ngkpt=[2, 2, 2], # k-points grid nbnd_val=4, # Number of valence bands nbnd_cond=4, # Number of conduction bands nbnd_val_co=4, # Number of valence bands on the coarse grid nbnd_cond_co=4, # Number of conduction bands on the coarse grid nbnd_val_fi=4, # Number of valence bands on the fine grid nbnd_cond_fi=4, # Number of conduction bands on the fine grid # These extra lines will be added verbatim to the input file. extra_lines=[ 'use_symmetries_coarse_grid', 'no_symmetries_fine_grid', 'no_symmetries_shifted_grid', 'screening_semiconductor', 'use_velocity',