Visualization and printing

single

Visualization programs

Various GUI programs that can visualize results from ORCA output and/or create coordinates/inputfiles are available:



Controlling printing in ORCA output

Controlling what and how much information ORCA prints to the outputfile: this is a balance between too little information and too much information.

Having ORCA print too much leads to too large outputfiles, affecting disk space over time, while sometimes it is useful to have ORCA print output that it by default does not print. You e.g. don't want ORCA to print a lot of electronic structure information during a geometry optimization (because usually you only care about the electronic structure at the optimized geometry).

General printing keywords

For minimal printing use !MiniPrint . This will only print coordinates, grid information, SCF iterations, orbital energies and property output.

The default printing setting in ORCA (Smallprint) will in addition print some basis set information, SCF settings, minimal Mulliken, Löwdin and Mayer population analysis. 

The !NormalPrint option will in addition to Smallprint, print a Löwdin orbital analysis (useful to analyze the MOs) and more detailed SCF iteration output.

The !LargePrint option will in addition to Normalprint print the full basis set, composition of the guess orbitals, the final molecular orbitals and density (these outputfiles can easily become very large in filesize).

Specific printing options (see manual for a full list)

To print the basis set in the outputfile, use: 

!Printbasis

To print the molecular orbitals in the outputfile: 

!PrintMOs

ORCA reduces printing in geometry optimization steps by default (prints full output in the first and last steps only). If more information is needed in each optimization step (for example to monitor the electronic structure through the population analysis during the optimization) use this: 

%geom ReducePrint false end


Visualizing Vibrational Frequencies

Some molecular viewers like Chemcraft can visualize the frequencies directly from an ORCA outputfile. 

The orca_pltvib program (part of the distributed ORCA binaries) can also create xyz trajectories for each vibrational mode using the calculated Hessian.

$ orca_pltvib

usage: orca_pltvib Output-file vibrations

 vibrations are: all - all vibrations

             or: a list like 1 34 19 26

Example: 

orca_pltvib jobname.out 6 7   # This will create vibrational mode no. 6 and no. 7 as xyz trajectory files.

The Hessian file jobname.hess can also be used.

orca_pltvib jobname.hess 6 7   # This will create vibrational mode no. 6 and no. 7 as xyz trajectory files.

This will create XYZ trajectory files jobname.out.v006.xyz and jobname.out.v007.xyz that can be animated in programs such as Chemcraft, Avogadro, VMD etc.


Creating spectra using orca_mapspc

The orca_mapspc program (part of the ORCA package) can be used to create spectra from an ORCA spectroscopy calculation. The program creates simple text files containing energies and intensities that can then be plotted using any plotting program ( e.g. GnuPlot, Origin, Excel, Mjograph).

$ orca_mapspc

usage: orca_mapspc Output-file {ABS, ABSV, ABSQ, CD, IR, RAMAN, NRVS, VDOS, MCD, SOCABS, XES, XESV, XESQ, XAS, XASV, XASQ, XESSOC, XASSOC} -options

  -o  output file

  -cm use cm**-1 (default)

  -eV use eV (default cm**-1)

  -g  use Gaussian lineshape default

  -l  use Lorentz  lineshape

  -x0 initial point of spectrum

  -x1 final   point of spectrum

  -w  line width

  -kw coeffitient for the line width calculated as kw*sqrt(energy)

  -n  number of points

Examples:

-Plotting an IR spectrum in the region 300-4000 cm-1 using default broadening (requires ORCA outputfile from a NumFreq job)

orca_mapspc jobname.out IR -x0300 -x14000    # Note the x0 and x1 symbols before the 300 and 4000 values.  

      

This will create two files jobname.out.ir.dat and  jobname.out.ir.stk. The jobname.out.ir.stk file will contain the calculated frequencies and intensities. The dat file contains a broadened spectrum.

-Plotting a UV-VIS spectrum in the 10000-30000 cm-1 region using 1000 cm-1 broadening (requires ORCA outputfile from an excited-state job, e.g. TDDFT)

orca_mapspc jobname.out ABS -x010000 -x130000 -w1000

