Skip to content

CrespiLab/ExtOptORCA-OpenQP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ExtOptORCA-OpenQP

The oqp_orca_wrapper is a Python script that can be used to run optimizations with OpenQP MRSF and the ORCA external optimizer (see details at ORCA manual).

The script reads the files INPUT_NAME.extinp.tmp and INPUT_NAME.xyz (generated by ORCA when called with the ExtOpt keyword), substitutes a few fields in the hard-coded input example for OpenQP MRSF, runs OpenQP with that geometry, and then extracts the MRSF-TDDFT gradient from the grad_# file to feed it back to the ORCA optimizer.

If your ORCA installation runs jobs in a scratch directory, you might want to fetch the following files from the scratch at the end of the run (these files contain the last MRSF gradient calculation, which might be useful in some situations):

EXT_ORCA_FOR_OQP.* 
grad_*
energy

INPUT PREPARATION

As described in the ORCA 6.0.1 documentation (see ORCA manual), you must specify the location of the wrapper script using one of the following methods:

  1. As a file or link named otool_external in the same directory as the ORCA executables.
  2. By assigning the EXTOPTEXE environment variable to the full path of the external program.
  3. Via the ORCA input:
%method
  ProgExt "/full/path/to/script"
  Ext_Params "optional command line arguments"
end

Regardless of which option is used, the keyword Ext_Params can specify additional command line arguments as a single string. Possible arguments are:

  1. -s N [M], --states N [M] An integer designating the singlet state for optimization (e.g., "1" for the first singlet state—which is the ground state, "2" for the first excited singlet, etc.).
  2. -b basis-set, --basis-set basis-set The basis set in OpenQP format (e.g., 6-31g(d) or 6-31g* depending on your version/build).
  3. -c N, --charge N System charge, default = 0
  4. --conical With 2 states given, calculates the so-called "penalty function" for CI search. Read more at https://sharc-md.org/?page_id=1454#tth_sEc8.20 or for the full paper: https://doi.org/10.1021/jp0761618. Associated arguments for the penalty function construction are --alpha and --sigma.

Example:

Ext_Params "-s 2 -b 6-31g*"    # This example will optimize S1 (i.e. SECOND
singlet state) with the 6-31g* basis set.

Since the ORCA optimizer takes the whole task of changing coordinates (based on gradient), it can also be used to run such jobs as TS search, constrained optimizations and potential energy surface scans (see also in examples)

EXAMPLES

In the examples directory we provide a few usage examples we've tested so far:

  1. ethylene_s1_opt The most generic ORCA input example with S1 ethylene optimization.
  2. ethylene_constraint S1 state of ethylene, optimized with fixed 45 degrees angle between CH2 fragments.
  3. stilbene_scan S0 dihedral angle scan in stilbene molecule.
  4. stilbene_TS Stilbene ground state TS search. Unfortunately, analytical MRSF Hessian is not currently implemented in OpenQP; in the current example, we use the numerical Hessian calculated at the GFN2-xTB level as a guess. To use that method, you do not need any special arguments for the script, instead, make sure to use the OptTS keyword in the ORCA input file.
  5. benzene_CI Conical intersection optimization for benzene. No analytical non-adiabatic coupling is available in OpenQP currently, thus we use a simpler penalty function approach. Remember that when --conical is called, two electronic states should be provided. The penalty function parameters alpha and sigma are set to 0.02 and 3.5, respectively, by default, as advised in Levine et al. Since the gradient is constructed by the external tool, ORCA does not need any additional keywords in the input file (i.e. you should use "! ExtOpt Opt")

OpenQP input changes

More OpenQP specifications (like functional, SCF type, etc.) can also be changed within the oqp_orca_wrapper script.

Thank you for using the script!

Best,

Crespi group,

Uppsala University

About

Run optimizations with OpenQP MRSF and the ORCA external optimizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages