diff --git a/aiida_gaussian/calculations/gaussian.py b/aiida_gaussian/calculations/gaussian.py index 0f7c610..61114f9 100644 --- a/aiida_gaussian/calculations/gaussian.py +++ b/aiida_gaussian/calculations/gaussian.py @@ -171,9 +171,9 @@ def prepare_for_submission(self, folder): self.inputs.parameters.get_dict(), pmg_structure ) # for NICS replace X0+ with Bq - if "nmr" in self.inputs.parameters.get_dict()['route_parameters']: + if "nmr" in self.inputs.parameters.get_dict()["route_parameters"]: input_string = input_string.replace("X0+", "Bq") - + with open(folder.get_abs_path(self.INPUT_FILE), "w") as out_file: out_file.write(input_string) diff --git a/aiida_gaussian/parsers/gaussian.py b/aiida_gaussian/parsers/gaussian.py index 533b681..36dabb9 100644 --- a/aiida_gaussian/parsers/gaussian.py +++ b/aiida_gaussian/parsers/gaussian.py @@ -53,7 +53,7 @@ def _parse_log(self, log_file_string, inputs): return self.exit_codes.ERROR_OUTPUT_PARSING property_dict.update(self._parse_electron_numbers(log_file_string)) - + # set output nodes self.out("output_parameters", Dict(dict=property_dict)) @@ -78,7 +78,7 @@ def _parse_electron_numbers(self, log_file_string): return {"num_electrons": [int(e) for e in find_el.groups()]} else: return {} - + def _parse_log_cclib(self, log_file_string): data = cclib.io.ccread(io.StringIO(log_file_string)) @@ -178,7 +178,7 @@ def _parse_log(self, log_file_string, inputs): return self.exit_codes.ERROR_OUTPUT_PARSING # parse nics property_dict.update(self._parse_nics(log_file_string)) - + property_dict.update(self._parse_electron_numbers(log_file_string)) # Add spin expectations in property_dict @@ -200,7 +200,8 @@ def _parse_log(self, log_file_string, inputs): return exit_code return None - def _parse_nics(self,log_file_string): + + def _parse_nics(self, log_file_string): sigma = [] @@ -222,8 +223,8 @@ def extract_values(line): i_line += 1 if len(sigma) == 0: return {} - return {'nics':np.array(sigma)} - + return {"nics": np.array(sigma)} + def _parse_log_spin_exp(self, log_file_string): """Parse spin expectation values"""