#!/bin/sh

"$AMSBIN/ams" << eor

Task GeometryOptimization
System
    Atoms
        Tc 0.2603351449574755 -0.2858525191817276 -0.09772912578727461 adf.R=1.967
        O 1.246540333315905 -1.276990466780664 0.8932660735359204 adf.R=1.72
        O 1.253070274863279 0.6994444174766385 -1.088011790514577 adf.R=1.72
        O -0.7265344570781371 0.7077552752080589 0.8900727037215382 adf.R=1.72
        O -0.7317006417604701 -1.273622822300144 -1.086239980070297 adf.R=1.72
    End
    Charge -1
    BondOrders
         1 2 1.0
         1 3 1.0
         1 4 1.0
         1 5 1.0
    End
End

Engine ADF
    Basis
        Type TZ2P
        Core None
    End
    Save TAPE10
    XC
        GGA OPBE
    End
    Relativity
        Level Spin-Orbit
    End
    Symmetry NOSYM
    Solvation
        Surf Delley
        Solv name=Water cav0=0.0 cav1=0.0067639
        Charged method=CONJ
        C-Mat POT
        SCF VAR ALL 
        CSMRSP
    End
    NumericalQuality VeryGood
EndEngine
eor

# =======
# NMR NMR
# =======

cp "${AMS_RESULTSDIR-${AMS_JOBNAME-ams}.results}/adf.rkf" TAPE21
cp "${AMS_RESULTSDIR-${AMS_JOBNAME-ams}.results}/TAPE10" TAPE10

"$AMSBIN/nmr" << eor
NMR
    out    iso    tens
    adfgui
    Atoms 1 
    u1k best
    calc all
End

eor

mv TAPE21 "${AMS_RESULTSDIR-${AMS_JOBNAME-ams}.results}/adf.rkf"
rm -f TAPE10 TAPE15


