Exemplo n.º 1
0
    def prepare_z2pack(self):
        """Prepare the inputs for the z2pack calculations."""
        inputs = AttributeDict(
            self.exposed_inputs(Z2packBaseWorkChain, namespace='z2pack_base'))
        inputs.pw_code = self.inputs.pw_code
        inputs.structure = self.ctx.current_structure
        inputs.parent_folder = self.ctx.remote_scf

        self.ctx.inputs = inputs
        self.ctx.iteration = 0
        self.ctx.max_iteration = len(self.ctx.crossings)

        self.ctx.workchain_z2pack = []
Exemplo n.º 2
0
    def prepare_z2pack(self):
        """Prepare the inputs for the z2ack calculation."""
        self.report('Using z2pack to calculatte Z2 invariant.')
        inputs = AttributeDict(
            self.exposed_inputs(Z2packBaseWorkChain, namespace='z2pack_base'))
        inputs.pw_code = self.inputs.pw_code
        inputs.structure = self.ctx.current_structure
        inputs.parent_folder = self.ctx.scf_folder

        settings = inputs.z2pack.z2pack_settings.get_dict()
        settings.update({
            'dimension_mode': '2D',
            'invariant': 'Z2',
        })

        self.ctx.inputs = inputs
Exemplo n.º 3
0
    def setup_z2pack(self):
        """Prepare the inputs for the z2pack CalcJob."""
        inputs = AttributeDict(self.exposed_inputs(Z2packCalculation,
                                                   'z2pack'))
        inputs.pw_code = self.inputs.pw_code
        inputs.parent_folder = self.ctx.parent_folder
        inputs.z2pack_settings = inputs.z2pack_settings.get_dict()

        if not self.ctx.restart:
            if 'wannier90_parameters' not in inputs:
                inputs.wannier90_parameters = self._autoset_wannier90_paremters(
                )
            else:
                params = inputs.wannier90_parameters.get_dict()
                if any(var not in params
                       for var in ['num_wann', 'num_bands', 'exclude_bands']):
                    inputs.wannier90_parameters = self._autoset_wannier90_paremters(
                    )

        self.ctx.inputs = inputs