Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix no solvent #334

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/pytest_cov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this, I was wondering why all the codecov runs were failing!

8 changes: 1 addition & 7 deletions autode/transition_states/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Functionality improvements

Bug Fixes
*********
- ...
- Fixes no solvent being added in QRC calculations

Usability improvements/Changes
******************************
Expand Down
17 changes: 16 additions & 1 deletion tests/test_ts/test_mode_checking.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()
Expand Down Expand Up @@ -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,
Expand Down
Loading