def run_scfs(self):
        self.report("Running CP2K diagonalization SCF")

        slab_inputs = self.build_slab_cp2k_inputs(
            self.inputs.slabsys_structure, self.inputs.pdos_lists,
            self.inputs.cp2k_code, self.inputs.mgrid_cutoff,
            self.inputs.wfn_file_path, self.inputs.elpa_switch)
        self.report("slab_inputs: " + str(slab_inputs))

        slab_future = submit(Cp2kCalculation.process(), **slab_inputs)
        self.to_context(slab_scf=Calc(slab_future))

        mol_inputs = self.build_mol_cp2k_inputs(self.inputs.mol_structure,
                                                self.inputs.cp2k_code,
                                                self.inputs.mgrid_cutoff,
                                                self.inputs.elpa_switch)
        self.report("mol_inputs: " + str(mol_inputs))

        mol_future = submit(Cp2kCalculation.process(), **mol_inputs)
        self.to_context(mol_scf=Calc(mol_future))
Example #2
0
    def run_geopt_again(self):
        # TODO: make this nicer.
        inputs_new = self.build_calc_inputs(self.inputs.structure,
                                            self.inputs.cp2k_code,
                                            self.inputs.fixed_atoms,
                                            self.inputs.num_machines, '',
                                            self.ctx.geo_opt.out.remote_folder)

        self.report("inputs (restart): " + str(inputs_new))
        future_new = submit(Cp2kCalculation.process(), **inputs_new)
        return ToContext(geo_opt=Calc(future_new))
Example #3
0
    def run_geopt(self):
        self.report("Running CP2K geometry optimization")

        inputs = self.build_calc_inputs(self.inputs.structure,
                                        self.inputs.cp2k_code,
                                        self.inputs.fixed_atoms,
                                        self.inputs.num_machines,
                                        self.inputs.wavefunction, None)

        self.report("inputs: " + str(inputs))
        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(geo_opt=Calc(future))
Example #4
0
    def run_scf_diag(self):
        self.report("Running CP2K diagonalization SCF")

        n_lumo = int(self.inputs.stm_params.get_dict()['--n_lumo'])

        inputs = self.build_cp2k_inputs(self.inputs.structure,
                                        self.inputs.cp2k_code,
                                        self.inputs.dft_params.get_dict(),
                                        self.inputs.wfn_file_path, n_lumo)

        self.report("inputs: " + str(inputs))
        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(scf_diag=Calc(future))
Example #5
0
    def run_geopt(self):
        self.report("Running CP2K geometry optimization")

        inputs = self.build_calc_inputs(
            self.inputs.structure, self.inputs.cp2k_code,
            self.inputs.max_force, self.inputs.calc_type,
            self.inputs.mgrid_cutoff, self.inputs.vdw_switch,
            self.inputs.fixed_atoms, self.inputs.center_switch,
            self.inputs.num_machines, None)

        self.report("inputs: " + str(inputs))
        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(geo_opt=Calc(future))
    def run_scf_diag(self):
        self.report("Running CP2K diagonalization SCF")

        inputs = self.build_cp2k_inputs(self.inputs.structure,
                                        self.inputs.cell,
                                        self.inputs.cp2k_code,
                                        self.inputs.mgrid_cutoff,
                                        self.inputs.wfn_file_path,
                                        self.inputs.elpa_switch)

        self.report("inputs: "+str(inputs))
        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(scf_diag=Calc(future))
Example #7
0
    def run_phonons(self):
        self.report("Running CP2K GW")

        parameters_dict = self.inputs.parameters.get_dict()
        inputs = self.build_calc_inputs(code=self.inputs.code,
                                        parent_folder=None,
                                        structure=self.inputs.structure,
                                        input_dict=parameters_dict)

        self.report("inputs: " + str(inputs))
        self.report("parameters: " + str(inputs['parameters'].get_dict()))
        self.report("settings: " + str(inputs['settings'].get_dict()))

        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(phonons_opt=Calc(future))
    def run_scf_diag(self):
        self.report("Running CP2K diagonalization SCF")
        
        emax = float(self.inputs.stm_params.get_dict()['--energy_range'][1])

        inputs = self.build_cp2k_inputs(self.inputs.structure,
                                        self.inputs.cell,
                                        self.inputs.cp2k_code,
                                        self.inputs.mgrid_cutoff,
                                        self.inputs.wfn_file_path,
                                        self.inputs.elpa_switch,
                                        emax)

        self.report("inputs: "+str(inputs))
        future = submit(Cp2kCalculation.process(), **inputs)
        return ToContext(scf_diag=Calc(future))
    def generate_replica(self):
        self.report("Running CP2K geometry optimization - Target: ".format(
            self.ctx.this_replica))

        inputs = self.build_calc_inputs(
            self.ctx.structure, self.inputs.cell, self.inputs.cp2k_code,
            self.ctx.this_replica, self.inputs.fixed_atoms,
            self.inputs.num_machines, self.ctx.remote_calc_folder,
            self.ctx.this_name, self.inputs.spring, self.inputs.spring_unit,
            self.inputs.target_unit, self.inputs.subsys_colvar,
            self.inputs.calc_type)

        self.report(" ")
        self.report("inputs: " + str(inputs))
        self.report(" ")
        future = submit(Cp2kCalculation.process(), **inputs)
        self.report("future: " + str(future))
        self.report(" ")
        return ToContext(replica=Calc(future))
Example #10
0
    def calc_neb(self):
        self.report("Running CP2K CI-NEB calculation.".format(
            self.ctx.this_name))

        inputs = self.build_calc_inputs(
            self.inputs.struc_folder,
            # Setup calculation
            self.inputs.cell,
            self.inputs.cp2k_code,
            self.inputs.fixed_atoms,
            self.inputs.num_machines,
            self.ctx.remote_calc_folder,
            self.inputs.wfn_cp_commands,
            # NEB input
            self.inputs.align,
            self.inputs.endpoints,
            self.inputs.nproc_rep,
            self.inputs.nreplicas,
            self.inputs.nstepsit,
            self.inputs.rotate,
            self.inputs.spring,
            # Calculation type specific
            self.inputs.calc_type,
            self.ctx.file_list,
            # find this in the workflow
            # instead of passing
            self.inputs.first_slab_atom,
            self.inputs.last_slab_atom)

        self.report(" ")
        self.report("inputs: " + str(inputs))
        self.report(" ")
        self.report("Using aiida-cp2k: " + str(aiida_cp2k.__file__))
        self.report(" ")
        future = submit(Cp2kCalculation.process(), **inputs)
        self.report("future: " + str(future))
        self.report(" ")
        return ToContext(neb=Calc(future))