Overview

From a bulk crystal to actionable cleavage models

ECP is built for fast pre-screening before higher-cost first-principles validation. It keeps physically distinct slabs, tracks periodic bonds explicitly, and records the exact cleavage position used for export.

Generate candidates automatically

Build XRD reflection tables directly from structures and filter weak peaks before slab generation.

Preserve meaningful structures

Deduplicate only structurally identical slabs while retaining distinct terminations and stackings.

Count periodic bonds explicitly

Use StructureGraph and jimage-aware edges to reduce ambiguity at periodic boundaries.

v1.3
Current release

Best-plane 2D models are now exported directly

The result table records the selected cleavage height and shift, then version_5.0.py regenerates POSCAR_2D_h_k_l.vasp with surfaces aligned to that minimum-density position.

v1.2 history
  • Automated XRD generation with pymatgen.
  • Conservative hkl filtering followed by structural slab deduplication.
  • fixed, event, and auto scan modes.
  • Primary ranking by bonding_density = N / V_old.
Method

Seven linked screening stages

Each stage narrows the search while retaining the structural information needed to reproduce the final ranking.

01

Auto XRD Candidates

XRDCalculator

Generate reflection candidates from the bulk structure and remove weak peaks before slab construction.

2θ windowintensity filter
02

Conservative hkl Filtering

keep true directions

Merge trivial duplicates early while retaining non-equivalent directions for real slab comparison.

001 = 002102 ≠ 012
03

Stable Slab Build

production geometry

Construct slabs with fixed production settings so the internal scan region remains reproducible.

center_slab = Falsevacuum = 5 Å
04

Slab Identity Check

deduplicate after build

Skip only structurally identical slabs; distinct terminations and internal stackings are preserved.

same slab → reusedifferent stacking → keep
05

Jimage Bond Tracing

StructureGraph

Track crossing bonds as explicit periodic edges with their jimage context.

periodic edgesbroken bond pairs
06

Smart Scan and Rank

auto / fixed / event

Select the appropriate scan strategy and rank positions with the production metric N / V_old.

adaptive scanbonding_density
07

Export the Best 2D Model

selected termination

Regenerate a dedicated slab whose top and bottom surfaces match the selected minimum-density cleavage position.

POSCAR_2D_h_k_l.vaspready for relaxation
Slab thickness
4 × ceil(d)
Vacuum
5 Å
Bond backend
StructureGraph + jimage
Primary metric
N / V_old
Quick Start

Configure once, then run the production script

The default entry point reads SCRIPT_RUN_CONFIG near the top of version_5.0.py. Command-line subcommands remain available when needed.

  1. 01

    Install the environment

    Use Python 3.9-3.12 with pymatgen, ASE, pandas, and the supporting packages below.

  2. 02

    Set input and scan options

    Edit poscar_folder, scan_mode, intensity thresholds, and output paths in the config block.

  3. 03

    Run and inspect outputs

    Start the script, then review ranked tables in after_deal/ and models in each surface folder.

Local batchTerminal
pip install numpy pandas matplotlib pymatgen ase openpyxl tqdm

python version_5.0.py
Direct execution uses the built-in config block by default.

Generate XRD only

python version_5.0.py generate-xrd --input-dir INPUT_DIR --output-dir XRD

Parallel representative set

python run_version_5_parallel.py

Edit USER_CONFIG before running.

Cluster job

sbatch newvasp.sh

Use the shell files as templates for your scheduler and paths.

Outputs

Results that remain traceable to the selected plane

Each retained surface keeps its ranking data, evaluated geometry, and exported 2D structure together.

Ranked resultsafter_deal/*.xlsx

Per-material metrics, selected height, shift, and scan metadata.

Surface workspaceface_h_k_l/

Files grouped by the retained Miller-index surface.

Evaluated slabPOSCAR_h_k_l.vasp

The slab geometry used during cleavage-plane evaluation.

Best-plane 2D modelPOSCAR_2D_h_k_l.vasp

The final termination selected from the minimum bonding-density position.

Screening scope

ECP prioritizes candidates for downstream study. Final exfoliation claims should still be validated with higher-accuracy structural relaxation and first-principles calculations.

Downloads

Choose the entry point for your workload

The Python files are maintained entry points. The shell scripts are editable templates for cluster preparation and submission.

Python 3.9-3.12 Structure pymatgen · ASE Data pandas · openpyxl License MIT