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

Add tests for HarmonicWigner class #13

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
60 changes: 60 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import ase
import pytest


@pytest.fixture
def mock_h2o_molecule():
"""Create a simple water molecule for testing"""
positions = [
[0.0, 0.0, 0.0], # O
[0.0, 0.757, 0.586], # H
[0.0, -0.757, 0.586],
] # H
return ase.Atoms("OH2", positions=positions)


@pytest.fixture
def mock_h2o_frequencies():
"""Mock H2O vibrational frequencies in cm^-1"""
# Real vibrational frequencies for H2O
return [
3657.0, # symmetric stretch
3756.0, # antisymmetric stretch
1595.0,
] # bending


@pytest.fixture
def mock_h2o_vibrations():
"""Mock vibrational normal modes"""
# Simplified normal modes for testing
vibrations = []

# Symmetric stretch - both H atoms move in same direction
vibrations.append(
[
[0.0, 0.0, 0.0], # O stays relatively still
[0.0, 0.0, 1.0], # H1 moves up
[0.0, 0.0, 1.0], # H2 moves up
]
)

# Antisymmetric stretch - H atoms move in opposite directions
vibrations.append(
[
[0.0, 0.0, 0.0], # O stays relatively still
[0.0, 0.0, 1.0], # H1 moves up
[0.0, 0.0, -1.0], # H2 moves down
]
)

# Bending - H atoms move in opposite directions perpendicular to bonds
vibrations.append(
[
[0.0, 0.0, 0.0], # O stays relatively still
[0.0, 1.0, 0.0], # H1 moves right
[0.0, -1.0, 0.0], # H2 moves left
]
)

return vibrations
Loading
Loading