Skip to content

Latest commit

 

History

History
159 lines (110 loc) · 4.81 KB

scripts.md

File metadata and controls

159 lines (110 loc) · 4.81 KB
layout title
post
Scripts
<style> .myButton { background-color:#ffd9ce; border-radius:17px; display:inline-block; cursor: pointer; color:#000000; /* font-family: Arial; */ /* font-size: 28px; */ padding: 7px 12px; text-decoration: none; } .myButton:hover { background-color:#e86f87; } .myButton:active { position: relative; top:1px; } </style>

Here are some Python and Bash scripts that I routinely use and share, divided by use case. In most cases, running these "dry" (with no arguments) prints the usage text you can see here. Click on the button to download a script.

ORCA/XTB

utils.py

Small library of Python functions required by some of these scripts.


orcasub.sh

Slurm batch script to run ORCA calculations with the latest setup for
Grace, Yale's HPC cluster. Usage: 

  orcasub.sh basename[.inp/.xyz] [n_cores]

If ncores is not specified, it is tentatively extracted from basename.inp

orcasub_scratch.sh

Slurm batch script to run ORCA calculations with the latest setup for
Grace, Yale's HPC cluster, storing temporary files in a scratch folder.
Usage: 

  orcasub.sh basename[.inp/.xyz]

orcasub_batch.sh

Python script to run a series of ORCA calculations via
orcasub_scratch.sh. Usage: 

  python orcasub_batch.py basename[.inp/.xyz]

mkorca.py

Makes one or more ORCA inputs following the desired specifications. Syntax:

  python mkorca.py conf*.xyz [option]

conf*.xyz: base name of input geometry file(s)
option:
  sp:     single-point energy calculation
  fastsp: fast single-point energy calculation
  optf:   optimization + frequency calculation
  popt:   partial optimization (specify distance constraint)
  ts:     eigenvector-following saddle point optimization
  nmr:    single-point energy calculation with NMR shieldings.

Each of these options might have different default levels of theory.
Manually check/modify this script at your convenience.

mkorcascan.py

Makes an ORCA input file for a distance scan. Syntax:

  python mkorcascan.py filename.xyz i1 i2 target

filename.xyz: base name of input geometry file
i1/i2: indices of atoms to scan
target: desired distance between indices at end of scan

check.py

Check running and completed ORCA jobs and prints/plots relevant information.
For scans, also extracts local maxima structures. Syntax:

  python check.py filename[.out] [i1] [i2] [zoom]

filename: base name of input/output file (with or without extension)
i1/i2: optional, plot i1-i2 distance during optimization steps
zoom: optional, only shows plot of last 20 iterations

compare.py

Compare completed ORCA jobs electronic/free energy of groups of jobs and
prints collected energy values. Syntax:

  python compare.py conf*.out [g] [x=folder/file.xyz]
       
conf*.out: base name of output file(s)
g: optional, uses free energy for the comparison (needs freq calculations)
x: extract conformers from the specified files, removing duplicates
   (similarity pruning via TSCoDe) and high-energy conformers
   (5 kcal/mol threshold)

update.py

Updates ORCA input files by replacing them with the last step of
the optimization trajectory. Syntax:

  python update.py conf*.xyz

conf*.xyz: base name of input geometry file(s)

xtbopt.py

Optimizes the specified geometry/ies, compares results and replaces
the input file. Syntax:

  python xtbopt.py filename*.xyz [newfile] [ff] [sp] [c] [charge=n]

filename*.xyz: Base name of input geometry file(s)
newfile: Optional, creates a new file, preserving the original
ff: Optional, use GFN-FF instead of GFN2-XTB
sp: Optional, run a single point energy calculation
c: Optional, specify one or more distance/dihedral constraints
charge=n: Optional, where "n" is an integer. Specify the total charge