@@ -15,17 +15,17 @@ class Wannier90WorkChain(WorkChain):
1515 """
1616 Workchain to obtain maximally localised Wannier functions (MLWF)
1717 Authors: Antimo Marrazzo (antimo.marrazzo@epfl.ch), Giovanni Pizzi (giovanni.pizzi@epfl.ch), Junfeng Qiao(junfeng.qiao@epfl.ch)
18-
18+
1919 MIT License - Copyright (c), 2018, ECOLE POLYTECHNIQUE FEDERALE DE LAUSANNE
20- (Theory and Simulation of Materials (THEOS) and National Centre for
20+ (Theory and Simulation of Materials (THEOS) and National Centre for
2121 Computational Design and Discovery of Novel Materials (NCCR MARVEL)).
2222 All rights reserved.
2323
24- Scheme: setup --> relax(optional) --> scf --> nscf --> projwfc
24+ Scheme: setup --> relax(optional) --> scf --> nscf --> projwfc
2525 -> wannier90_postproc --> pw2wannier90 --> wannier90 --> results
26-
27- This is a very basic workchain, in that user needs to specify
28- inputs of every step. Please consider using Wannier90BandsWorkChain,
26+
27+ This is a very basic workchain, in that user needs to specify
28+ inputs of every step. Please consider using Wannier90BandsWorkChain,
2929 which automatically generates inputs.
3030 """
3131 @classmethod
@@ -39,33 +39,32 @@ def define(cls, spec):
3939 spec .input (
4040 'clean_workdir' ,
4141 valid_type = orm .Bool ,
42- default = orm .Bool (False ),
42+ default = lambda : orm .Bool (False ),
4343 help =
4444 'If `True`, work directories of all called calculation will be cleaned at the end of execution.'
4545 )
4646 spec .input (
4747 'only_valence' ,
4848 valid_type = orm .Bool ,
49- default = orm .Bool (False ),
49+ default = lambda : orm .Bool (False ),
5050 help = 'Whether only wannierise valence band or not'
5151 )
5252 spec .input (
5353 'wannier_energies_relative_to_fermi' ,
5454 valid_type = orm .Bool ,
55- default = orm .Bool (False ),
55+ default = lambda : orm .Bool (False ),
5656 help =
5757 'determines if the energies(dis_froz_min/max, dis_win_min/max) defined in the input parameters '
5858 + 'are relative to scf Fermi energy or not.'
5959 )
6060 spec .input (
6161 'scdm_thresholds' ,
6262 valid_type = orm .Dict ,
63- default = orm .Dict (
64- dict = {
65- 'max_projectability' : 0.95 ,
66- 'sigma_factor' : 3
67- }
68- ),
63+ default = lambda : orm .
64+ Dict (dict = {
65+ 'max_projectability' : 0.95 ,
66+ 'sigma_factor' : 3
67+ }),
6968 help = 'can contain two keyword: max_projectability, sigma_factor'
7069 )
7170 spec .expose_inputs (
@@ -415,7 +414,7 @@ def inspect_nscf(self):
415414
416415 def should_do_projwfc (self ):
417416 """
418- If the 'auto_projections = true' && only_valence, we
417+ If the 'auto_projections = true' && only_valence, we
419418 run projwfc calculation to extract SCDM mu & sigma.
420419 """
421420 self .report ("SCDM mu & sigma are auto-set using projectability" )
@@ -459,7 +458,7 @@ def inspect_projwfc(self):
459458
460459 def run_wannier90_pp (self ):
461460 """The input of wannier90 calculation is build here.
462-
461+
463462 :return: [description]
464463 :rtype: [type]
465464 """
@@ -582,7 +581,8 @@ def run_pw2wannier90(self):
582581 try :
583582 inputs .parameters = update_pw2wan_params_mu_sigma (
584583 parameters = orm .Dict (dict = inputs .parameters ),
585- wannier_parameters = self .ctx .calc_wannier90_pp .inputs .parameters ,
584+ wannier_parameters = self .ctx .calc_wannier90_pp .inputs .
585+ parameters ,
586586 bands = self .ctx .calc_projwfc .outputs .bands ,
587587 projections = self .ctx .calc_projwfc .outputs .projections ,
588588 thresholds = self .inputs .get ('scdm_thresholds' )
@@ -776,7 +776,7 @@ def results(self):
776776@calcfunction
777777def convert_kpoints_mesh_to_list (kmesh ):
778778 """works just like kmesh.pl in Wannier90
779-
779+
780780 :param kmesh: [description]
781781 :type kmesh: KpointsData
782782 :raises ValueError: [description]
@@ -900,7 +900,7 @@ def get_nprojs_from_upf(upf):
900900
901901def get_exclude_bands (parameters ):
902902 """get exclude_bands from Wannier90 parameters
903-
903+
904904 :param parameters: Wannier90Calculation input parameters
905905 :type parameters: dict, NOT Dict, this is not a calcfunction
906906 :return: the indices of the bands to be excluded
@@ -912,7 +912,7 @@ def get_exclude_bands(parameters):
912912
913913def get_keep_bands (parameters ):
914914 """get keep_bands from Wannier90 parameters
915-
915+
916916 :param parameters: Wannier90Calculation input parameters
917917 :type parameters: dict, NOT Dict, this is not a calcfunction
918918 :return: the indices of the bands to be kept
@@ -935,12 +935,12 @@ def update_w90_params_fermi(
935935):
936936 """
937937 Updated W90 windows with the specified Fermi energy.
938-
938+
939939 :param parameters: Wannier90Calculation input parameters
940940 :type parameters: Dict
941941 :param fermi_energy: [description]
942942 :type fermi_energy: Float
943- :param relative_to_fermi: if energies in input parameters are defined relative
943+ :param relative_to_fermi: if energies in input parameters are defined relative
944944 scf Fermi energy.
945945 :type relative_to_fermi: Bool
946946 :return: updated parameters
@@ -1020,7 +1020,7 @@ def update_pw2wan_params_mu_sigma(
10201020 parameters , wannier_parameters , bands , projections , thresholds
10211021):
10221022 """[summary]
1023-
1023+
10241024 :param pw2wan_parameters: [description]
10251025 :type pw2wan_parameters: Dict
10261026 :param mu_sigma: [description]
0 commit comments