Avogadro2¶
Avogadro2 is a graphical molecular editor and analysis tool. It is used to build molecular structures, to generate input files for quantum chemistry programs, and to analyze results, for example the molecular orbitals and vibrational modes of an ORCA calculation.
Available¶
- Roihu-CPU: 2.0.0
Avogadro2 is available in the Desktop app of the Roihu web interface at www.roihu.csc.fi. It runs in a container with software rendering (CPU).
License¶
Avogadro2 is free and open source software, distributed under the BSD 3-clause license.
Usage¶
Avogadro2 is a graphical program. Use it in the Desktop app of the Roihu web interface.
- Log in to the Roihu web interface.
- Select Apps → Desktop.
- Select your Project and the Partition
interactive. Set Memory (GiB) to 4. Click Launch. - In My Interactive Sessions, wait until the Desktop session is Running, then click Launch Desktop.
- In the desktop, double-click the Avogadro 2 icon, or select Applications → Chemistry → Avogadro 2.
- If a Version Update window appears, select Ignore.
For a complete example, see the tutorial.
Importing a structure¶
Select Build → Insert → Molecule... to pick a structure from the fragment library:
- Type a name in the Filter field, or expand a category (for example
aromatics). The preview shows the molecule. - Click Insert. The Files panel shows the formula (for benzene
C6H6).
To use your own structure file:
- Upload the structure file to Roihu with the Files web interface app: select the directory (for example
/scratch/<project>) and click Upload. - In Avogadro2, select File → Open and select the file. Many formats (
.xyz,.mol2,.pdb,.cif, etc.) are read through Open Babel.
Building a structure¶
- Draw a structure with the draw tool, or import one (see above).
- Optimize the geometry with Extensions → Open Babel → Optimize Geometry. This force-field pre-optimization gives a reasonable start geometry for the quantum chemistry calculation. Select the force field with Extensions → Open Babel → Configure Force Field....
- Export the coordinates with File → Export Molecule (or the Export Molecule... button in the toolbar), for example as
mymolecule.xyz. Save the file in your project directory, for example in/scratch/<project>.
Generating an input file¶
The structure in the Avogadro2 window is used as the coordinates of the input file.
- Select Input → ORCA... to open the ORCA Input Generator. The Input menu has generators for several programs, for example Gaussian, NWChem, MOLPRO and Psi. The generators only write input files, and the program itself must be available on Roihu.
- Set the options in the tabs (Basic, SCF, Basis, Electric Properties). On the Basic tab you can set, for example, the calculation type, the theory, the charge and the multiplicity.
- Set Processor Cores and Memory (total memory in GiB). The preview window (
job.inp) shows the result. The number of cores gives%pal nprocs, which must be equal to the number of MPI tasks in the batch script (--nodes×--ntasks-per-node). The memory gives%MaxCore, the memory per MPI process in MB. For example, 4 cores and 6 GiB give%MaxCore 1536. In the batch script,--mem-per-cpumust have the same value as%MaxCore. See the ORCA page. - To view orbitals later, select Print Molecular Orbitals. This adds the keywords
PrintMOs PrintBasisto the input. - Click Save Input.... In the file dialog, select your project directory and the file name, for example
/scratch/<project>/benzene/job.inp, and click Save. Use a separate directory for each calculation. - Create a batch script and submit the calculation, see below.
Running the calculation¶
ORCA is not installed centrally at CSC. Install a private copy, see the ORCA page. Submit the job from the Roihu CPU login node.
Create a batch script job.sh in the same directory as job.inp. If you saved the input with another name, use that name in the script. The values below match the example above (4 cores, 6 GiB, %MaxCore 1536). Replace the text in angle brackets (<...>) with your own values:
#!/bin/bash
#SBATCH --partition=small
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4 # same as %pal nprocs
#SBATCH --mem-per-cpu=1536 # MB, same as %MaxCore
#SBATCH --account=<project>
#SBATCH --time=01:00:00
export ORCADIR=/projappl/<project>/<user>/orca/<orca-directory>
module purge
module load orca/6.1.1
${ORCADIR}/orca job.inp > job.out
Submit the job from the login node:
When the job has finished, the end of job.out shows ORCA TERMINATED NORMALLY. Then open job.out in Avogadro2 to view the results, see below. For the available partitions and other options, see the Roihu batch job partitions page.
Analyzing ORCA output¶
- Open the ORCA output file with File → Open and select the
.outfile. - Molecular orbitals: select Analyze → Molecular Orbitals.... The window lists the orbitals with their energies (eV) and occupations. Select an orbital, for example
HOMOorLUMO, set the Quality and click Render. This requiresPrintMOs PrintBasisin the ORCA input. The option Print Molecular Orbitals of the input generator adds them. - Vibrational modes: select Analyze → Vibrational Modes.... The window lists the frequencies (cm⁻¹) and the IR intensities (km/mol). Select a mode to animate it, change the Amplitude with the slider, and click Stop Animation to stop. The first six frequencies of a non-linear molecule are zero: they are the translations and rotations. This requires a frequency calculation (Calculation Type
Freq). - IR spectrum: select Analyze → Plot Spectra.... The Vibrational Spectra window shows the transmission against the wavenumber (cm⁻¹), with a smoothed and a raw curve. The drop-down list under the plot shows the spectrum type (Infrared), and Options... opens the plot settings.
Tips¶
- A terminal window opens together with Avogadro2 and closes when you quit Avogadro2.
- Copy-paste between your local computer and the desktop works via the noVNC clipboard. Open the Clipboard menu from the tab on the left edge of the desktop window, paste your text there, and then paste normally inside the desktop.
- The file dialog may open in another directory. Type the full path of the file in the File name field to go there directly.
- Avogadro2 shows only the final geometry of a Gaussian optimization log. The energies of the steps are in the log:
grep 'SCF Done' <jobname>.log. - For the frequencies and orbitals of a Gaussian job, convert the checkpoint file with
formchk <jobname>.chkand open<jobname>.fchk.
References¶
The Avogadro project plans a separate Avogadro2 paper. Until it appears, cite the original Avogadro paper and the version of Avogadro2 that you used:
- Hanwell, M. D. et al. Avogadro: an advanced semantic chemical editor, visualization, and analysis platform. J. Cheminform., 4:17, 2012. doi:10.1186/1758-2946-4-17.
- Hanwell, M. D. and Hutchison, G. R. Avogadro2 (version 2.0), 2026. doi:10.5281/zenodo.19369545.