# Building an interface between Ag(100) and Au(111)¶

 QuantumATK: Interface builder Platforms: In this tutorial you will learn how to use the interface builder. You will build an interface between an Ag(100) and an Au(111) surface. It is assumed that you are familiar with the basic functionalities of QuantumATK.

## Import silver and gold crystals¶

Create a new empty project called “Ag_Au_interface” and open the Builder .

1. Use Add ‣ From database to import a silver and a gold crystal to the Stash.
2. Double-clisk the “Silver” Stash item to activate it.
3. Expand the Builders group in the right-hand panel bar.

## Building the Ag(100) and Au(111) crystals¶

1. Open the Surface (Cleave) tool.
2. Use the default surface direction (100), and click Next.
3. Use the default minimal surface bravais lattice, and click Next.
4. Use the default configuration type, i.e. v3 (C axis) is along z and the structure is periodic.
5. Click Finish.

Now do the same for the “Gold” crystal, but cleave it along the (111) direction.

## Building the interface¶

You have now built the Ag(100) and Au(111) supercells. The next step is to combine them into an interface. For this purpose, open the Interface plugin from the Builders group in the panel bar. It has two slots. Drop the Ag(100) crystal in the first and the Au(111) crystal in the second slot.

QuantumATK now scans all possible repetitions and rotations of the two surfaces in order to find a common supercell with minimal strain. Open the Select Surface Cells menu. The two upper plots show the selected surface cells of the two crystals. The lower left plot shows a number of blue dots, where each dot represents a common supercell for the two crystals.

We will now adjust the algorithm used for matching the two crystals. For this purpose, open the menu called Set Matching Parameters. With this menu it is possible to select the number of repetitions included for each cell and which angles are scanned to find a match. Increase nmax and mmax to 8 in order to search for larger supercells with less stress. Then click OK.

All the matching crystals will now be recalculated. Select the blue point closest to the lower left corner, to obtain a good compromise between a small supercell and a low stress. The supercell has 38 atoms and an average strain of 0.47%. Click Apply.

The next step is to define the relative position of the two crystals. For this purpose, open the Shift Surfaces menu in the main Interface Builder window. From this menu it is possible to either adjust the relative position of the two crystal manually, or compute the optimal distance using the ATK-ForceField calculator.

1. Select the “EAM_Zhou_2004” potential.
2. Check the Calculate energy box.
3. Click Calculate displacement.

Tip

In this case there are several available potentials. If you are not familiar with any of them, you may just try out different potentials and check if they give consistent results.

Note

For QuantumATK-versions older than 2017, the ATK-ForceField calculator can be found under the name ATK-Classical.

Close the Shift Surfaces menu and return to the main Interface window. Now add 5 silver layers and 3 gold layers using the buttons. Check that there are now 7 layers to the left and 6 layers to the right of the interface (Tip: You can use Ctrl+r to resize the plot window). Click Create to generate the structure.

Tip

You can learn more about the Interface Builder in the Technical Notes on The Interface Builder in QuantumATK.

## Building the device configuration¶

The last step is to build a device configuration from the interface structure. Contract the Builders group and expand the Device Tools in the Builder panel bar. Select Device from Bulk. The tool will try to determine the electrode lengths by looking for repetition matches. Keep the default values and click OK. You have now finished the setup.

Save the resulting geometry in the file Ag_Au_interface.py by using the File menu or by right clicking the Stash item.