#!/usr/bin/env amspython
from scm.akfreader import AKFReader
from scm.bert import check_array, check_kf, check_output
from scm.plams import AMSJob
def test_GO_H2O() -> None:
results = AMSJob.from_input(
"""
Task GeometryOptimization
System
Atoms
O 0.0 0.0 0.0
H 1.0 0.0 0.0
H 0.0 0.0 1.0
End
End
Properties
NormalModes Yes
End
Engine ADF
Symmetry NoSym
Basis
Type DZP
CreateOutput Yes
End
EndEngine
""",
name="GO_H2O",
).run()
assert check_output(
results,
From="Orbital Energies, all Irreps",
ToRE="Orbital Energies of the Core Orbitals.*",
)
assert check_output(
results,
NLines=(2, "Dipole moment vector"),
)
assert check_output(
results,
NLines=(1, "Energy (hartree)"),
)
assert check_kf(
"adf%Vibrations%Frequencies[cm-1]",
results,
)
assert check_kf(
"adf%AMSResults%Energy",
results,
)
assert check_kf(
"adf%AMSResults%Charges",
results,
)
assert check_array(
"Normal Mode Frequencies",
AKFReader(results.rkfpath("adf")).read("Vibrations%Frequencies[cm-1]"),
abs_error=1.0,
)