4646import adlib .bulk .calc
4747
4848
49- def setup_kpts_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' ):
49+ def setup_kpts_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' , magnetism = None ):
5050 """
5151 script to set up N jobs to check kpts convergence
5252 """
@@ -61,12 +61,12 @@ def setup_kpts_converge(bulk_dir, lattice_constant_center, metal='Cu', crystal_s
6161 for i , k in enumerate (kpts ):
6262 for j , lattice_constant in enumerate (lattice_constants ):
6363 calc_dir = os .path .join (kpts_dir , str (k ), f'run_{ j :04} ' )
64- adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , ecutwfc = 500 , kpt = k , smear = 0.1 , nproc = 16 )
64+ adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , magnetism = magnetism , ecutwfc = 500 , kpt = k , smear = 0.1 , nproc = 16 )
6565
6666 adlib .bulk .calc .make_scf_run_file_array (os .path .join (kpts_dir , str (k )), j , job_name = 'kpts_bulk_converge' )
6767
6868
69- def setup_ecutwfc_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' ):
69+ def setup_ecutwfc_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' , magnetism = None ):
7070 """
7171 script to set up N jobs to check ecutwfc convergence
7272 """
@@ -80,12 +80,12 @@ def setup_ecutwfc_converge(bulk_dir, lattice_constant_center, metal='Cu', crysta
8080 for i , ecut in enumerate (ecuts ):
8181 for j , lattice_constant in enumerate (lattice_constants ):
8282 calc_dir = os .path .join (ecutwfc_dir , str (ecut ), f'run_{ j :04} ' )
83- adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , ecutwfc = ecut , kpt = 7 , smear = 0.1 , nproc = 16 )
83+ adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , magnetism = magnetism , ecutwfc = ecut , kpt = 7 , smear = 0.1 , nproc = 16 )
8484
8585 adlib .bulk .calc .make_scf_run_file_array (os .path .join (ecutwfc_dir , str (ecut )), j , job_name = 'ecut_bulk_converge' )
8686
8787
88- def setup_smear_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' ):
88+ def setup_smear_converge (bulk_dir , lattice_constant_center , metal = 'Cu' , crystal_structure = 'fcc' , magnetism = None ):
8989 """
9090 script to set up N jobs to check MV smearing convergence
9191 """
@@ -98,7 +98,7 @@ def setup_smear_converge(bulk_dir, lattice_constant_center, metal='Cu', crystal_
9898 for i , smear in enumerate (smears ):
9999 for j , lattice_constant in enumerate (lattice_constants ):
100100 calc_dir = os .path .join (smear_dir , str (smear ), f'run_{ j :04} ' )
101- adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , ecutwfc = 1000 , kpt = 7 , smear = smear , nproc = 16 )
101+ adlib .bulk .calc .make_scf_calc_file (calc_dir , lattice_constant , metal = metal , crystal_structure = crystal_structure , magnetism = magnetism , ecutwfc = 1000 , kpt = 7 , smear = smear , nproc = 16 )
102102
103103 adlib .bulk .calc .make_scf_run_file_array (os .path .join (smear_dir , str (smear )), j , job_name = 'smear_bulk_converge' )
104104
0 commit comments