Skip to content

The strange result of SurfaceGenerator for MoS2. #8

Description

@hongyi-zhao

The code snippet is as follows:

# Import the SurfaceGenerator class
from OgreInterface.generate import SurfaceGenerator

# Create a surface generator instance from a CIF file
subs = SurfaceGenerator.from_file(
    "MoS2_mp-1434.cif",
    miller_index=[0, 0, 1],  # Specify the Miller index for the surface
    layers=1,                # Number of layers in the generated surface
    vacuum=15                # Vacuum spacing around the surface
    # refine_structure=False  # Don't refine the initial structure; uncomment if needed
)

# Print the number of generated surfaces
print(len(subs))

# Select the first generated surface
sub = subs._slabs[0]

# Remove layers from the selected surface
# sub.remove_layers(num_layers=3, top=True)  # Remove 3 layers from the bottom side

# Write the modified surface to a file with the `c`-axis orthogonal to the `ab` plane
sub.write_file("POSCAR", orthogonal=True)

The result is as follows:

image

The top structure looks like the Mo and S atoms are far apart in some positions, which is weird. All the files mentioned above have been attached.

MoS2-Ogre.zip

Regards,
Zhao

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions