Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create monolayer MoS2 from the bulk. #3682

Open
hongyi-zhao opened this issue Mar 9, 2024 · 0 comments
Open

Create monolayer MoS2 from the bulk. #3682

hongyi-zhao opened this issue Mar 9, 2024 · 0 comments

Comments

@hongyi-zhao
Copy link
Contributor

I try to generate the monolayer MoS2 from the bulk as follows:

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

# Load the MoS2 structure (assuming you have the CIF file)
MoS2 = Structure.from_file("MoS2_mp-1434.cif")

# Add oxidation states
MoS2.add_oxidation_state_by_element({"Mo": 4, "S": -2})

# Initialize SlabGenerator for a single layer
slabgen = SlabGenerator(MoS2,
                        miller_index=(0, 0, 1),
                        min_slab_size=MoS2.lattice.c/3,  # Approximate single layer thickness in Å
                        in_unit_planes=False, 
                        min_vacuum_size=10)

# Generate slabs
slabs = slabgen.get_slabs()

# Assuming the first slab is the desired single layer, this may need verification
single_layer_slab = slabs[0]

# Write the single layer structure to a POSCAR file
poscar = Poscar(single_layer_slab)
poscar.write_file("MoS2_single_layer_POSCAR")

But the result is as follows:

image

As you can see, obviously it includes multiple layers alongside the (001) plane. Attached are all the files mentioned above:

MoS2_ML.zip

Any tips for achieving this goal will be helpful.

Regards,
Zhao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant