|
| 1 | +import ase |
| 2 | +import pytest |
| 3 | + |
| 4 | + |
| 5 | +@pytest.fixture |
| 6 | +def mock_h2o_molecule(): |
| 7 | + """Create a simple water molecule for testing""" |
| 8 | + positions = [ |
| 9 | + [0.0, 0.0, 0.0], # O |
| 10 | + [0.0, 0.757, 0.586], # H |
| 11 | + [0.0, -0.757, 0.586], |
| 12 | + ] # H |
| 13 | + return ase.Atoms("OH2", positions=positions) |
| 14 | + |
| 15 | + |
| 16 | +@pytest.fixture |
| 17 | +def mock_h2o_frequencies(): |
| 18 | + """Mock H2O vibrational frequencies in cm^-1""" |
| 19 | + # Real vibrational frequencies for H2O |
| 20 | + return [ |
| 21 | + 3657.0, # symmetric stretch |
| 22 | + 3756.0, # antisymmetric stretch |
| 23 | + 1595.0, |
| 24 | + ] # bending |
| 25 | + |
| 26 | + |
| 27 | +@pytest.fixture |
| 28 | +def mock_h2o_vibrations(): |
| 29 | + """Mock vibrational normal modes""" |
| 30 | + # Simplified normal modes for testing |
| 31 | + vibrations = [] |
| 32 | + |
| 33 | + # Symmetric stretch - both H atoms move in same direction |
| 34 | + vibrations.append( |
| 35 | + [ |
| 36 | + [0.0, 0.0, 0.0], # O stays relatively still |
| 37 | + [0.0, 0.0, 1.0], # H1 moves up |
| 38 | + [0.0, 0.0, 1.0], # H2 moves up |
| 39 | + ] |
| 40 | + ) |
| 41 | + |
| 42 | + # Antisymmetric stretch - H atoms move in opposite directions |
| 43 | + vibrations.append( |
| 44 | + [ |
| 45 | + [0.0, 0.0, 0.0], # O stays relatively still |
| 46 | + [0.0, 0.0, 1.0], # H1 moves up |
| 47 | + [0.0, 0.0, -1.0], # H2 moves down |
| 48 | + ] |
| 49 | + ) |
| 50 | + |
| 51 | + # Bending - H atoms move in opposite directions perpendicular to bonds |
| 52 | + vibrations.append( |
| 53 | + [ |
| 54 | + [0.0, 0.0, 0.0], # O stays relatively still |
| 55 | + [0.0, 1.0, 0.0], # H1 moves right |
| 56 | + [0.0, -1.0, 0.0], # H2 moves left |
| 57 | + ] |
| 58 | + ) |
| 59 | + |
| 60 | + return vibrations |
0 commit comments