Skip to content

Commit

Permalink
added some minimal examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hochej committed Feb 17, 2021
1 parent 625924c commit 53df3c3
Show file tree
Hide file tree
Showing 10 changed files with 176 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions NEB/examples/water_flip_g16_excited_state/neb.gjf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%Chk=grad.chk
%Nproc=1
%Mem=1Gb
# B3LYP/def2SVP Force td(nstates=2, root=1)
NoSymm

s1 gradient

0 1
@geom



25 changes: 25 additions & 0 deletions NEB/examples/water_flip_g16_excited_state/neb_main_g16.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# for Slurm
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --mem=1Gb
#SBATCH --job-name=neb_main_g16
#SBATCH --output=neb_main_g16.err

xyz=water_flip.xyz
SCRATCHDIR=/sscratch/${SLURM_JOBID}

cd $SLURM_SUBMIT_DIR

optimize_neb $xyz \
--procs_per_image=4 \
--mem_per_image=1Gb \
--parallel_images=10 \
--scratch_dir=$SCRATCHDIR \
--print_every=1 \
--integrator=bfgs \
--optimize_endpoints \
--calculator=g16 \
&> neb_main_g16.out

echo "FINISHED"
50 changes: 50 additions & 0 deletions NEB/examples/water_flip_g16_excited_state/water_flip.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
3
File written by XYZ.py
h 0.811165000000000 0.834945000000000 0.000000000000000
o 0.177670000000000 0.000000000000000 0.000000000000000
h 0.811165000000000 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.630906111111111 0.834945000000000 0.000000000000000
o 0.138187777777778 0.000000000000000 0.000000000000000
h 0.630906111111111 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.450647222222222 0.834945000000000 0.000000000000000
o 0.098705555555556 0.000000000000000 0.000000000000000
h 0.450647222222222 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.270388333333333 0.834945000000000 0.000000000000000
o 0.059223333333333 0.000000000000000 0.000000000000000
h 0.270388333333333 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.090129444444444 0.834945000000000 0.000000000000000
o 0.019741111111111 0.000000000000000 0.000000000000000
h 0.090129444444444 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.090129444444444 0.834945000000000 0.000000000000000
o -0.019741111111111 0.000000000000000 0.000000000000000
h -0.090129444444444 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.270388333333333 0.834945000000000 0.000000000000000
o -0.059223333333333 0.000000000000000 0.000000000000000
h -0.270388333333333 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.450647222222222 0.834945000000000 0.000000000000000
o -0.098705555555555 0.000000000000000 0.000000000000000
h -0.450647222222222 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.630906111111111 0.834945000000000 0.000000000000000
o -0.138187777777778 0.000000000000000 0.000000000000000
h -0.630906111111111 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.811165000000000 0.834945000000000 0.000000000000000
o -0.177670000000000 0.000000000000000 0.000000000000000
h -0.811165000000000 -0.834945000000000 0.000000000000000
Empty file.
25 changes: 25 additions & 0 deletions NEB/examples/water_flip_qchem/neb_main_qchem.sub
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# for Slurm
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --mem=1Gb
#SBATCH --job-name=neb_main_g16
#SBATCH --output=neb_main_g16.err

xyz=water_flip.xyz
SCRATCHDIR=/sscratch/${SLURM_JOBID}

cd $SLURM_SUBMIT_DIR

optimize_neb $xyz \
--procs_per_image=4 \
--mem_per_image=1Gb \
--parallel_images=10 \
--scratch_dir=$SCRATCHDIR \
--print_every=1 \
--integrator=bfgs \
--optimize_endpoints \
--calculator=qchem \
&> neb_main_g16.out

