# GAMESS-UK NH3 inversion DFT (BLYP) transition state optimisation

# Initialise ChemShell
from chemsh import *

# Read in NH3 geometry from disk
my_mol = Fragment(coords="nh3.xyz")

# Set up the QM calculation
my_theory = GAMESS_UK(frag=my_mol, method="dft", functional="blyp", basis="3-21g")

# Request an optimisation using DL-FIND
opt = Opt(theory=my_theory, dimer=True, coordinates="dlc", algorithm="lbfgs",
          delta=0.01, tolerance=0.0003, trust_radius="const")
opt.run()

# Save the optimised transition state geometry to disk
my_mol.save("dimer_opt.xyz")
