Generating a batch of jobs and collecting results: Basis Set Effects for NH3 Geometry¶
This tutorial will help you to:
pre-optimize structures using different methods, including MOPAC
starting from an existing .ams file, create a batch of similar jobs using the Prepare tool in AMSjobs
interactively submit a set of jobs using AMSjobs
using the Report tool in AMSjobs, analyze results of multiple calculations at once
Step 1: Create and pre-optimize your molecule¶
You should see one nitrogen and three hydrogen atoms in the drawing area now. We intentionally did not add bonds between the N and H atoms!
First we will try to optimize this structure using the default pre-optimizer (UFF):
Using the default pre-optimization algorithm will lead to a structure with way to big N-H distances:
Next we will try to optimize using Mopac.
The message ‘MOPAC ready’ will be displayed in the AMSinput window:
Mopac will produce a good-looking pyramidal ammonia molecule, with the N-H bond length of about 1.0 Angstrom.
Additionally, it will create proper N-H covalent bonding! These bonds are based on the bond-orders as calculated by Mopac.
Step 2: Set up a single ADF calculation¶
Now with our pre-optimized NH3 molecule, we will set up a series of calculations: the optimization of NH3 with ADF, using different basis sets. The first step is to set up a simple geometry optimization:
We have used all defaults for basis set and so on.
Step 3: Set up a batch of ADF jobs¶
Next we will set up a series of calculations, using the Prepare tool.
The Prepare dialog window will pop up.
Because we have selected the NH3 job earlier, NH3.ams filename (including the path) will show up in the ‘Run’ field (otherwise, we can select NH3 using ‘+’ button of the ‘Run’ field). This means we are going to create jobs that are identical to the NH3 job, but with some details changed (this will next be specified in the Prepare dialog).
The basis set options selected will show up in the ‘Use these input options’ field. Note that by default the jobs will be created in the ‘autojobs’ directory, as specified in the ‘Produce jobs’ section.
The Prepare dialog will close and AMSjobs will open the ‘autojobs’ directory. Using NH3.ams, the Prepare tool created a set of jobs inside ‘autojobs’ named as ‘NH3.SZ.Large.ams’, ‘NH3.DZ.Large.ams’ etc. The files naming intuitively follows the basis set options which has been used, and the rest of the options of the newly created files are exactly the same as in NH3.ams. The original NH3.ams file has not been altered.
Step 4: Run your set of ADF jobs¶
Now we are going to run the batch of ADF jobs which has been automatically prepared in the previous Step 3 of the tutorial Using AMSjobs, one can either run this set of jobs one by one, or all at once.
This will run the jobs in the default queue. Normally this is the Sequential queue, and the jobs will actually run one after another.
The jobs will start running and their progress can be tracked in AMSjobs. Each ammonia optimization job should not take more than a few minutes.
Step 5: Analyze results of several calculations at once¶
When all the ammonia optimization jobs are finished, we can compare the results. The main conclusion that you will (should) reach is that DZ (double zeta) basis set optimization, job name ‘NH3.DZ.Large’, leads to the incorrect planar ammonia molecule. As covered in the preceding tutorials, you can optionally use several GUI modules to observe that:
AMSmovie, which will show the geometry optimization
AMSinput, which will open the (last) converged geometry
AMSview, which will open the converged geometry and also would display various density maps in 3D
For example, let us use AMSview to demonstrate the results:
What you will observe is that HOMO of ammonia does not have the anticipated sp3 hybridization, when DZ basis set is used. In the following picture you can see both the DZ and DZP results:
To visualize results from several jobs automatically, you can use the Report tool within AMSjobs:
This will open up Report dialog.
In the ‘Report’ field, you can choose the name for your report file and its format (‘HTML’ or ‘Tab separated plain text’). The other fields (‘General’, ‘Images’, ‘Results’) contain various relevant options you can choose for preparing your report.
The extra command line options used instruct AMSreport to report the angle between atoms 2, 1 and 3, and include the atom labels for this angle on output. In a similar way more angles could be requested, or distances, or many other properties. For a description of all options please check the amsreport documentation.
The Report dialog will close, saving our template named ‘MyReport’. Now we will generate actual report following the saved template:
‘Save As’ dialog window will pop up, showing the ‘report.html’ default filename.
Now AMSreport will work through all your selected jobs and prepare the report. Finally the browser will start showing your report file (by default, named ‘report.html’):
The AMSreport tool created a table-like report of the results.
We can clearly see that only for DZ basis optimization our NH3 molecule is planar (check the last row of the report table). The dipole data are also shown in the report. Obviously the dipole moment is zero only for the planar NH3 structure.
Congratulations, we are done with the ammonia optimization tutorial!