Skip to content

Commit

Permalink
Update water fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
juraskov committed Nov 25, 2024
1 parent 6a232e6 commit d696b00
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import mlptrain as mlt
import pytest
import numpy as np
from autode.atoms import Atom


Expand Down Expand Up @@ -32,14 +31,10 @@ def h2o_configuration(h2o):

@pytest.fixture
def h2o():
"""Create a water molecule (H2O) for testing."""
# Approximate coordinates for H2O with a 104.5° bond angle and 0.96 Å bond length
oxygen = Atom('O', 0.0, 0.0, 0.0)
hydrogen1 = Atom('H', 0.96, 0.0, 0.0)
hydrogen2 = Atom(
'H',
-0.96 * np.cos(np.radians(104.5)),
0.96 * np.sin(np.radians(104.5)),
0.0,
)
return mlt.Molecule(atoms=[oxygen, hydrogen1, hydrogen2], charge=0, mult=1)
"""Water molecule"""
atoms = [
Atom('H', 2.32670, 0.51322, 0.0),
Atom('H', 1.03337, 0.70894, -0.89333),
Atom('O', 1.35670, 0.51322, 0.0),
]
return mlt.Molecule(atoms=atoms, charge=0, mult=1)

0 comments on commit d696b00

Please sign in to comment.