Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Oct 3, 2023
1 parent ccd1eae commit 986c66a
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 19 deletions.
2 changes: 0 additions & 2 deletions aiida_gaussian/calculations/cubegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def define(cls, spec):

# --------------------------------------------------------------------------
def prepare_for_submission(self, folder):

# create calculation info
calcinfo = CalcInfo()
calcinfo.uuid = self.uuid
Expand All @@ -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"]
Expand Down
1 change: 0 additions & 1 deletion aiida_gaussian/calculations/formchk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions aiida_gaussian/parsers/cubegen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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)

Expand Down
5 changes: 0 additions & 5 deletions aiida_gaussian/parsers/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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
)
Expand All @@ -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:
Expand Down Expand Up @@ -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,
Expand All @@ -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
Expand Down
3 changes: 0 additions & 3 deletions aiida_gaussian/utils/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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):
Expand All @@ -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()

Expand Down
1 change: 0 additions & 1 deletion aiida_gaussian/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ class GaussianBaseWorkChain(BaseRestartWorkChain):

@classmethod
def define(cls, spec):

super().define(spec)
spec.expose_inputs(GaussianCalculation, namespace="gaussian")

Expand Down
4 changes: 0 additions & 4 deletions aiida_gaussian/workchains/cubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ def check_input(self):
return ExitCode(0)

def formchk_step(self):

self.report("Running FormChk")

builder = FormchkCalculation.get_builder()
Expand All @@ -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

Expand Down Expand Up @@ -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

Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion examples/example_cubes_workchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 986c66a

Please sign in to comment.