diff --git a/.github/workflows/pytest_cov.yml b/.github/workflows/pytest_cov.yml index b37ee92f3..81e43c699 100644 --- a/.github/workflows/pytest_cov.yml +++ b/.github/workflows/pytest_cov.yml @@ -56,7 +56,8 @@ jobs: run: | pytest --cov=./ --cov-report=xml - - uses: codecov/codecov-action@v3 + - uses: codecov/codecov-action@v4 with: flags: unittests fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} # required diff --git a/autode/transition_states/base.py b/autode/transition_states/base.py index 31f2e47ff..7dfbcd57f 100644 --- a/autode/transition_states/base.py +++ b/autode/transition_states/base.py @@ -463,13 +463,7 @@ def displaced_species_along_mode( disp_coords -= (disp_factor / 20) * mode_disp_coords - # Create a new species from the initial - disp_species = Species( - name=f"{species.name}_disp", - atoms=species.atoms.copy(), - charge=species.charge, - mult=species.mult, - ) + disp_species = species.new_species(name=f"{species.name}_disp") disp_species.coordinates = disp_coords return disp_species diff --git a/doc/changelog.rst b/doc/changelog.rst index db0270a72..1cbf7068e 100644 --- a/doc/changelog.rst +++ b/doc/changelog.rst @@ -11,7 +11,7 @@ Functionality improvements Bug Fixes ********* -- ... +- Fixes no solvent being added in QRC calculations Usability improvements/Changes ****************************** diff --git a/tests/test_ts/test_mode_checking.py b/tests/test_ts/test_mode_checking.py index 6c0acf6df..d4ab23012 100644 --- a/tests/test_ts/test_mode_checking.py +++ b/tests/test_ts/test_mode_checking.py @@ -1,3 +1,7 @@ +import os +import numpy as np + +from autode.species.molecule import Molecule from autode.calculations import Calculation from autode.transition_states.base import TSbase from autode.transition_states.base import imag_mode_generates_other_bonds @@ -8,7 +12,6 @@ from autode.bond_rearrangement import BondRearrangement from autode.methods import ORCA from .. import testutils -import os here = os.path.dirname(os.path.abspath(__file__)) orca = ORCA() @@ -70,6 +73,18 @@ def test_graph_no_other_bonds(): ) +def test_disp_molecule_has_same_solvent(): + mol = Molecule(smiles="[H][H]", solvent_name="water") + mol.hessian = np.eye(3 * mol.n_atoms, 3 * mol.n_atoms) + + disp_mol = displaced_species_along_mode( + species=mol, + mode_number=1, + ) + assert disp_mol.solvent is not None + assert disp_mol.solvent == mol.solvent + + def has_correct_mode(name, fbonds, bbonds): calc = Calculation( name=name,