Optimizing the geometry of a two-probe system

Published: May 28 2014


Tags: geometry optimization

In this tutorial, you will learn how to optimize the internal coordinates of the central region in the most efficient way. The primary point to note is that this can be achieved in a single-step process, involving only the two-probe geometry (as opposed to extracting, separately optimizing, and then re-inserting the central region).

One of the most crucial aspects of an atomic-scale calculation is to set up the atomic coordinates properly. This is not as simple as just defining the basic geometry of the system you want to study (if you want a nanotube, naturally you have to insert a nanotube in the system) - one should also take care that the atoms are placed such that the total energy of the system is minimal. The process of finding this minimum, and the corresponding "optimized geometry", can be rather time-consuming, but is a necessary step in order to ensure the quality of the results.

To find the optimized geometry of a two-probe system has traditionally been a rather cumbersome task, involving many different steps, but as of ATK 11.2 this process has been made much easier.


Defining the initial device geometry

Our test system will be a simple atomic chain of Li atoms, with a hydrogen molecule inserted in the middle. For details on how to set this system up, please refer to the basic ATK Tutorial for Device Configurations. For the purpose of this tutorial, you can just download a pre-defined script with the device geometry. Save the Python file, and drop it on the Viewer viewer48 to verify that it looks correct.



Setting up and running the geometry optimization

  1. Drop the Python file containing the Li-H2-Li device geometry on the Scripter script_generator48
  2. In the left-hand side panel, double-click, in order
    • "New Calculator"
    • "Optimization"
    • "Analysis > Forces"
  3. Also, define the name and location of the file in which to store the results, by clicking the button "..." next to "Default output file".
    scripter This defines the logical work flow of the script. If we were to leave all parameters at their defaults, we would actually obtain a proper geometry optimization of the system. It would however run under open boundary conditions, and take a substantial amount of time. Our goal in this tutorial is to show how this time can be reduced.
  4. Therefore, double-click the inserted "New Calculator" block in the right-hand panel, and open the "Iteration control parameters". Here, place a tick-mark in the box "No SCF iteration". This will cause ATK to run through only the equivalent bulk calculation, but not perform a full self-consistent calculation with transport boundary conditions, for each step in the geometry optimization.
  5. In order to make this demonstration calculation go faster, you can also select a minimal basis set (SingleZeta) for all elements (under "LCAO basis set").
  6. There is no need, in the approach we are describing here, to constrain any atoms; ATK will automatically keep the atoms closest to the electrodes fixed. We can however define, in the "Optimization" block, a file in which we will save the trajectory of the optimization. We can later use this to run a movie of the ionic movements during the coordinate relaxation. The trajectory file should have extention ".nc", and it is recommended to use a different file than the main result file.
  7. Save the script, and then send the calculation to the Job Manager using the "Send to" icon sendto in the lower right-hand corner of the Script Generator.
  8. Run the calculation by clicking "Process queue" in the Job Manager. It will take between 10-25 minutes to complete, depending on the performance of our computer.
  9. When the computation finishes, return to the main VNL window and locate the trajectory file. Select it, and then drag and drop the "Trajectory" object in it to the Viewer, and click the "Play" button (the red circle in the image below) to visualize the optimization process. A speed of 10 frames per second (fps) is a good value, and you may want to set the movie to loop automatically (blue circle). Zooming in on the H2 molecule makes it easier to see what goes on.



In this approach for optimizing the two-probe geometry we are neglecting a few things:

  • To find the global energy minimum, one should also optimize the length of the C unit cell vector of the central region that corresponds to the minimal total energy. This can be done by e.g. plotting the total energy as a function of the length, taking care in each step to minimize the internal coordinates. In ATK 11.2, we will introduce a method that performs this procedure automatically, making use of the strain field.
  • By opting to not perform a two-probe self-consistent calculation, we ignore the effect of the open boundary conditions on the forces on the central atoms. This is usually an acceptable approximation, at least for zero bias, but naturally it doesn't work for finite bias. At any rate, the method described here provides a good starting guess for a more complete optimization, under open boundary conditions, so that fewer steps of this more time-consuming calculation will be needed.
  • We have not considered how to optimize the electrodes. Again, this will be possible to do in ATK 11,2, by minimizing the strain.