We take the example of the copound of PtC.

1.Initial structural data

 We start by obtaining the structural data for the unit cell of the material we are interested in. It should contain the unit cell dimensions and the atomic positions. Some common formats in use are: CIF[4], VASP[5], VESTA[6] and BCS formats. Throughout this text, we will be operating on the Fm 3m phase of the platinum carbide (PtC), reported by Zaoui & Ferhat [7] as reproduced in BCS format in Table 1.


These data can be entered directly into VESTA from the form accessed by selecting the File New Structure menu items and then fi lling the necessary information into the Unit cell and Structure parameters tabs, as shown in Figures 3.1 and 3.2.



As a result, we have now de ned the Fm 3m PtC (Figure 3.3). An alternative way to introduce the structure would be to directly open its structural data le (obtained from various structure databases such as COD[8], ICSD[9] or Landolt-Bornstein[10] into VESTA.


2. Constructing the Supercell. 

A supercell is a collection of unit cells extending in the a,b,c directions. It can easily be constructed using VESTA's transformation tool. 

 ------------------- just for demonstration  -----------------------------------------------

For demonstration purposes, let's build a 3x3x3 supercell from our cubic PtC cell. Open the Edit --> Edit Data --> Unit Cell... dialog, then click the Option... button in the Setting row. Then de ne the transformation matrix as 3a,3b,3c as shown in Figure 3.4.


Answer yes when the warning for the change of the volume of the unit cell appears, and again click Yes to search for additional atoms. After this, click OK to exit the dialog. This way we have constructed a supercell of 3x3x3 unit cells as shown in Figure 3.5.


Figure 3.5. A 3x3x3 supercell

 We have built the supercell for a general task but at this stage, it's not convenient for preparing the surface since we rst need to cleave with respect to the necessary lattice plane. So, revert to the conventional unit cell (either by reopening the data le or undoing (CTRL-z) our last action).
 ------------------------------------------------------------------------------------------------
Now, populate the space with the conventional cell using the Boundary setting under the Style tool palette (Figure 3.6). 


Figure 3.6. Designating the boundaries for the construction of the supercell.

In this case, we are building a 3x3x3 supercell by including the atoms within the -fractional- coordinate range of [0,3] along all the 3 directions (Figure 3.7a). 



 Figure 3.7a  A 3x3x3 supercell created by Boundary setting 


At this stage, the supercell formed is just a mode of display - we haven't made any solid changes yet. Also, if preferred one can choose how the unit cells will be displayed from the Properties setting's General tab (Figure 3.7b).



               Figure 3.7b. Displaying setting

3. Lattice Planes.

To visualize a given plane with respect to the designated hkl values, open the dialog shown in Figure 3.8 by selecting Edit Lattice Planes... from the menu, then clicking on New and entering the intended hkl values, in our example (111) plane.


The plane's distance to the origin can be speci ed in terms of Å or interplane distance, as well as selecting 3 or more atoms lying on the plane (multiple selections can be realised by holding downSHIFT while clicking on the atoms) and then clicking on the Calculate the best plane for the selected atoms button to have the plane passing from those positions to appear. This is shown in Figure 3.9, done within a 3x3x3 supercell. 


The reason we have oriented our system so that the normal to the (111) plane is pointing up is to designate this lattice plane as the surface, aligning it with the new c axis for convenience. Therefore we also need to reassign a and b axes, as well. This all comes down to de ning a new unit cell. Preserving the periodicities, the new unit cell is traced out by introducing additional lattice planes. These new unit cells are not unique, as long as one preserves the periodicities in the 3 axial directions, they can be taken as large and in any convenient shape as allowed. A rectangular shaped such a unit cell, along with the outlying lattice plane parameters is presented in Figure 3.10 (the boundaries have been increased to [-2,5] in each direction for practicality).


4. Trimming the new unit cell.

The next procedure is simple and direct: remove all the atoms outside the new unit cell. You can use the Select tool from the icons on the left (the 2nd from top) or the shortcut key s . The trimmed new unit cell is shown in Figure 3.11, take note of the periodicity in each section. It should be noted that, this procedure is only for deducing the transformation matrix, which we'll be deriving in the next subsection: other than that, since it's still de ned by the old lattice vectors, it's not stackable to yield the correct periodicity so we'll be fixing that.


5. Transforming into the new unit cell.

Now that we have the new unit cell, it is time to transform the unit cell vectors to comply with the new unit cell. For the purpose of obtaining the transformation matrix (which actually is the matrix that relates the new ones with the old ones), we will need the coordinates of the 4 atoms on the edges. Such a set of 4 selected atoms are shown in Figure 3.12. These atoms' fractional coordinates are as listed in Table 2 (upon selecting an atom, VESTA displays its coordinates in the information panel below the visualization).



 Taking o' as our new origin, the new lattice vectors in terms of the previous ones become (as we subtract the origin's coordinates):

a' = -a+b
b' = -1/2a-1/2b+c
c' = a+b+c

Therefore our transformation matrix is:


(i.e., -a+b,-1/2a-1/2b+c,a+b+c the coe cients are read in columns)

Transforming the initial cell with respect to this matrix is pretty straight forward, in the same manner we exercised in subsection 2, Constructing the supercell , i.e., Edit --> Edit Data --> Unit Cell.. , then Remove symmetry and Option... and introducing the transformation matrix. A further translation (origin shift) of (0,0,1/2) is necessary (the transformation matrix being -a+b,-1/2a-1/2b+c,a+b+c+1/2 ) if you want the transformed structure look exactly like the one shown in Figure 3.13. 



6. Final Touch.

The last thing remains is introducing a vacuum area above the surface. For this purpose we switch from fractional coordinates to Cartesian coordinates, so when the cell boundaries are altered, the atomic positions will not change as a side result. VASP format supports both notations so we export our structural data into VASP format ( File --> Export Data... , select VASP as the le format, then opt for Write atomic coordinates as: Cartesian coordinates ).

After the VASP le with the atomic coordinates written in Cartesian format is formed, open it with an editor (the contents are displayed in Table 3).


Directly edit and increase the c-lattice length from the given value (7.7942 Å in our case) to a su ciently high value (e.g., 25.0000 Å) and save it. Now when you open it back in VESTA, the surface with its vacuum should be there as in Figure 3.15.



                           Figure 3.15. Prepared surface with vacuum

At this point, there might be a couple of questions that come to mind: What are those Pt atoms doing at the top of the unit cell? Why are the C atoms positioned above the batch instead of the Pt atoms?

The answer to these kind of questions is simple: Periodicity. By tiling the unit cell in the c-direction using the Boundary... option and designating our range of coordinates for the {x,y,z}-directions from 0 to 3, we obtain the system shown in Figure 3.16.


                  Figure 3.16. New unit cell with periodicity applied

Reerence: https://www.researchgate.net/profile/Emre_Tasci/publication/256708563_How_to_prepare_an_input_file_for_surface_calculations/links/00b7d523ac61f35624000000/How-to-prepare-an-input-file-for-surface-calculations.pdf