diff --git a/aiida_gaussian/calculations/cubegen.py b/aiida_gaussian/calculations/cubegen.py index 5b146eb..cfa7f7e 100644 --- a/aiida_gaussian/calculations/cubegen.py +++ b/aiida_gaussian/calculations/cubegen.py @@ -107,7 +107,6 @@ def define(cls, spec): # -------------------------------------------------------------------------- def prepare_for_submission(self, folder): - # create calculation info calcinfo = CalcInfo() calcinfo.uuid = self.uuid @@ -124,7 +123,6 @@ def prepare_for_submission(self, folder): ) for key, params in self.inputs.parameters.get_dict().items(): - cube_name = key + ".cube" kind_str = params["kind"] npts = params["npts"] diff --git a/aiida_gaussian/calculations/formchk.py b/aiida_gaussian/calculations/formchk.py index 35a3b33..eef2d0a 100644 --- a/aiida_gaussian/calculations/formchk.py +++ b/aiida_gaussian/calculations/formchk.py @@ -44,7 +44,6 @@ def define(cls, spec): # -------------------------------------------------------------------------- def prepare_for_submission(self, folder): - # create code info codeinfo = CodeInfo() codeinfo.code_uuid = self.inputs.code.uuid diff --git a/aiida_gaussian/parsers/cubegen.py b/aiida_gaussian/parsers/cubegen.py index ac595d2..7a95933 100644 --- a/aiida_gaussian/parsers/cubegen.py +++ b/aiida_gaussian/parsers/cubegen.py @@ -48,7 +48,6 @@ def parse(self, **kwargs): return ExitCode(0) def _parse_folders(self, retrieved_folders, parser_params): - if "heights" in parser_params: heights = parser_params["heights"] else: @@ -66,7 +65,6 @@ def _parse_folders(self, retrieved_folders, parser_params): for retrieved_fd in retrieved_folders: for filename in retrieved_fd.list_object_names(): if filename.endswith(".cube"): - with retrieved_fd.open(filename) as handle: cube = Cube.from_file_handle(handle) diff --git a/aiida_gaussian/parsers/gaussian.py b/aiida_gaussian/parsers/gaussian.py index 68f4898..fa90ecd 100644 --- a/aiida_gaussian/parsers/gaussian.py +++ b/aiida_gaussian/parsers/gaussian.py @@ -45,7 +45,6 @@ def parse(self, **kwargs): return ExitCode(0) def _parse_log(self, log_file_string, inputs): - # parse with cclib property_dict = self._parse_log_cclib(log_file_string) @@ -69,7 +68,6 @@ def _parse_log(self, log_file_string, inputs): return None def _parse_electron_numbers(self, log_file_string): - find_el = re.search( r"({0})\s*alpha electrons\s*({0}) beta".format(NUM_RE), log_file_string ) @@ -80,7 +78,6 @@ def _parse_electron_numbers(self, log_file_string): return {} def _parse_log_cclib(self, log_file_string): - data = cclib.io.ccread(io.StringIO(log_file_string)) if data is None: @@ -122,7 +119,6 @@ def _set_output_structure(self, inputs, property_dict): "opt" in inputs.parameters["route_parameters"] or len(property_dict["atomcoords"]) > 1 ): - opt_coords = property_dict["atomcoords"][-1] # The StructureData output node needs a cell, @@ -140,7 +136,6 @@ def _set_output_structure(self, inputs, property_dict): self.out("output_structure", structure) def _final_checks_on_log(self, log_file_string, property_dict): - # Error related to the symmetry identification (?). if "Logic error in ASyTop." in log_file_string: return self.exit_codes.ERROR_ASYTOP diff --git a/aiida_gaussian/utils/cube.py b/aiida_gaussian/utils/cube.py index f4fdbe7..c76c3c6 100644 --- a/aiida_gaussian/utils/cube.py +++ b/aiida_gaussian/utils/cube.py @@ -105,7 +105,6 @@ def from_file(cls, filepath, read_data=True): return c def write_cube_file(self, filename): - natoms = len(self.ase_atoms) f = open(filename, "w") @@ -134,7 +133,6 @@ def write_cube_file(self, filename): ) if natoms > 0: - positions = self.ase_atoms.positions * ANG_TO_BOHR numbers = self.ase_atoms.get_atomic_numbers() for i in range(natoms): @@ -149,7 +147,6 @@ def write_cube_file(self, filename): f.close() def swapaxes(self, ax1, ax2): - p = self.ase_atoms.positions p[:, ax1], p[:, ax2] = p[:, ax2], p[:, ax1].copy() diff --git a/aiida_gaussian/workchains/base.py b/aiida_gaussian/workchains/base.py index beb654e..6d7e0b5 100644 --- a/aiida_gaussian/workchains/base.py +++ b/aiida_gaussian/workchains/base.py @@ -21,7 +21,6 @@ class GaussianBaseWorkChain(BaseRestartWorkChain): @classmethod def define(cls, spec): - super().define(spec) spec.expose_inputs(GaussianCalculation, namespace="gaussian") diff --git a/aiida_gaussian/workchains/cubes.py b/aiida_gaussian/workchains/cubes.py index b85cb0c..22081dc 100644 --- a/aiida_gaussian/workchains/cubes.py +++ b/aiida_gaussian/workchains/cubes.py @@ -150,7 +150,6 @@ def check_input(self): return ExitCode(0) def formchk_step(self): - self.report("Running FormChk") builder = FormchkCalculation.get_builder() @@ -177,7 +176,6 @@ def _get_orbital_label(self, i_orb_wrt_homo): return label def cubegen_step(self): - if not self._check_if_previous_calc_ok(self.ctx.formchk_node): return self.exit_codes.ERROR_TERMINATION # pylint: disable=no-member @@ -221,7 +219,6 @@ def cubegen_step(self): abs_orb_indexes = [] if self.inputs.orbital_index_ref == "half_num_el": - total_num_electrons = sum(gout_params["num_electrons"]) ref_index = total_num_electrons // 2 @@ -235,7 +232,6 @@ def cubegen_step(self): abs_orb_indexes = [i for i in abs_orb_indexes if i >= 1] for i_orb in abs_orb_indexes: - if self.inputs.natural_orbitals: params_dict[f"{i_orb}_no"] = { "kind": "MO=%d" % i_orb, diff --git a/examples/example_cubes_workchain.py b/examples/example_cubes_workchain.py index b5dfa5a..b1df263 100644 --- a/examples/example_cubes_workchain.py +++ b/examples/example_cubes_workchain.py @@ -20,7 +20,6 @@ def example(gaussian_code, formchk_code, cubegen_code): - # geometry ase_geom = ase.io.read("./p-quinodimethane.xyz") ase_geom.cell = np.diag([10.0, 10.0, 10.0])