# 3. Transition state for H3O+ inversion

This will be done using GC-NEB, a code recently published with
[How the Bioinspired Fe2Mo6S8 Chevrel Breaks Electrocatalytic Nitrogen Reduction Scaling Relations](https://doi.org/10.1021/jacs.2c03661).


We first need two converged end-points for an NEB calculation.
For this example, we have pre-converged a solvated H3O+ ion in an up and down orientation (Check Visualize.ipynb).
The CONTCAR files in the 00 and 06 subfolders will be the start and end geometries.

The `inputs` file within this folder should be mostly familiar by now.
The only new tag is "nimages", set to 5, indicating that NEB will
be run with 5 images, 01 through 05, between the endpoints 00 and 06.


## Run the calculation

We first need to make initial images for the NEB path. Run:
    
    gcneb_setup.py -h
    
to list script options. Make 5 images interpolated between 00 and 06 using:

    gcneb_setup.py -i 00/CONTCAR -f 06/CONTCAR -n 5

Now that we have POSCAR files the 01 - 05 folders, we can run:
   
    sub_JDFTx.py -o GCNEB -test True -g True
    
Note that this job may take some time to complete, but we can start analyzing the results on the fly.


## Analysis

1. As the calculation is running, monitor `neb.log` to see the time, energy and gcneb path forces at each gcneb step.

2. Open `Analyze.ipynb` to check the energies along the NEB path. Rerun the cells to regularly update the energy numbers and plot.
    
3. The inversion barrier is the largest energy in the path, which should be around 0.13 eV for H3O+ inversion.


## Visualization

Open `Visualize.ipynb` to compare the structures along the entire path.