Will create jobname.out.abs.dat (broadened spectrum) and jobname.out.abs.stk (energies and intensities of calculated transitions).

- Plotting an Fe K-edge XAS spectrum (with quadrupole contributions) in the 3000-9000 eV range, 1 eV broadening and 5000 points.

orca_mapspc jobname.out ABSQ -eV -x03000 -x19000 -w1.0 -n5000

- Plotting an Fe XES spectrum (with quadrupole contributions) in the 100-7100 eV range, 1 eV broadening and 5000 points.

orca_mapspc jobname.out XESQ -eV -x0100 -x17100 -w1.0 -n5000


Visualizing Molecular Orbitals from ORCA

Molecular orbitals from an SCF calculation are always available from the GBW file which is a file in binary format. By using the orca_plot program (in the same directory as the main orca program) you can acquire the orbitals (e.g. in Cube text format) from the GBW file.

orca_plot file.gbw -i 

Also note that other orbitals  that are created by ORCA (such as UNOs, QROs, UCOs, localized orbitals etc.,  see Orbital and density analysis) also have their own GBW files that can be read in the same way:

orca_plot file.uno -i # To read in UNOs

orca_plot file.qro -i  # To read in QROs

orca_plot file.uco -i # To read in corresponding orbitals

orca_plot file.loc -i  # To read in localized orbitals

orca_plot file.s1.nto -i  # To read in NTOs

The orca_plot program will show you a menu with options to plot different types of orbitals, densities etc. If you enter 1 and press Enter, you will get to a new menu where you can select what type of plot you want, press 5 to change output file format, press 4 to change resolution, 2 and 3 to change the orbital to plot and press to generate the selected plot.

PlotType       ... MO-PLOT

MO/Operator    ... 0 0

Format         ... Grid3D/Binary

Resolution     ... 40 40 40

Boundaries     ...   -13.572248    13.572248 (x direction)

                     -13.463043    13.463043 (y direction)

                     -13.278247    13.278247 (z direction)

       1 - Enter type of plot

       2 - Enter no of orbital to plot

       3 - Enter operator of orbital (0=alpha,1=beta)

       4 - Enter number of grid intervals

       5 - Select output file format

       6 - Plot CIS/TD-DFT difference densities

       7 - Plot CIS/TD-DFT transition densities

       8 - Set AO(=1) vs MO(=1) to plot

      10 - Generate the plot

      11 - exit this program

Enter a number:

You can also tell ORCA to print specific orbitals in the inputfile directly. The Cube file format is used here which can be opened in programs such as VMD, Avogadro, JMol, Chemcraft. See the script page for a nice script to automate visualization of Cube files in VMD.

! UKS BP86 def2-SVP def2/J

%plots

Format CUBE

MO("Orbital-4.cube",4,0); #This would print orbital 4 of operator 0 (alpha spinorbital)

