Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gelzinyte committed Aug 15, 2024
1 parent d360c85 commit 25c215b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 8 additions & 5 deletions tests/calculators/test_orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@

from ase.config import cfg as ase_cfg

aims_prerequisites = pytest.mark.skipif(
orca_prerequisites = pytest.mark.skipif(
condition = 'orca' not in ase_cfg.parser ,
reason='Missing "orca" in ase\'s configuration file.'
)


@orca_prerequisites
def test_orca_is_converged(tmp_path):
"""function to check convergence from orca's output."""

Expand Down Expand Up @@ -63,7 +63,7 @@ def test_orca_is_converged(tmp_path):
with pytest.raises(CalculationFailed):
at.get_potential_energy()


@orca_prerequisites
def test_full_orca(tmp_path):
atoms = Atoms("H2", positions=[(0, 0, 0), (0, 0, 0.9)])

Expand Down Expand Up @@ -115,7 +115,7 @@ def test_full_orca(tmp_path):
ref_dipole = np.array([ 0., 0., -0.43402056])
assert dipole == approx(ref_dipole)


@orca_prerequisites
def test_orca_with_generic(tmp_path):

home_dir = tmp_path / "home_dir"
Expand All @@ -136,6 +136,7 @@ def test_orca_with_generic(tmp_path):
assert "orca_energy" in at.info or "orca_calculation_failed" in at.info


@orca_prerequisites
def test_orca_geometry_optimisation(tmp_path):

home_dir = tmp_path / "home_dir"
Expand All @@ -159,6 +160,7 @@ def test_orca_geometry_optimisation(tmp_path):
assert pytest.approx(out.get_distance(0, 1), abs=0.03) == 0.76812058465248


@orca_prerequisites
def test_post_processing(tmp_path):

home_dir = tmp_path / "home_dir"
Expand Down Expand Up @@ -195,7 +197,7 @@ def simplest_orca_post(orca_calc):
with open(post_fn, "w") as f:
f.write("Dummy file generated after ORCA execution\n")


@orca_prerequisites
@pytest.mark.skipif("JANPA_HOME_DIR" not in os.environ, reason="JANPA_HOME_DIR is not set")
def test_run_npa(tmp_path):

Expand Down Expand Up @@ -263,6 +265,7 @@ def test_run_npa(tmp_path):
[-5.59691e-01, 1.79000e-02, -0.0], [-5.63437e-01, 1.75500e-02, -0.0]]])}


@orca_prerequisites
@pytest.mark.skip(reason="Normal mode (eigenvector) reading implemented incorrectly.")
def test_read_frequencies():
mol = molecule("CH4")
Expand Down
1 change: 0 additions & 1 deletion wfl/calculators/orca/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class ORCA(WFLFileIOCalculator, ASE_ORCA):
# to override that function's built-in default of 10
wfl_generic_default_autopara_info = {"num_inputs_per_python_subprocess": 1}

# EG where should this be?
default_params = dict(charge=0, orcasimpleinput='engrad B3LYP def2-TZVP',
orcablocks='%pal nprocs 1 end')

Expand Down

0 comments on commit 25c215b

Please sign in to comment.