#!/bin/sh

"$AMSBIN/ams" << eor

Task GeometryOptimization
System
    Atoms
        Tc 0.272110817637766 -0.2932289632378022 -0.1201108000628093 adf.R=1.967
        O 1.243223428116173 -1.27686977568462 0.8802672273683019 adf.R=1.72
        O 1.269508187601202 0.6575071685794339 -1.128083920893291 adf.R=1.72
        O -0.7941190329950463 0.772362809023308 1.001108330245591 adf.R=1.72
        O -0.6890127458111475 -1.289037354533637 -1.121822955866665 adf.R=1.72
        H -1.301710664548946 1.429266125853318 0.4886421192088731 adf.R=1.30
    End
    BondOrders
         1 2 1.0
         1 3 1.0
         1 4 1.0
         1 5 1.0
         4 6 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


