#! Symmetry tests for a range of molecules.  This doesn't actually compute any energies, but
#! serves as an example of the many ways to specify geometries in Psi4.

memory 250 mb

# DinftyH Symmetry (D2h Abelian)
molecule C2H2 {
   C 0 0  r1
   C 0 0 -r1
   H 0 0  r2
   H 0 0 -r2
   r1 = 0.65
   r2 = 1.75
}

print_out("\tC2H2 Test...")
C2H2.update_geometry()
C2H2.print_out()


# C2h Symmetry
molecule N2H2 {
   N
   N 1 rNN
   H 1 rNH 2 aHNN
   H 2 rNH 1 aHNN 3 180.0

   rNH  = 1.0
   rNN  = 1.4
   aHNN = 140.0
}

print_out("\tN2H2 Test...")
N2H2.update_geometry()
N2H2.print_out()


# CinftyV Symmetry (C2v Abelian)
molecule CN {
   0 2
   C 0.0 0.0 0.0
   N 0.0 0.0 r
   r = 1.4
}

print_out("\tCN Test...")
CN.update_geometry()
CN.print_out()


# Td Symmetry (C2v Abelian)
molecule CH4 {
   C
   H 1 r
   H 1 r 2 TDA
   H 1 r 2 TDA 3 120
   H 1 r 2 TDA 4 120

   r = 1.09
}

print_out("\tCH4 Test...")
CH4.update_geometry()
CH4.print_out()


# CinftyV Symmetry (C2v Abelian)
molecule CN {
   0 2
   C 0.0 0.0 0.0
   N 0.0 0.0 r
   r = 1.4
}

print_out("\tCN Test...")
CN.update_geometry()
CN.print_out()


# C3v Symmetry (Cs subgroup)
molecule NH3 {
    X
    N 1 1.0
    H 2 rNH 1 aXNH
    H 2 rNH 1 aXNH 3 120.0
    H 2 rNH 1 aXNH 4 120.0

    rNH = 0.95
    aXNH = 115.0
}

print_out("\tNH3 Test...")
NH3.update_geometry()
NH3.print_out()


# C2v Symmetry (could also be D2)
molecule triplet_ethylene {
    C1
    C2 C1 rCC
    H1 C1 rCH C2 aHCC
    H2 C1 rCH C2 aHCC H1 180.0
    H3 C2 rCH C1 aHCC H1 D
    H4 C2 rCH C1 aHCC H3 180.0

    rCC  = 1.41
    rCH  = 1.09
    aHCC = 122.0
    D    = 90.0
}

print_out("\tTriplet Ethylene Test...")
triplet_ethylene.update_geometry()
triplet_ethylene.print_out()


# D2h Symmetry
molecule singlet_ethylene {
    C1
    C2 C1 rCC
    H1 C1 rCH C2 aHCC
    H2 C1 rCH C2 aHCC H1 180.0
    H3 C2 rCH C1 aHCC H1 D
    H4 C2 rCH C1 aHCC H3 180.0

    rCC  = 1.41
    rCH  = 1.09
    aHCC = 122.0
    D    = 0.0
}

print_out("\tSinglet Ethylene Test...")
singlet_ethylene.update_geometry()
singlet_ethylene.print_out()


# D2 Symmetry
molecule ethylene_cation {
    C1
    C2 C1 rCC
    H1 C1 rCH C2 aHCC
    H2 C1 rCH C2 aHCC H1 180.0
    H3 C2 rCH C1 aHCC H1 D
    H4 C2 rCH C1 aHCC H3 180.0

    rCC  = 1.41
    rCH  = 1.09
    aHCC = 122.0
    D    = 45.0
}

print_out("\tEthylene Cation Test...")
ethylene_cation.update_geometry()
ethylene_cation.print_out()


# C2 Symmetry
molecule H2O2 {
   O1
   O2, O1, rOO
   H1, O1, rOH, O2, aHOO
   H2, O2, rOH, O1, aHOO, H1, D

   rOO  = 1.4
   rOH  = 1.1
   aHOO = 105.
   D    = 95
}

print_out("\tH2O2 Test...")
H2O2.update_geometry()
H2O2.print_out()

# Ci Symmetry
molecule C4H4Cl2F2 {
units    bohr
 C     0.432781050498     1.898774028282     0.810337938486
 C    -1.658744642774     0.805191018766    -0.984829058337
 C     1.658744642774    -0.805191018766     0.984829058337
 C    -0.432781050498    -1.898774028282    -0.810337938486
 H    -0.317971784026     2.532165941971     2.640915161238
 H    -1.615729990528     1.614062700629    -2.881498569657
 H     1.615729990528    -1.614062700629     2.881498569657
 H     0.317971784026    -2.532165941971    -2.640915161238
 Cl   -4.852178875691     1.024620478757     0.190249941464
 Cl    4.852178875691    -1.024620478757    -0.190249941464
 F    -1.913713787211    -3.739567959534     0.258534542158
 F     1.913713787211     3.739567959534    -0.258534542158
}

print_out("\tC4H4Cl2F2 test...")
C4H4Cl2F2.update_geometry()
C4H4Cl2F2.print_out()


# S4 Symmetry (C2 Abelian)
molecule Li_H2O_4_p {
   1 1
   X
   Li 1 1.0
   X 2 1.0 1 90.0
   X 2 1.0 3 90.0 1 180.0
   O 2 oli 1 olix 3 -90.0
   O 2 oli 1 olix 3 90.0
   O 2 oli 4 olix 3 0.0
   O 2 oli 4 olix 3 180.0
   H 5 oh1 2 lioh1 1 xlioh1
   H 5 oh2 2 lioh2 1 xlioh2
   H 6 oh1 2 lioh1 1 xlioh1
   H 6 oh2 2 lioh2 1 xlioh2
   H 7 oh1 2 lioh1 4 -xlioh1
   H 7 oh2 2 lioh2 4 -xlioh2
   H 8 oh1 2 lioh1 4 -xlioh1
   H 8 oh2 2 lioh2 4 -xlioh2

   olix=52.0
   oli=1.9
   oh1=0.952
   oh2=0.950
   lioh1=125.4
   lioh2=124.8
   xlioh1=-40.0
   xlioh2=135.0
}

print_out("\tLi(H20)_4^+ Test...")
Li_H2O_4_p.update_geometry()
Li_H2O_4_p.print_out()
