# Generate Combinatorial Sets¶

This tutorial demonstrates how to create a combinatorial set of materials. We use III-V semiconductor compounds as example with permutations and combinations of n and p-type dopants. Combinatorial set of materials can be used to execute combinatorial screening to investigate, for example, the impact of inserting dopants on the electronic band gap of such semiconductors.

## Import Material into Collection¶

We begin by importing one of the III-V compound semiconductors, Gallium Phosphide (GaP), into the user's collection of materials, starting from which we will then build further combinatorial sets. This crystal structure can be imported directly from a remote repository, by following the instructions outlined in this page.We select the F-43m space group lowest energy structure, the most stable, polymorph of GaP.

## Use Material in Materials Designer¶

The reader should now open a new instance of the Materials Designer Interface for creating and designing new material structures. The first step here involves importing the above-mentioned Gallium Phosphide crystal structure into the designer itself, via the Import option under the Input/Output Menu of the interface.

## Create Combinatorial Set¶

### Open "Generate Combinatorial Set" Dialog¶

The functionality to create combinatorial sets can be accessed via the Advanced Menu of the Materials Designer Interface. Under this menu, the user should select the relevant "Combinatorial Set" option.

The main operations made possible by the resulting "Generate Combinatorial Set" dialog are further reviewed in detail in this page.

### n and p-type Dopants for Gallium Phosphide¶

We will examine the effects of n and p-type dopants on Gallium Phosphide. We remind the reader about which elements constitute dopant atoms when inserted into the Gallium Phosphide crystal structure.

• n-type: tellurium, selenium, sulphur (substituting phosphorus).
• p-type: zinc, magnesium (substituting Ga), tin (substituting P).

### Generate Permutations¶

Permutations change all element atoms in the basis of the crystal structure simultaneously, and are enabled when chemical elements are separated by slashes (/) with no trailing spaces.

The user should hence try replacing the first line under the "Generate Combinatorial Set" dialog, containing the Gallium atom located at the origin of the unit cell, with the following line.

 1 Zn/Mg 0.0 0.0 0.0 

Pressing the "Generate Combinatorial Set" button at the bottom of the dialog will generate the permutations of the Gallium Phosphide crystal structure containing p-type dopants, which are added to the left-hand sidebar list of structures of Materials Designer, on top of the original GaP material structure.

The basis atoms of the original GaP structure had the following atomic positions, expressed in fractional coordinates and viewable under the source editor interface component:

 1 2 Ga 0.000000 0.000000 0.000000 P 0.750000 0.750000 0.750000 

Consequently, the resulting permutations consist in the following two crystal structure possibilities:

 1 2 Zn 0.000000 0.000000 0.000000 P 0.750000 0.750000 0.750000 
 1 2 Mg 0.000000 0.000000 0.000000 P 0.750000 0.750000 0.750000 

Therefore, we see how permutations had the effect of replacing the original Gallium atom at the origin with each of the Zinc and Magnesium p-type dopants.

### Generate Combinations¶

Combinations change the elements in the basis of the crystal structure one at a time, and are enabled when commas are used as separators (,) with no trailing spaces.

In order to explore the alternative case of Combinations, we shall replace both the Phosphorus and Gallium atoms in GaP with all possible aforementioned n and p-type dopant atoms. This can be achieved by replacing the two lines in the "Generate Combinatorial Set" dialog with the following content.

 1 2 Zn,Mg 0.000000 0.000000 0.000000 Te,Se,S,Sn 0.750000 0.750000 0.750000 

We reproduce below the resulting combinatorial list of atomic positions contained in the generated structures, which can be retrieved under the left-hand sidebar of Materials Designer, once the "Generate Combinatorial Set" button is clicked.

 1 2 Zn 0.000000 0.000000 0.000000 Te 0.750000 0.750000 0.750000 
 1 2 Zn 0.000000 0.000000 0.000000 Se 0.750000 0.750000 0.750000 
 1 2 Zn 0.000000 0.000000 0.000000 S 0.750000 0.750000 0.750000 
 1 2 Zn 0.000000 0.000000 0.000000 Sn 0.750000 0.750000 0.750000 
 1 2 Mg 0.000000 0.000000 0.000000 Te 0.750000 0.750000 0.750000 
 1 2 Mg 0.000000 0.000000 0.000000 Se 0.750000 0.750000 0.750000 
 1 2 Mg 0.000000 0.000000 0.000000 S 0.750000 0.750000 0.750000 
 1 2 Mg 0.000000 0.000000 0.000000 Sn 0.750000 0.750000 0.750000 

### Generate Vacancy Sites¶

When the "VAC" keyword is used instead of an element name, such as "Ga" or "P", a vacancy will be created at the corresponding crystal site. Vacancies can be added as part of the generated combinatorial set, and can be combined with either slashes to generate corresponding permutations, or commas for combinations (with no trailing spaces).