echo "FINISHED"
50 changes: 50 additions & 0 deletions NEB/examples/water_flip_qchem/water_flip.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
3
File written by XYZ.py
h 0.811165000000000 0.834945000000000 0.000000000000000
o 0.177670000000000 0.000000000000000 0.000000000000000
h 0.811165000000000 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.630906111111111 0.834945000000000 0.000000000000000
o 0.138187777777778 0.000000000000000 0.000000000000000
h 0.630906111111111 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.450647222222222 0.834945000000000 0.000000000000000
o 0.098705555555556 0.000000000000000 0.000000000000000
h 0.450647222222222 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.270388333333333 0.834945000000000 0.000000000000000
o 0.059223333333333 0.000000000000000 0.000000000000000
h 0.270388333333333 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h 0.090129444444444 0.834945000000000 0.000000000000000
o 0.019741111111111 0.000000000000000 0.000000000000000
h 0.090129444444444 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.090129444444444 0.834945000000000 0.000000000000000
o -0.019741111111111 0.000000000000000 0.000000000000000
h -0.090129444444444 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.270388333333333 0.834945000000000 0.000000000000000
o -0.059223333333333 0.000000000000000 0.000000000000000
h -0.270388333333333 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.450647222222222 0.834945000000000 0.000000000000000
o -0.098705555555555 0.000000000000000 0.000000000000000
h -0.450647222222222 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.630906111111111 0.834945000000000 0.000000000000000
o -0.138187777777778 0.000000000000000 0.000000000000000
h -0.630906111111111 -0.834945000000000 0.000000000000000
3
File written by XYZ.py
h -0.811165000000000 0.834945000000000 0.000000000000000
o -0.177670000000000 0.000000000000000 0.000000000000000
h -0.811165000000000 -0.834945000000000 0.000000000000000
19 changes: 13 additions & 6 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ using the nudged elastic band (NEB) algorithm.
#### Initial Path
The initial path for the NEB should be interpolated between the two minimum structures. There are two different
algorithms that can be used. Either a linear interpolation (in internal coordinates), which is a for example a part
of the DFTBaby package by A. Humeniuk (see interpolate_linearly.py in DFTBaby). The more sophisticated way is to use
of the DFTBaby package by A. Humeniuk (see `interpolate_linearly.py` in DFTBaby). The more sophisticated way is to use
the geodesic interpolation algorithm developed by T. Martinez and coworkers (see [Ref.](https://aip.scitation.org/doi/full/10.1063/1.5090303)).
Their algorithm is implemented in a python package and can be obtained from their [Github repository](https://github.com/virtualzx-nad/geodesic-interpolate).
A number of 12 to 16 interpolated structures is often a good choice.


###Interface to Gaussian 16 or 09
#### Interface to Gaussian 16 or 09
In addition you have to set up a Gaussian input script called `neb.gjf`
that computes the gradient and saves it in a checkpoint file called
'grad.chk'. The geometry is updated via a file called `geom` that
Expand All @@ -97,7 +97,7 @@ In addition you have to set up a Gaussian input script called `neb.gjf`
--------------------------------------
```

###Interface to Q-Chem
#### Interface to Q-Chem
To use the NEB package in combination with Q-Chem you have to prepare a Q-Chem input
script called `neb.in`. Within this input file it is important that you request a force calculation
and that a Checkpoint file will be written. An example input script is shown below:
Expand Down Expand Up @@ -139,7 +139,7 @@ $rem
```


### Visualization of results
#### Visualization of results
After successful minimization of the reaction pathn you can plot the energy of the path during each iteration. Within the
directory where the `neb_####.xyz` and `path_energies_####.dat` files are located, you can just call:
```
Expand All @@ -151,8 +151,15 @@ This will open a Matplotlib window where you can slide through the iterations as

### Examples

A minimal example with a submit script can be found in the NEB/examples directory. Make sure that the optimize_neb script
is within your PATH variable, so that it can be called from the command-line.
Some examples with a submit script can be found in the NEB/examples directory.
- `water_flip_g16`: Reaction path of water flip with Gaussian16 in the singlet ground state at the DFT level.
- `water_flip_g16_excited_state`: Reaction path of water flip with Gaussian16 in the first singlet excited state at the DFT level.
- `water_flip_qchem`: Reaction path of water flip with Q-Chem in the singlet ground state at the DFT level.<br>
<br>
Make sure that the `optimize_neb` script
is within your `PATH variable, so that it can be called from the command-line. The NEB computations can be performed in the
electronic ground state as well as in the excited state. The interfaces allow these features at least for Gaussian 16 and Q-Chem. Optimization
within the frame of spin-polarised/unrestricted wave functions are also possible and tested with Gaussian 16 and Q-Chem.

--------------
Optional arguments:
Expand Down

0 comments on commit 53df3c3

Please sign in to comment.