6
$\begingroup$

Convert MoO3 bulk structure to MoO3 (010) plane surface via VESTA

$\endgroup$

1 Answer 1

6
$\begingroup$

You can do that with VESTA for sure, but it is a tedious process and it is hard to explain it without adding so many figures for each step. I suggest you to use ASE and Python tools to do that. Here I will provide you with a code written in python and uses pymatgen to do this job:

from pymatgen.core.structure import Structure
from pymatgen.io.vasp import Poscar
from pymatgen.core.surface import SlabGenerator
import os

# Get the current working directory
cwd = os.getcwd()

# Specify the CONTCAR file name
contcar_file = "CONTCAR"

# Specify the Miller index and added vacuum
miller_index = (0, 1, 0)  # Example: (h, k, l)
vacuum_thickness = 15.0  # Example: Angstroms
min_vacuum_size = 15.0  # Example: Angstroms

# Read the CONTCAR file and generate the surface slab
contcar_path = os.path.join(cwd, contcar_file)
poscar = Poscar.from_file(contcar_path)
structure = poscar.structure
slab_generator = SlabGenerator(structure, miller_index, vacuum_thickness, min_vacuum_size)
slab = slab_generator.get_slab()

# Write the generated slab to a POSCAR file
slab.to("poscar", "POSCAR")

In this sample code, my structure was coming from CONTCAR file that exist in the same directory with this script (just make sure the file is compatible with VASP POSCAR or CONTCAR files - you may need to change the naming according to your files), the script would also add vaccum with a thickness value defined by the user. Eventually, the slab will be written to a POSCAR file.

I just want to add as well, if you just want something out of the box, you can use vaspkit tool, they have an option for building slabs starting from bulk structure. In vaspkit, you can access that option with (803) Build Surface by Specified Miller Indices

$\endgroup$
2
  • $\begingroup$ Thank you so mach @Jaafar Mehrez. This code working for me. $\endgroup$ Dec 26, 2023 at 6:58
  • $\begingroup$ Great! Happy computing $\endgroup$ Dec 26, 2023 at 11:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .