# the following data frame shows the created list of GB planes and their corresponding types
df=pd.DataFrame(
{'GB1':list(V1),
'GB2':list(V2),
'Type':Gb
})
df.head()
```
%% Output
GB1 GB2 Type
0 [-3, 2, 0] [-3, 0, 2] Mixed
1 [0, -3, 2] [2, -3, 0] Mixed
2 [1, 1, 1] [1, 1, 1] Twist
3 [3, -2, 0] [3, 0, -2] Mixed
4 [-1, -1, -1] [-1, -1, -1] Twist
%% Cell type:markdown id: tags:
## Criteria for finding the GB plane of interest*:
### 1- Based on the type of GB plane:
%% Cell type:markdown id: tags:
#### _*The following criteria searches the generated data frame. To extend the search you can increase the limit (lim) in the above cell._
%% Cell type:code id: tags:
``` python
# Gb types: Symmetric Tilt, Tilt, Twist, Mixed
df[df['Type']=='Tilt'].head()
```
%% Output
GB1 GB2 Type
104 [-8, 7, 1] [-8, 1, 7] Tilt
113 [1, -8, 7] [7, -8, 1] Tilt
116 [-1, 8, -7] [-7, 8, -1] Tilt
119 [8, -7, -1] [8, -1, -7] Tilt
277 [7, 1, -8] [1, 7, -8] Tilt
%% Cell type:markdown id: tags:
### 2 - Based on the minimum number of atoms in the orthogonal cell:
%% Cell type:markdown id: tags:
#### _This can be of interest for DFT calculations that require smaller cells. The search may take a few minutes if your original limit is large as it must calculate all the orthogonal cells to know the number of atoms._
# show me Gb planes that have orthogonal cells with less than max_num_atoms, here: 500.
df['Number']=Number_atoms
max_num_atoms=300
df[df['Number']<max_num_atoms]
```
%% Output
GB1 GB2 Type Number
2 [1, 1, 1] [1, 1, 1] Twist 228
4 [-1, -1, -1] [-1, -1, -1] Twist 228
6 [3, -5, 2] [5, -3, -2] Symmetric Tilt 228
12 [-3, 5, -2] [-5, 3, 2] Symmetric Tilt 228
104 [-8, 7, 1] [-8, 1, 7] Tilt 228
113 [1, -8, 7] [7, -8, 1] Tilt 228
116 [-1, 8, -7] [-7, 8, -1] Tilt 228
119 [8, -7, -1] [8, -1, -7] Tilt 228
277 [7, 1, -8] [1, 7, -8] Tilt 228
288 [-7, -1, 8] [-1, -7, 8] Tilt 228
%% Cell type:markdown id: tags:
### 3- Based on proximity to a particular type boundary, for example the Symmetric tilts:
%% Cell type:markdown id: tags:
#### _This is how I created various steps on grain boundaries with vicinal orientations in the following work: __(https://journals.aps.org/prmaterials/abstract/10.1103/PhysRevMaterials.2.043601)__ See also here:_