Non-Interactive plotting using orca_plot

ORCA provides a convenient way to plot orbitals and densities (alright, not so convenient) in the form of a small binary called orca_plot. This text-based interface (Figure 1) allows you to select what you want to plot, the grid quality and the output for the plot.

Figure showing a print of the orca_plot software. It is just a bunch of text with numerical options.
Figure 1 – orca_plot in action

As easy as it is to plot one surface this way, it can easily become annoying to do it several times if you need to plot several surfaces. The good news is that you can plot using non-interactive mode too by just piping a series of numbers to the binary. So, instead of typing the options sequentially like this: 1, 1, 3, 0, 4, 120, 5, 7, 2, 54, 10, 11 you can just put the numbers in a text file, line by line:

1
1
3
0
4
120
5
7
2
54
10
11

Save it as a txt file (or whatever, like PLOT.txt) and concatenate it to the orca_plot software:

orca_plot RDB_Se_a.$i.gbw -i < PLOT.txt

You can even repeat the operations for a bunch of GBW files if they are sequentially ordered like this in Figure 2 using a little shell scripting:

Picture showing the result of the ls command on Linux. The files containing .gbw extension are all sequentially numbered from 001 to 040.
Figure 2 – Sequentially generated GBW files form a relaxed scan procedure.
for i in {001..040}; do orca_plot RDB_OSSe_NH.$i.gbw -i < PLOT.txt; done

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.