### Check ORCA Installation Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Type 'orca' in the command line to verify if ORCA is installed and accessible in your system's PATH. A successful setup will display a usage message. ```bash orca ``` -------------------------------- ### Point Charges File Content Example Source: https://sites.google.com/site/orcainputlibrary/geometry-input Example content of a point charges file, starting with the number of charges, followed by charge and XYZ coordinates in Angstroms. ```text 3 -0.834 1.374158484 -2.145897424 0.000000000 0.417 2.328008170 -1.973964147 0.000000000 0.417 0.980357969 -1.270385486 0.000000000 ``` -------------------------------- ### orca_loc Localization Input File Example Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis This is an example input file for the orca_loc program, specifying input and output orbital files, operator, orbital range, convergence criteria, and localization method. ```text input-orbitals.gbw # The gbw file containing the orbitals to be read in. output-orbitals.gbw # The name of the file to be created containing the localized orbitals 0 # The operator (0 for alpha, 1 for beta orbitals) 123 # first orbital 140 # last orbital 10000 # Max number of iterations 1.0e-09 # Convergence tolerance 0.0 # relative convergence tolerance of the localization functional value 0.95 # Threshold for strongly localized MOs (e.g. 0.95) 0.85 # Threshold for bonds (e.g. 0.85) 1 # Method for localization (1=PM, 2=FB, 3=IAO-IBO, 4=IAO-BOYS, 5=NEW-BOYS) 1 # Use Cholesky Decomposition (0=false, 1=true, default is true,optional) 0 # Randomize seed for localization (optional) ``` -------------------------------- ### Simple Input Example Source: https://sites.google.com/site/orcainputlibrary/general-input Basic ORCA input using simple keywords for method, basis set, and job type, along with a geometry block. ```text ! B3LYP def2-SVP Opt *xyz 0 1 H 0.0 0.0 0.0 H 0.0 0.0 1.0 * ``` -------------------------------- ### Automatic BSSE Correction Setup (Counterpoise) Source: https://sites.google.com/site/orcainputlibrary/useful-scripts-and-commands-for-orca-inputoutput Bash script for automatic setup of input files for Basis Set Superposition Error (BSSE) corrections using the counterpoise method. Another script is available via a Github link. ```bash input_to_bsse.bash ``` -------------------------------- ### XYZ File Content Example Source: https://sites.google.com/site/orcainputlibrary/geometry-input Example content of an XYZ file used by ORCA, including atom count, description, and atomic coordinates in Angstroms. ```xyz 4 description line C 0.000000000 0.000000000 0.000000000 O 2.362157486 0.000000000 0.000000000 H -1.109548835 1.774545300 0.000000000 H -1.109548835 -1.774545300 0.000000000 ``` -------------------------------- ### Regular NEB Job Setup Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations/tutorial-neb-calculations Use the 'NEB' keyword for the original NEB method to minimize the elastic band and converge to the minimum energy path. This is suitable when the full MEP is of interest, though it can be computationally intensive. ```input ! NEB %neb NEB_End_XYZFile "prod.xyz" Nimages 6 end *xyzfile -1 1 react.xyz ``` -------------------------------- ### ORCA-ASE Geometry Optimization Example Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-ase This snippet demonstrates how to perform a geometry optimization for H2O using the ORCA calculator within ASE. It shows the setup of the ORCA calculator with specific input parameters and the subsequent optimization process. ```python from ase.calculators.orca import ORCA from ase.atoms import Atoms from ase.optimize.lbfgs import LBFGS hareV=27.211399 #ORCA interface does not use xc, basis etc. #Instead 2 keywords: orcasimpleinput and orcablocks are used to specify #the contents of the ORCA ! line in an ORCA inputfile and the block input.- calc = ORCA(label='orca', maxiter=2000, charge=0, mult=1,task='gradient', orcasimpleinput='PBE def2-SVP', orcablocks='%scf Convergence verytight maxiter 300 end %pal nprocs 1 end' ) #Geometry input. Either like this: water = Atoms('OHH', positions=[(0, 0, 0), (1, 0, 0), (0, 1, 0)], calculator=calc) # Or like this: water=ase.io.read('water.xyz') #e_water = water.get_potential_energy() #print("water energy is", e_water) #Optimization stuff #energy(water) opt = LBFGS(water) opt.run(fmax=0.00005) forces = water.get_forces() energy = water.get_potential_energy() positions = water.get_positions() # print("Final energy is", energy, "eV") print("Final energy is", energy/hareV, "hartree") print("All done, final positions are:") print(positions) ``` -------------------------------- ### DLPNO-CCSD(T) Calculation Setup Source: https://sites.google.com/site/orcainputlibrary/coupled-cluster Use this setup for DLPNO-CCSD(T) calculations requiring an auxiliary basis set for integral transformations with RI. ```input ! DLPNO-CCSD(T) cc-pVTZ cc-pVTZ/C TIGHTSCF ``` -------------------------------- ### $new_job Feature for Optimization and Single-Point Source: https://sites.google.com/site/orcainputlibrary/general-input Example of using $new_job to perform a geometry optimization followed by a single-point calculation. ```text ! BP86 def2-SVP def2/J xyzfile Opt %base "bp86opt" *xyz 0 1 coordinates * $new_job ! B3LYP def2-TZVP NORI %base"b3lypsp" *xyzfile 0 1 ``` -------------------------------- ### Block Input for SCF Iterations Source: https://sites.google.com/site/orcainputlibrary/general-input Example of using block input to specify advanced settings, such as increasing the maximum number of SCF iterations. ```text ! %scf MaxIter 100 end ``` -------------------------------- ### Climbing-Image NEB (NEB-CI) Job Setup Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations/tutorial-neb-calculations Employ the 'NEB-CI' keyword for the climbing-image variant. This method is generally more efficient as it focuses on converging one image to the saddlepoint, providing a good estimate of the MEP. ```input ! NEB-CI %neb NEB_End_XYZFile "prod.xyz" Nimages 6 end *xyzfile -1 1 react.xyz ``` -------------------------------- ### Execute ORCA Job in Parallel Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Start the ORCA job using its full path from the scratch directory. The output is redirected to a file in the original submission directory. ```bash cd $tdir $orcadir/orca $job.inp >> $PBS_O_WORKDIR/$job.out ``` -------------------------------- ### Example Output of Orbcentroid Script Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis/localized-orbital-centroid-analysis This output shows the process of reading an orbital file, writing its density, and calculating the centroid in both Bohrs and Angstrom units. It also indicates the creation of a Mol-centroids.xyz file. ```text Reading orbital file: pdcl4-optgeo-SP.mo20a.cube Wrote orbital density file as: pdcl4-optgeo-SP.mo20a-dens.cube Sum of density values is: 55.77302465106467 Number of density values is 512000 Number of orb values is 512000 Orbital-density centroid (Bohrs): 0.23623730154110023 0.0002760832527763559 -0.9859753848007207 Orbital-density centroid (Angstrom): 0.1250113465176148 0.0001460969074544337 -0.521755496202691 Wrote Mol-centroids.xyz with orbital-density centroids for all cubefile (as X): ---------------------------------------- Reading orbital file: pdcl4-optgeo-SP.mo21a.cube Wrote orbital density file as: pdcl4-optgeo-SP.mo21a-dens.cube ... ``` -------------------------------- ### NEB with Transition State Optimization (NEB-TS) Job Setup Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations/tutorial-neb-calculations Utilize the 'NEB-TS' keyword to perform a CI-NEB calculation followed by an explicit transition state optimization (OptTS). This is recommended when a highly accurate saddlepoint is required. ```input ! NEB-TS %neb NEB_End_XYZFile "prod.xyz" Nimages 6 end *xyzfile -1 1 react.xyz ``` -------------------------------- ### QM Geometry Optimization with Chemshell and ORCA (New Interface) Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Example Chemshell input file for performing a QM geometry optimization using ORCA. Ensure the 'orca-chemsh.tcl' script is sourced and ORCA executable path is correctly set. ```tcl c_create coords=test.c { coordinates angstrom Li 0 0 0 Li 0 0 4 } source orca-chemsh.tcl set orcasimpleinput " ! B3LYP RIJCOSX def2-SVP def2/J D3BJ" set orcablocks " %scf MaxIter 500 end %pal nprocs 6 end " ####### dl-find coords=test.c \ result=result.c coordinates=cartesian \ maxcycle=700 maxene=3000 tolerance=0.00045 \ theory= orca : [ list \ executable=/full/path/to/orca \ orcasimpleinput= $orcasimpleinput \ orcablocks= $orcablocks \ charge=0 \ mult=1 ] \ ``` -------------------------------- ### Run ORCA Calculation in Background (Windows) Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Use the 'start /b' command to run ORCA in the background on Windows, allowing you to continue using the command line for other tasks. ```batch start /b orca inputfile.inp > output.out ``` -------------------------------- ### Geometry Optimization with Triple-Zeta Basis Set for Metals Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations When optimizing systems containing metals, it is recommended to use a triple-zeta basis set on the metal atom from the start. This example shows how to specify a triple-zeta basis set for Iron (Fe) within a larger basis set definition. ```orca %basis newgto Fe "def2-TZVP" end end ! RI BP86 def2-SVP def2/J D3BJ TIGHTSCF Opt ``` -------------------------------- ### Example ORCA Input File for H2O Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca This is a sample ORCA input file for a B3LYP calculation with def2-SVP basis set and geometry optimization for a water molecule. It specifies the calculation method, basis set, and atomic coordinates. ```orca ! B3LYP def2-SVP Opt # My first ORCA calculation *xyz 0 1 O 0.000000000 0.000000000 0.000000000 H 0.000000000 0.759337000 0.596043000 H 0.000000000 -0.759337000 0.596043000 * ``` -------------------------------- ### Geometry Optimization with ZORA Source: https://sites.google.com/site/orcainputlibrary/relativistic-approximations Example input for a geometry optimization using the ZORA method. Note that energies from ZORA/DKH2 geometry optimizations may differ from single-point calculations due to the one-center approximation. ```input ! BP86 def2-TZVP SARC/J ZORA Opt ``` -------------------------------- ### B2-PLYP with RI and RIJCOSX for SCF Source: https://sites.google.com/site/orcainputlibrary/dft-calculations/double-hybrid-dft This setup utilizes RI-B2PLYP with RI for the perturbation step and RIJCOSX for the SCF step. It is generally recommended for its speed, being quite fast for small molecules and the fastest for medium to large molecules. Geometry optimizations are also possible with this option. ```orca ! RIJCOSX RI-B2PLYP D3BJ def2-TZVP def2/J def2-TZVP/C TIGHTSCF ``` -------------------------------- ### B2-PLYP with RI and RIJK for SCF Source: https://sites.google.com/site/orcainputlibrary/dft-calculations/double-hybrid-dft This configuration uses RI-B2PLYP with RI for the perturbation step and RIJK for the SCF step. It offers the fastest double hybrid setup for small molecules and supports both single-point energy calculations and geometry optimizations in ORCA 4.0. ```orca ! RIJK RI-B2PLYP D3BJ def2-TZVP def2/JK def2-TZVP/C TIGHTSCF ``` -------------------------------- ### Manual Double Hybrid Definition (DSD-PBEP86) Source: https://sites.google.com/site/orcainputlibrary/dft-calculations/double-hybrid-dft This example shows how to manually define a double-hybrid functional, specifically DSD-PBEP86, by specifying exchange and correlation components and their scaling factors within the %method block. It also includes RI-MP2 and RIJK approximations. ```orca ! B2PLYP D3BJ RIJK def2-TZVP def2-TZVP/C def2/JK TIGHTSCF %method FrozenCore FC_ELECTRONS Exchange x_PBE Correlation c_P86 LDAOpt C_VWN5 ScalHFX 0.69 ScalDFX 0.31 ScalGGAC 0.44 ScalLDAC 0.44 ScalMP2C 1.00 end %method D3S6 0.48 D3A1 0.0 D3S8 0.0 D3A2 5.6 end %mp2 RI on DoSCS True Ps 0.52 Pt 0.22 end ``` -------------------------------- ### B2-PLYP with RI for perturbation step Source: https://sites.google.com/site/orcainputlibrary/dft-calculations/double-hybrid-dft This setup employs the RI-B2PLYP functional with the RI approximation for the perturbation step, significantly reducing computational cost while maintaining reliability. It also uses def2-TZVP/C for the auxiliary basis set. ```orca ! RI-B2PLYP D3BJ def2-TZVP def2-TZVP/C TIGHTSCF ``` -------------------------------- ### Geometry Optimization with DKH2 Source: https://sites.google.com/site/orcainputlibrary/relativistic-approximations Example input for a geometry optimization using the DKH2 method. ZORA is generally recommended for heavy element geometry optimizations due to better stability and reduced grid sensitivity. ```input ! BP86 def2-TZVP SARC/J DKH2 Opt ``` -------------------------------- ### RI-J Approximation with def2/J Auxiliary Basis Set Source: https://sites.google.com/site/orcainputlibrary/basis-sets/ri-and-auxiliary-basis-sets Example of a BP86-GGA DFT calculation using the def2-SVP orbital basis set and the general def2/J auxiliary basis set for RI-J approximation. The RI keyword is optional as RI is default for GGA. ```orca ! BP86 def2-TZVP def2/J ``` -------------------------------- ### Chemshell Dynamics Initialization Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Initializes a Chemshell dynamics simulation, setting up coordinates, timestep, temperature, ensemble, and ORCA as the QM theory. ```tcl dynamics dyn1 coords=initial.c \ timestep = 0.001 \ temperature = 10 \ ensemble = NVT \ nosehoover=4 \ taut=0.02 \ theory= orca : [ list \ executable=/full/path/to/orca \ orcasimpleinput= $orcasimpleinput \ orcablocks= $orcablocks \ charge=0 \ mult=1 ] ``` -------------------------------- ### Create Initial QRO Orbitals with DFT Source: https://sites.google.com/site/orcainputlibrary/casscf-calculations/tutorial-setting-up-the-orbitals-for-a-cas-calculation Use the UNO keyword in a single-point DFT calculation to generate quasi-restricted orbitals (QROs) and unrestricted natural orbitals (UNOs). The QRO orbitals are saved in a .qro file. ```input ! BP86 def2-SVP def2/J UNO Normalprint ``` -------------------------------- ### ORCA Settings for Semi-Empirical QM/MM Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Configures ORCA for a semi-empirical calculation (PM3) within a QM/MM setup. ```tcl # ORCA settings for simple input line # Here using the semiempirical PM3 method set orcasimpleinput " ! PM3 TIGHTSCF" ``` -------------------------------- ### Restarting Single-Point Calculation with Manual Orbital Input Source: https://sites.google.com/site/orcainputlibrary/restarting-calculations Use MORead and %moinp to manually specify the ORCA-GBW file from which to read orbitals for restarting a single-point calculation. Ensure the GBW file name does not match the input file name. ```orca ! MORead %moinp "jobname2.gbw" # Note that if jobname2.gbw is the gbw file you read in then jobname2.inp can not be the name of the inputfile. *xyz 0 1 _coordinates_ * ``` -------------------------------- ### Simple MD Simulation Input Source: https://sites.google.com/site/orcainputlibrary/molecular-dynamics This input performs a basic MD simulation using PBE/def2-SVP. It uses the Velocity Verlet algorithm in the NVT ensemble with a 0.5 fs timestep and initializes velocities at 350 K. Temperature is maintained using a Berendsen thermostat, and trajectory is saved to 'trajectory.xyz'. ```input ! PBE def2-SVP def2/J MD %md timestep 0.5_fs initvel 350_k thermostat berendsen 350_k timecon 10_fs dump position stride 1 filename "trajectory.xyz" run 200 end ``` -------------------------------- ### Basic CPCM Solvation Input Source: https://sites.google.com/site/orcainputlibrary/continuum-solvation-cpcmcosmo-smd Use the CPCM keyword with the solvent name in parentheses for simple solvation calculations. For example, CPCM(Water) specifies water as the solvent. ```input ! CPCM(Water) ``` -------------------------------- ### Inspect and Prepare QRO Orbitals Source: https://sites.google.com/site/orcainputlibrary/casscf-calculations/tutorial-setting-up-the-orbitals-for-a-cas-calculation Read previously calculated QRO orbitals using MOREAD and prevent SCF iterations with NoIter. Configure output to print basis and MO coefficients for visualization with external programs. ```input ! BP86 def2-SVP def2/J Normalprint NoIter MOREAD %moinp "job1.qro" %output Print[ P_Basis ] 2 Print[ P_MOs ] 1 end ``` -------------------------------- ### Basic DFT Input for Diatomic Molecule (I2) Source: https://sites.google.com/site/orcainputlibrary/orca-common-errors-and-problems This is a straightforward restricted DFT calculation input for a diatomic molecule. It is used as an example to demonstrate potential SCF convergence problems. ```input ! B3LYP def2-TZVPP tightscf kdiis *xyz 0 1 I -0.8112688 -0.2430916 0.0150128 I 1.8686027 -0.3386353 -0.0757158 * ``` -------------------------------- ### TS Optimization with Exact Hessian Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations/tutorial-saddlepoint-ts-optimization-via-relaxed-scan This method is generally necessary for reliable TS optimization, even when close to the saddle point. It calculates the exact Hessian at the start and can optionally recalculate it periodically. ```orca ! PM3 OptTS NumFreq %geom Calc_Hess true # Calculate Hessian in the beginning NumHess true # Request numerical Hessian (analytical not available) Recalc_Hess 5 # Recalculate the Hessian every 5 steps end *xyz -1 1 C -1.99283303076949 -0.43906204115263 0.01309547131865 Cl 0.08654162182067 -0.43514846620583 -0.01623959206210 H -2.09531444966205 -1.26265127699215 0.70686814906647 H -2.12108831451492 -0.62708960496606 -1.04443065188875 H -2.10329090994441 0.57197871671963 0.38153156676382 F -4.09261491692978 -0.44315732740297 0.0430850568019 * ``` -------------------------------- ### Delta-SCF Excited State Calculation Source: https://sites.google.com/site/orcainputlibrary/excited-state-calculations Guides an SCF calculation to an excited state solution of the same multiplicity by rotating orbitals from a ground-state calculation. Ensure to check results with orbital and population analysis. ```orca ! BP86 def2-SVP def2/J MOREAD %moinp "ground-state-orbitals.gbw" %scf rotate {50,51,90,0,0} end end ``` -------------------------------- ### Copy Necessary Files to Scratch Directory Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Copy essential input files (e.g., .inp, .gbw, .xyz, .hess, .pc) from the submission directory to the temporary scratch directory. This ensures ORCA has access to all required data. ```bash cp $PBS_O_WORKDIR/*.inp $tdir/ cp $PBS_O_WORKDIR/*.gbw $tdir/ cp $PBS_O_WORKDIR/*.xyz $tdir/ cp $PBS_O_WORKDIR/*.hess $tdir/ cp $PBS_O_WORKDIR/*.pc $tdir/ ``` -------------------------------- ### Adjusting Max Iterations for CPSCF Convergence in ORCA Source: https://sites.google.com/site/orcainputlibrary/molecular-properties If the CPSCF equations fail to converge, you can increase the maximum number of iterations by setting 'maxiter' within the %eprnmr block. This example sets it to 124. ```orca %eprnmr maxiter 124 end ``` -------------------------------- ### Modify MCA Environment Variable for OpenMPI Network Interfaces Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca To suppress OpenMPI warning messages related to network interfaces, modify the OMPI_MCA_btl environment variable. This example sets it to 'self,tcp,sm'. ```bash export OMPI_MCA_btl=self,tcp,sm ``` -------------------------------- ### Create Local Scratch Folder for ORCA Job Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Create a temporary directory on the computing node for ORCA to use as scratch space. This helps manage temporary files during the job execution. ```bash if [ ! -d /scratch/$USER ] then mkdir -p /scratch/$USER fi tdir=$(mktemp -d /scratch/$USER/orcajob__$PBS_JOBID-XXXX) ``` -------------------------------- ### SCS-MP3 Calculation Source: https://sites.google.com/site/orcainputlibrary/mp2-mp3 Execute Grimme's SCS-MP3 method. This method is computationally very expensive. ```input ! SCS-MP3 cc-pVTZ TightSCF ``` -------------------------------- ### Full HFC Tensor Calculation for Molybdenum in ORCA Source: https://sites.google.com/site/orcainputlibrary/molecular-properties This example shows how to compute the full Hyperfine Coupling (HFC) tensor for molybdenum, including the spin-orbit coupling contribution (aorb). This is typically needed for heavy elements. ```orca nuclei = all Mo {aiso, adip, aorb} ``` -------------------------------- ### Input with Orbital Rotation for SCF Convergence Source: https://sites.google.com/site/orcainputlibrary/orca-common-errors-and-problems This input demonstrates how to rotate specific orbitals (HOMO and LUMO in this case) to help reconverge an SCF calculation to a more chemically sensible solution. It requires reading previous orbitals using MOREAD. ```input ! B3LYP def2-TZVPP tightscf kdiis MOREAD %moinp "previous.gbw" %scf rotate {24,25,90,0,0} end end ``` -------------------------------- ### RI-J Approximation with SARC/J Auxiliary Basis Set for ZORA/DKH Source: https://sites.google.com/site/orcainputlibrary/basis-sets/ri-and-auxiliary-basis-sets Example for ZORA/DKH calculations requiring the SARC/J auxiliary basis set for a decontracted RI-J approximation. This ensures proper handling of relativistic effects with RI. ```orca ! ZORA/DKH def2-TZVP SARC/J ``` -------------------------------- ### Request Pipek-Mezey Localized Orbitals Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis This command requests the Pipek-Mezey localization method for orbitals after SCF convergence. Other methods like Foster-Boys, IAOIBO, and IAOBOYS are also available. ```orca %loc LocMet PM # Requests the Pipek-Mezey (PM) localization method. Alternatively the Foster-Boys (FB), IAOIBO and IAOBOYS can be chosen. end ``` -------------------------------- ### XES Calculation with Spin-Orbit Coupling (SOC) Source: https://sites.google.com/site/orcainputlibrary/excited-state-calculations/x-ray-spectroscopy-xas-xes-rocis Configure ORCA for X-ray Emission Spectroscopy (XES) calculations including spin-orbit coupling (SOC). Ensure CoreOrbSOC lists orbitals after SOC is applied. This setup is for UKS calculations. ```input %xes CoreOrb 0,0 OrbOp 0,1 CoreOrbSOC 0,1 # Core orbitals defined again for SOC. DoSOC true end ``` -------------------------------- ### Calculate Unrestricted Natural Orbitals (UNOs) Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis Request UNOs after SCF convergence by including the UNO keyword. To analyze UNOs or QROs, use Normalprint with Noiter and MOREAD, specifying the same basis set as the original calculation. ```input ! UNO ``` ```input !Normalprint noiter MOREAD def2-SVP %moinp "jobname.qro" ``` -------------------------------- ### Open-shell DLPNO-CCSD(T) Calculation Setup Source: https://sites.google.com/site/orcainputlibrary/coupled-cluster Configure open-shell DLPNO-CCSD(T) calculations. QRO orbitals are automatically used for transforming UHF alpha/beta sets. This method is suitable for neutral radicals, anion radicals, and transition metal complexes. ```input ! DLPNO-CCSD(T) cc-pVTZ cc-pVTZ/C RIJCOSX def2/J TIGHTSCF ``` -------------------------------- ### Automate Orbital/Density Plots from Cube Files with VMD Source: https://sites.google.com/site/orcainputlibrary/useful-scripts-and-commands-for-orca-inputoutput Use this bash script to automatically generate VMD visualization states for multiple cube files. It requires VMD and the ImageMagick convert utility. Run the script with the number of isosurfaces as an argument. ```bash vmd file.xyz -e load_all_plt.vmd play plot_all.vmd ``` -------------------------------- ### Visualizing Previously Calculated Orbitals Source: https://sites.google.com/site/orcainputlibrary/visualization-and-printing Use the MOREAD and NoIter keywords to read and print previously calculated orbitals (e.g., localized orbitals) from a file. Ensure the basis set matches the original calculation and remove any %scf Maxiter keyword. ```orca ! Normalprint MOREAD NoIter def2-SVP Printbasis PrintMOs %moinp "localizedorbitals.loc" # Here reading in a previously calculated .loc file for visualization of the localized orbitals. ``` -------------------------------- ### Run CASSCF Calculation Source: https://sites.google.com/site/orcainputlibrary/casscf-calculations/tutorial-setting-up-the-orbitals-for-a-cas-calculation Perform a CASSCF calculation using the prepared orbitals. Ensure the basis set matches the DFT calculation to avoid basis set projection. Configure the active space with nel, norb, and mult. ```input ! def2-SVP def2-SVP/C Normalprint MOREAD %moinp "job2.gbw" %casscf trafostep ri nel 4 norb 3 mult 1 end ``` -------------------------------- ### Modify HF Exchange in Hybrid Functionals Source: https://sites.google.com/site/orcainputlibrary/dft-calculations Adjust the Hartree-Fock (HF) exchange percentage in hybrid functionals. This example changes the HF exchange of B3LYP from the default 20% to 15%. Requires knowledge of GGA and LDA exchange components. ```input ! B3LYP def2-TZVP %method ScalHFX = 0.15 end ``` -------------------------------- ### Specify Auxiliary Basis Sets in %basis Block Source: https://sites.google.com/site/orcainputlibrary/basis-sets Auxiliary basis sets for RI approximations can be explicitly defined within the %basis block for clarity. This example shows how to specify basis sets for RI-J, RI-JK, CABS, and other RI transformations. ```orca %basis Basis "def2-TZVP" Aux "def2/J" AuxJK "def2/JK" AuxC "def2-TZVP/C" CABS "cc-pVDZ-F12-OptRI" end ``` -------------------------------- ### PBS Job Submission Script for ORCA Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca A sample PBS job submission script for running ORCA. It configures environment variables, sets up scratch space, copies necessary files, and executes the ORCA job. ```bash #!/bin/bash #PBS -l nodes=1:ppn=8 #PBS -q short # Usage of this script: #qsub -N jobname job-orca.sh , where jobname is the name of your ORCA inputfile (jobname.inp) without the .inp extension # Jobname below is set automatically when using "qsub -N jobname job-orca.sh ". Can alternatively be set manually here. Should be the name of the inputfile without extension (.inp or whatever). export job=$PBS_JOBNAME #Setting OPENMPI paths here: export PATH=/users/home/user/openmpi/bin:$PATH export LD_LIBRARY_PATH=/users/home/user/openmpi/lib:$LD_LIBRARY_PATH # Here giving the path to the ORCA binaries and giving communication protocol export orcadir=/users/home/user/orca_4_0_1_linux_x86-64_openmpi201 export RSH_COMMAND="/usr/bin/ssh -x" export PATH=$orcadir:$PATH # Creating local scratch folder for the user on the computing node. /scratch directory must exist. if [ ! -d /scratch/$USER ] then mkdir -p /scratch/$USER fi tdir=$(mktemp -d /scratch/$USER/orcajob__$PBS_JOBID-XXXX) # Copy only the necessary files for ORCA from submit directory to scratch directory: inputfile, xyz-files, GBW-file etc. # Add more here if needed. cp $PBS_O_WORKDIR/*.inp $tdir/ cp $PBS_O_WORKDIR/*.gbw $tdir/ cp $PBS_O_WORKDIR/*.xyz $tdir/ cp $PBS_O_WORKDIR/*.hess $tdir/ cp $PBS_O_WORKDIR/*.pc $tdir/ # Creating nodefile in scratch cat ${PBS_NODEFILE} > $tdir/$job.nodes # cd to scratch cd $tdir # Copy job and node info to beginning of outputfile echo "Job execution start: $(date)" >> $PBS_O_WORKDIR/$job.out echo "Shared library path: $LD_LIBRARY_PATH" >> $PBS_O_WORKDIR/$job.out echo "PBS Job ID is: ${PBS_JOBID}" >> $PBS_O_WORKDIR/$job.out echo "PBS Job name is: ${PBS_JOBNAME}" >> $PBS_O_WORKDIR/$job.out cat $PBS_NODEFILE >> $PBS_O_WORKDIR/$job.out #Start ORCA job. ORCA is started using full pathname (necessary for parallel execution). Output file is written directly to submit directory on frontnode. $orcadir/orca $job.inp >> $PBS_O_WORKDIR/$job.out ``` -------------------------------- ### Basic ORCA Calculation Command Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Execute an ORCA calculation by providing the input file name. The output is redirected to a specified file. Use '.inp' for Mac/Linux and '.txt' for Windows. ```bash orca inputfile.inp > output.out ``` ```bash orca inputfile.txt > output.out ``` -------------------------------- ### Create Nodefile for Parallel Execution Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Generate a nodefile in the scratch directory that lists the computing nodes allocated to the job. This is used by ORCA for parallel communication. ```bash cat ${PBS_NODEFILE} > $tdir/$job.nodes ``` -------------------------------- ### Single-Point ZORA Calculation with SARC Basis Set for Heavy Elements Source: https://sites.google.com/site/orcainputlibrary/relativistic-approximations For molecules containing heavy elements (e.g., Pt), explicitly define the SARC basis set using the %basis block. This example uses ZORA with ZORA-def2-TZVP for lighter elements and SARC-ZORA-TZVP for Pt. ```input ! BP86 ZORA ZORA-def2-TZVP SARC/J %basis NewGTO Pt "SARC-ZORA-TZVP" end end *xyz 0 1 H 0 0 0 F 0 0 1 Pt 0 0 2 * ``` -------------------------------- ### $new_job Feature for Multiple Single-Point Calculations Source: https://sites.google.com/site/orcainputlibrary/general-input Using the $new_job feature to run multiple single-point energy calculations with different bases and charges on the same geometry. ```text ! BP86 def2-SVP def2/J xyzfile %base "bp86" *xyz 0 1 coordinates * $new_job ! B3LYP def2-SVP NORI %base"b3lyp" *xyzfile 0 1 ``` -------------------------------- ### Relaxed Surface Scan Input Source: https://sites.google.com/site/orcainputlibrary/geometry-optimizations/tutorial-saddlepoint-ts-optimization-via-relaxed-scan This input file performs a relaxed surface scan to find an approximate minimum energy path connecting reactants and products. It uses the PM3 semi-empirical method and scans the distance between two atoms. Remember that ORCA atom indices start from 0. ```orca ! PM3 Opt %geom Scan B 5 0 = 3.0, 1.2, 15 # Scanning the distance between atom 5 and atom 0 from distance 3.0 Å to 1.2 Å in 15 points. end end *xyz -1 1 C -1.55384 -0.43723 0.00000 Cl -0.48384 -0.43723 0.00000 H -1.91051 -1.20940 0.64919 H -1.91051 -0.61336 -0.99331 H -1.91051 0.51106 0.34413 F -4.54939 -0.44897 0.08390 * ``` -------------------------------- ### Restarting Single-Point Calculation with Older ORCA Version GBW File Source: https://sites.google.com/site/orcainputlibrary/restarting-calculations Employ the Rescue keyword along with MORead and %moinp when the GBW file originates from an older ORCA version to ensure compatibility during restart. ```orca ! MORead Rescue %moinp "jobname2.gbw" *xyz 0 1 _coordinates_ * ``` -------------------------------- ### Block Input for TDDFT Calculation Source: https://sites.google.com/site/orcainputlibrary/general-input Demonstrates using block input to configure a multi-root TDDFT calculation. ```text ! BP86 def2-SVP def2/J %scf maxiter 100 end %tddft nroots 10 end ``` -------------------------------- ### Manually Specifying Special Grid Settings in ORCA Source: https://sites.google.com/site/orcainputlibrary/numerical-precision In rare cases, you may need to manually specify grid settings, such as increasing the radial grid (IntAcc) for specific atoms. This example shows how to set a special grid for iron (atomic number 26). Note: This is less likely to be required in ORCA 5.0. ```orca %method SpecialGridAtoms 26 # (26 is here the atomic number for iron) SpecialGridIntAcc 7 end *xyz 0 2 Fe 0.0 0.0 0.0 Cl 0.0 0.0 1.0 * ``` -------------------------------- ### Convert ORCA output to Molden format Source: https://sites.google.com/site/orcainputlibrary/visualization-and-printing Use this command to create a Molden file from an ORCA basename. This file can then be used for visualization of orbitals, geometries, and frequencies in tools like IboView. ```bash orca_2mkl basename -molden ``` -------------------------------- ### Restart BS-DFT Calculation using MOREAD and %moinp Source: https://sites.google.com/site/orcainputlibrary/dft-calculations/broken-symmetry-dft Restart a converged BS-DFT calculation or an almost-converged one that failed in the BS step by reading orbitals using MOREAD and %moinp. Specify UKS to converge to the open-shell singlet state. The multiplicity in the *xyz line selects the BS-state. ```orca ! BP def2-SVP def2/J MOREAD UKS %moinp "previousorbitals.gbw" *xyz 6 1 # The multiplicity of the BS-state is now selected here. Fe 0.0 0.0 0.0 Fe 0.0 0.0 3.0 * ``` -------------------------------- ### $new_job Feature for Multiple XYZ Files Source: https://sites.google.com/site/orcainputlibrary/general-input Illustrates using $new_job to run calculations on multiple different XYZ files, disabling automatic orbital restarting. ```text ! BP86 def2-SVP def2/J NOAUTOSTART *xyzfile -1 4 C-.xyz $new_job ! BP86 def2-SVP def2/J NOAUTOSTART *xyzfile 0 3 C.xyz $new_job ! BP86 def2-SVP def2/J NOAUTOSTART *xyzfile -1 1 Cl-.xyz $new_job ! BP86 def2-SVP def2/J NOAUTOSTART *xyzfile 0 2 Cl.xyz ``` -------------------------------- ### Logging Simulation Data Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Writes detailed simulation data, including step, time, energies, temperature, and forces, to a log file. Ensure the file handle 'fprot' is properly opened before use. ```tcl puts $fprot [ format "%8d %14.4f %12.6f %12.6f %12.6f %14.2f %13.5e %12.3e " \ $istep \ [ dyn1 get time ] \ [ dyn1 get potential_energy ] \ [ dyn1 get kinetic_energy ] \ [ dyn1 get total_energy ] \ [ dyn1 get temperature ] \ [ dyn1 get constraint_force ] \ [ dyn1 get friction ] ] flush $fprot ``` -------------------------------- ### SMD Solvation Model Input Source: https://sites.google.com/site/orcainputlibrary/continuum-solvation-cpcmcosmo-smd Enable the SMD solvation model by setting 'smd true' in the %cpcm block and specifying the solvent using the SMDSolvent keyword. ```input ! CPCM %cpcm smd true SMDsolvent "DMF" end ``` ```input %cpcm smd true SMDsolvent "WATER" end ``` -------------------------------- ### ORCA QM Region Settings for QM/MM Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Sets up basic ORCA input parameters for the QM region in a QM/MM calculation. ```tcl # ORCA settings for simple input line set orcasimpleinput " ! BP86 def2-SVP def2/J TIGHTSCF " ``` -------------------------------- ### Main Simulation Loop Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Executes the main molecular dynamics simulation loop for a specified number of steps. Includes error handling and checks for an 'EXIT' file to allow graceful termination. ```tcl for { set istep $first } { $istep < $first + $NSTEP } { incr istep } { # Try to catch errors and abort gracefully (1 if error occurred) #set errorflag [ catch { mdstep #} # ] #if { $errorflag } { # puts "*** Error during MD step. Aborting..." # mdstop #} # Allow graceful termination via EXIT file (1 if file exists) set exitflag [ file exists EXIT ] if { $exitflag } { puts "*** EXIT file detected. Terminating..." mdstop } } ``` -------------------------------- ### ORCA Configuration for DFT Molecular Dynamics Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Sets up ORCA parameters for DFT molecular dynamics simulations, including executable path, charge, multiplicity, and input settings. ```tcl theory= orca : [ list \ executable=/full/path/to/orca \ orcasimpleinput= $orcasimpleinput \ orcablocks= $orcablocks \ charge=0 \ mult=1 ] ``` -------------------------------- ### Configuring CP-SCF Solver for Frequency Calculations Source: https://sites.google.com/site/orcainputlibrary/vibrational-frequencies-thermochemistry Adjust the CP-SCF solver and maximum iterations if convergence issues arise during frequency calculations. Pople is recommended, but DIIS can be used. ```input ! Opt Freq %method Z_solver Pople # Pople usually recommended. DIIS sometimes. Z_MaxIter 300 end ``` -------------------------------- ### DL-Find for Hybrid QM/MM with ORCA Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Executes a hybrid QM/MM calculation using dl-find, specifying ORCA for the QM part and DL-POLY for the MM part. ```bash dl-find coords= ${sys_name_id}.c \ result= ${dir}/result.c \ residues= $residues \ active_atoms= $act \ maxcycle=700 \ theory=hybrid : [ list \ groups = $groups \ coupling=shift \ cutoff=1000.0 \ atom_charges= $charges \ qm_region= $qmatoms \ debug=no \ qm_theory= orca : [ list \ executable=/full/path/to/orca \ charge=0 \ mult=1 \ orcasimpleinput= $orcasimpleinput \ orcablocks= $orcablocks ] \ mm_theory=dl_poly : [ list \ list_option=none \ debug=no \ exact_srf=yes \ use_pairlist=no \ mxlist=16000 \ cutoff=1000 \ mxexcl=2000 \ debug_memory=no \ scale14 = { 1.0 1.0 } \ atom_types= $types \ use_charmm_psf=yes \ charmm_psf_file= ${sys_name_id}.psf \ charmm_parameter_file= $prm \ charmm_mass_file= $top ] ] ``` -------------------------------- ### Perform Atoms-In-Molecules (AIM) Analysis Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis AIM analysis can be performed on ORCA-calculated electron densities for closed-shell wavefunctions. The orca_2aim program converts ORCA gbw files to WFN files for topological analysis. Alternatively, include the AIM keyword in the ORCA input file to automatically generate the WFN file. ```bash orca_2aim jobname ``` ```input ! AIM ``` -------------------------------- ### Visualizing Difference Densities with orca_plot Source: https://sites.google.com/site/orcainputlibrary/excited-state-calculations/tddft Visualize difference densities for excited states using orca_plot. This requires the original job.gbw file and the job.cis file from the TDDFT calculation. Select option 6 for difference densities. ```bash orca_plot job.gbw -i ``` -------------------------------- ### ORCA Input for Localized Orbitals Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis/localized-orbital-centroid-analysis This input file configures ORCA to calculate localized molecular orbitals using the Pipek-Mezey method. ```input ! B97-3c tightscf %loc LocMet PM end *xyz -2 1 Pd 0.125239 -0.000000 -0.521828 Cl 2.060659 -1.059704 -1.438936 Cl 0.124805 -1.562606 1.285617 Cl 0.125673 1.562606 -2.329273 Cl -1.810182 1.059704 0.395280 * ``` -------------------------------- ### Conditional MD Step Configuration Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell Configures simulation parameters like temperature and ensemble based on the current simulation step. Useful for setting up multi-stage dynamics. ```tcl if { ! ($istep % 10) } { dyn1 output } if { ($istep == $stepb) } { dyn1 configure temperature = $tempb ensemble=NVT } if { ($istep == $stepc) } { dyn1 configure temperature = $tempc ensemble=NVT } if { ($istep == $stepd) } { dyn1 configure temperature = $tempd ensemble=NVT } if { ($istep == $stepe) } { dyn1 configure temperature = $tempe ensemble=NVT } ``` -------------------------------- ### Generated ORCA Input File for QM Optimization Source: https://sites.google.com/site/orcainputlibrary/interfaces-and-qmmm/orca-chemshell The ORCA input file automatically generated by the Chemshell script for a QM geometry optimization. This shows how Chemshell translates its settings into ORCA keywords and blocks. ```text ! B3LYP RIJCOSX def2-SVP def2/J Grid4 FinalGrid5 D3BJ Engrad %scf MaxIter 500 end %pal nprocs 6 end %scf AutoStart false #This part will change in the next optimization step. end %coords CTyp xyz Charge 0 Mult 1 Units bohrs coords Li 0.0000000000 0.0000000000 0.0000000000 Li 0.0000000000 0.0000000000 7.5589066540 end end ``` -------------------------------- ### Adjusting CP-SCF Solver for Raman Polarizability Source: https://sites.google.com/site/orcainputlibrary/vibrational-frequencies-thermochemistry If CP-SCF fails during Raman polarizability calculations, try switching solvers. CG and DIIS are alternatives to the default Pople solver. ```input %elprop Polar 1 Solver CG # default is Pople, alternatives are CG and DIIS end ``` -------------------------------- ### Simple FOD Calculation Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis/fod-analysis Perform a basic FOD analysis using the default TPSS/def2-TZVP settings. This is suitable for most cases when static correlation is suspected. ```input ! FOD *xyz 0 1 C 0.0000000 1.2077612 0.7161013 C 0.0000000 0.0000000 1.3596219 C 0.0000000 -1.2077612 0.7161013 C 0.0000000 -1.2077612 -0.7161013 C 0.0000000 0.0000000 -1.3596219 C 0.0000000 1.2077612 -0.7161013 H 0.0000000 2.1606260 1.2276695 H 0.0000000 -2.1606260 1.2276695 H 0.0000000 -2.1606260 -1.2276695 H 0.0000000 2.1606260 -1.2276695 * ``` -------------------------------- ### Configure ORCA for Parallel Execution with !PalX Source: https://sites.google.com/site/orcainputlibrary/setting-up-orca Use the !PalX keyword in your ORCA input file to specify the number of processes for parallel execution. This is an alternative to using mpirun directly. ```input ! B3LYP def2-SVP Opt PAL4 ``` -------------------------------- ### Request Natural Bond Orbital (NBO) Analysis Source: https://sites.google.com/site/orcainputlibrary/orbital-and-density-analysis To perform NBO analysis, the NBO6 code must be purchased and its executable path set via the NBOEXE environment variable. Request NBO analysis by including the NBO keyword. Similar to UNOs, NBOs can be analyzed using Normalprint with Noiter and MOREAD. ```input ! NBO ``` ```input !Normalprint noiter MOREAD def2-SVP %moinp "jobname.nbo" ```