MO("Orbital-8.cube”,8,1); #This would print orbital 8 of operator 1 (beta spinorbital)

end

You can also tell ORCA to print all the necessary information (basis set and MO coefficients) in the outputfile so that a software such as Chemcraft can later render the orbitals. This is convenient but also increases the size of the outputfile.


!  Normalprint Printbasis PrintMOs

One can even use this approach for visualizing previously calculated orbitals, localized orbitals, UNOs, QROs (see Orbital and density analysis) etc. This requires a separate inputfile. In the input below, previously calculated localized orbitals are read in and printed out (without iterations using the Noiter keyword; make sure to specify the same basis set as before to prevent basis set projection). Chemcraft can then later render the orbitals from the outputfile alone. Make sure to remember to remove any %scf Maxiter keyword, because this overrides the Noiter keyword.

!  Normalprint MOREAD NoIter def2-SVP Printbasis PrintMOs

%moinp "localizedorbitals.loc" # Here reading in a previously calculated .loc file for visualization of the localized orbitals. 


Visualizing Electron Density or Spin Density

There are roughly 3 ways of visualizing electron densities or spin densities in a convenient way .

1. One is to tell ORCA in the inputfile to plot the densities once the calculation is done:

! UKS BP86 def2-SVP def2/J

%plots

dim1 100

dim2 100

dim3 100

Format Gaussian_Cube

SpinDens("spindensity");

ElDens("electrondensity");

end

2. The other way is to use orca_plot after the calculation is done plot density/spin density plots from the files. 

Here shown for a broken-symmetry solution of H2 (alpha spin localized on H1 and beta spin localized on H2) :

! BP def2-SVP def2/J 

%scf

Flipspin 0

FinalMs 0.0

end

*xyz 0 3

H 0.0 0.0 0.0

H 0.0 0.0 3.0

*

This calculation produces a GBW-file, e.g. named job.gbw and (since ORCA5) a densities file, e.g named job.densities (if missing: make sure that your job-submission script copies back the file from the scratch).
The job.densities file can be inspected by orca_plot:

orca_plot job.densities  

which reveals:


The DensityContainer provides the following densities:

Please make sure that densities and gbw-file match.



---------------------

List of density names

---------------------


Index:                                                   Name of Density

------------------------------------------------------------------------

    0:                                                           job.scfp

    1:                                                           job.scfr

This means that the file contains both an SCF electron density (job.scfp) and and an SCF spin density (job.scfr) which is consistent with the open-shell SCF calculation we performed. Note that the densities file from wavefunction theory jobs may contain even more densities.

To access the electron density and spin density and make an isosurface plot you call orca_plot using the GBW file as input and add the -i flag:

orca_plot job.gbw -i  

Here you can select file format (option 5 and then e.g. 7 for Cube format), resolution (option 4 and then X gridpoints), type of plot (option 1) which should reveal this menu:

Plot-Type is presently: 1

     1 -   molecular orbitals

     2 -   (scf) electron density      ......  (scfp  )  - available

     3 -   (scf) spin density          ......  (scfr  )  - available

     4 -   natural orbitals

     5 -   corresponding orbitals

     6 -   atomic orbitals

     7 -   mdci electron density       ......  (mdcip )  - NOT available

     8 -   mdci spin density           ......  (mdcir )  - NOT available

     9 -   OO-RI-MP2 density           ......  (pmp2re)  - NOT available

    10 -   OO-RI-MP2 spin density      ......  (pmp2ur)  - NOT available

    11 -   MP2 relaxed density         ......  (pmp2re)  - NOT available

    12 -   MP2 unrelaxed density       ......  (pmp2ur)  - NOT available

    13 -   MP2 relaxed spin density    ......  (rmp2re)  - NOT available

    14 -   MP2 unrelaxed spin density  ......  (rmp2ur)  - NOT available

    15 -   LED dispersion interaction density  (ded21 )  - NOT available

    16 -   Atom pair density

    17 -   Shielding Tensors

    18 -   Polarisability Tensor

Enter Type:

Now you can select either option 2 (SCF electron density) or option 3 (SCF spin density) which orca_plot should reveal as available (the job.gbw and the job.densities file need to be in the same directory and must have the same basename, i.e. can not have been renamed). Once you have chosen your density, the program will ask you if you have selected correctly, type y or n. That brings you back to the main menu and you can then choose option 10 to generate the plot. You can go back to the Plot-type menu and plot multiple densities in the same session. The files created will be called:  job.eldens.cube and job.spindens.cube (if the Gaussian cube format was selected). The Cube File Format is chosen, the file can be open in programs like JMol, Chemcraft, Chimera, VMD.

Note: Spin and electron density plots can also be generated for excited states, e.g. from a TDDFT calculation. See TDDFT page for more information about this.

3. A third way is to have a visualization program render the electron density or spin density from the available MO coefficients. This requires you to run an ORCA job with the following options:


!  Normalprint Printbasis PrintMOs

A program like Chemcraft can then open the respective ORCA outputfile, next calculate and render the electron density or spin density since all information is present in the ORCA output file. For Chemcraft: choose the menubar  Tools -> Orbitals -> Render molecular orbitals. In the same list as the orbitals you should find the option of plotting the electron density or the spin density.

Figure 1. Upper: H2 at 3.0 Å. Middle: Electron density Lower: Spin density