Skip to main content

Unified Python interface for EwaldSolidSolution Guider and ESS

Project description

esspy

Exhaustive enumeration and optimization of solid-solution crystal structures using Ewald summation.

esspy is a Python/C++ framework that automates the generation and energy ranking of solid-solution structures. It is a modern Python interface to the EwaldSolidSolution algorithm, originally implemented in C++.

Citation

If you use esspy in your research, please cite the original algorithm paper:

Jang, S.-H., et al. J. Phys. Chem. A 2023, 127 (48), pp 10200–10212. https://doi.org/10.1021/acs.jpca.3c00076

Authors

Requirements

  • Python 3.9+
  • CMake 3.15+
  • C++17-compatible compiler (GCC, Clang, MSVC)
  • Optional: MPI (for distributed execution)

Installation

From source

git clone https://github.com/soungmin-bae/esspy.git
cd esspy
pip install -e .

This will compile the C++ extension using scikit-build-core and pybind11.

Verify installation

esspy --version
esspy --help

Quick Start

Option A: Interactive Wizard (Recommended for new users)

esspy wizard --scenario composition --output config.yaml

The interactive wizard guides you through structure selection, composition design, charge neutralization, substitution rules, solve strategy, and output selection with VASP KIT-style menus. For global composition with detected site groups, wizard defaults to automatic sitewise allocation (allocation.mode: optimize_by_ewald), so esspy run input.yaml can execute end-to-end without a separate allocation command.

Use esspy wizard -h for current options.

Option B: Manual Configuration

1. Initialize a project from a POSCAR file

esspy init from-poscar POSCAR.vasp -o input.yaml

This generates a YAML configuration template with structure and composition settings.

2. Run the full workflow

esspy run input.yaml --workdir run-output

This performs:

  • Guider: Supercell design and ionic recipe generation
  • Solver: Exhaustive enumeration and energy optimization
  • Outputs energy-ranked structures and summary

2-1. Default structure selection output

By default, generated input.yaml includes output.selection and esspy run automatically exports selected structures:

  • mode: auto_top_n
  • limit: 20
  • pick: lowest
  • interval: left-closed
  • outdir: selected_structures

So after run, you get:

run-output/
  selected_structures/
    selected-0001.vasp
    ...
    selected-0020.vasp
    index.tsv

You can override these defaults at init time:

esspy init -p POSCAR \
  --selection-mode auto_top_n \
  --selection-limit 20 \
  --selection-pick lowest \
  --selection-interval left-closed

3. Guide-only mode (structure design without enumeration)

esspy run input.yaml --guide-only --workdir run-guide

4. Export results

esspy guide export-guider input.yaml
esspy solve export-spec input.yaml

5. Finite-temperature workflow (ft)

Typical sequence:

# (recommended) use fitted charges from esspy fc
esspy ft run input.yaml --charge-model ./samples/charge_model.json \
  --temperatures 300,600,900 --n-steps 20000 --burn-in 2000 \
  --sample-every 20 --outdir ft-output --verbose

# compact summary / inspection
esspy ft report ft-output
esspy ft inspect ft-output

# draw thermo/site/SRO plots from ft CSV outputs
esspy ft plot ft-output

Parallel tempering (PT) notes:

  • Enable PT with --parallel-tempering --temperatures ....
  • MPI distributed PT is activated only when world_size == number_of_temperatures.
    • Example: mpirun -np 3 with --temperatures 300,600,900.
  • If sizes do not match, esspy automatically falls back to independent-chain mode and records the reason in ft_summary.json.

Generated artifacts (main):

ft-output/
  ft_summary.json
  thermo_vs_T.csv
  site_preference_vs_T.csv
  sro_vs_T.csv                  # only when --compute-sro
  thermo.png
  site_pref.png
  sro.png                       # only when sro_vs_T.csv exists
  chains/
  representatives/

Features

  • Interactive Wizard: Step-by-step configuration with charge neutralization and validation
  • Guider: Automated supercell design with ionic recipe generation
  • Solver: Exhaustive enumeration with Monte Carlo swapping optimization
  • Symmetry: Automatic Wyckoff position detection (via spglib)
  • MPI: Distributed parallel enumeration across multiple ranks
  • Progress Reporting: Real-time enumeration progress with ETA and energy tracking
  • Output Management: Auto-increment folder naming to prevent overwrites
  • Utility Tools: Structure templates, charge lookup, and random composition generator

Workflow Example

# input.yaml
structure:
  poscar: POSCAR.vasp

composition:
  target_sites:
    - {element: Mn, count: 2}
    - {element: Ni, count: 2}
    - {element: Cr, count: 2}
  n_target_sites: 6

guide:
  options:
    target_cpu_time_sec: 3.0

solve:
  swap: true
  max_swap: 2

output:
  prefix: my_structure
  workdir: run-output
esspy run input.yaml

Development

Install in editable mode:

pip install -e ".[dev]"

Run tests:

pytest tests/ -v

Build without installing:

pip install cmake scikit-build-core pybind11
cmake -B build -S .
cmake --build build

MPI scaling benchmark:

scripts/benchmark_mpi_scaling.sh input.yaml mpi-scaling-bench

The script runs np=2/4/8, stores logs per run, and prints summary lines including elapsed walltime, processed candidates, active/idle ranks, and imbalance ratio. It also writes a CSV summary at:

mpi-scaling-bench/scaling_summary.csv

Documentation

  • CLI Help: esspy --help
  • Wizard Help: esspy wizard -h
  • Utility Help: esspy util -h
  • Examples: See examples/ directory
  • Configuration: YAML schema reference in command help

Utility Commands

Quick-reference utilities for structure design:

# List available structure templates (Spinel, Perovskite, Rocksalt, Fluorite)
esspy util template-list

# Suggest supercell dimensions/matrix for a target atom count
esspy util supercell POSCAR --n-target-sites 224

Use esspy util -h and each subcommand's -h output for detailed usage.

License

[To be determined]


Version: 0.1.2 (Pre-release) Last updated: 2026-05-11

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

esspy-0.1.3.tar.gz (470.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

esspy-0.1.3-cp313-cp313-win_amd64.whl (690.9 kB view details)

Uploaded CPython 3.13Windows x86-64

esspy-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (824.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

esspy-0.1.3-cp313-cp313-macosx_11_0_arm64.whl (692.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

esspy-0.1.3-cp313-cp313-macosx_10_15_x86_64.whl (742.3 kB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

esspy-0.1.3-cp312-cp312-win_amd64.whl (690.9 kB view details)

Uploaded CPython 3.12Windows x86-64

esspy-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (824.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

esspy-0.1.3-cp312-cp312-macosx_11_0_arm64.whl (692.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

esspy-0.1.3-cp312-cp312-macosx_10_15_x86_64.whl (742.2 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

esspy-0.1.3-cp311-cp311-win_amd64.whl (691.0 kB view details)

Uploaded CPython 3.11Windows x86-64

esspy-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (826.8 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

esspy-0.1.3-cp311-cp311-macosx_11_0_arm64.whl (692.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

esspy-0.1.3-cp311-cp311-macosx_10_15_x86_64.whl (739.1 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

esspy-0.1.3-cp310-cp310-win_amd64.whl (690.0 kB view details)

Uploaded CPython 3.10Windows x86-64

esspy-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (825.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

esspy-0.1.3-cp310-cp310-macosx_11_0_arm64.whl (691.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

esspy-0.1.3-cp310-cp310-macosx_10_15_x86_64.whl (738.1 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

Details for the file esspy-0.1.3.tar.gz.

File metadata

  • Download URL: esspy-0.1.3.tar.gz
  • Upload date:
  • Size: 470.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for esspy-0.1.3.tar.gz
Algorithm Hash digest
SHA256 ca7057f321b433b4fb1778b0b1a4a21b15960a47618cea2c560173b4fa20d51a
MD5 ba3d8ae35476068f9d5a40754e5f8ad1
BLAKE2b-256 acb266a917a592b6a773bdec806592dafcc7551af70da54d01ae37c3c17d1817

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: esspy-0.1.3-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 690.9 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for esspy-0.1.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 413406b9dd9ec7eb65579fbdfc9ec1cd27b61c4bdf4288864d37e8cb92e403fa
MD5 1441b2891b0327f2c25d4dcca8e8d640
BLAKE2b-256 853dde1a7c2d229c0bb2d883b1b17297020b728bed0395413209d07ce9cd58f6

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 184cc3068a4db85db6fd474076a97e4d6a31183c46884e1efb3f4b7461742e01
MD5 887b035c7b43d99adbaf1b28380f2dfc
BLAKE2b-256 0edf28b288dc4a835284b7cdb92126ee58b924fb5c632ccde3b6e8f995277486

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 89538e4e1d8b227d15e2a5d27d76755eaf7904981d94fdf88061953d26d859e8
MD5 2b56c04ff50c92f21094dd6472bdcc0c
BLAKE2b-256 ea47577a112fbceff1b5207bed2027a34b2af8616bf47da7a6ec8a9ea6ecf918

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp313-cp313-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 69b8d0816bdfe61c876724a8b6945836d4b0287c419c4e2b0bdd8ff7872bd2f7
MD5 5f8dc12d950e3f7c2d2162784de8860b
BLAKE2b-256 c38354bb4a65fe9e5ae132b59e0ad65a2e86f5284b2db6ce04ae515b43490481

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: esspy-0.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 690.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for esspy-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2ef08a9da5766734ec6a00a0c7e0f6e00b7a1a4c354e939123a2e108c4df9559
MD5 c4c57b35270ee17099ebf66bc0c1df60
BLAKE2b-256 029b9383a22de22df0580b1671622ace24d998edb430abce107ed5add88dbcbd

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b9418c139b2d943544df2c864979fe0a7d9c5bea06337ad9c0f0d26a6b09e76
MD5 35100c530d82f21536b71d6c07faaa69
BLAKE2b-256 ac79ba102b4f461bd5b34e4883aa848847f48b50e44e6c8a135527e0179f2afa

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 be619f7f8a5d8d13c69f84c77ae07f3b11d35ea088bef4a04415ae374e63d2c3
MD5 2e521639e102b3443a3c10ad8b34af7e
BLAKE2b-256 42bd9307cdd79d947ae9b0d83304ab3bb0f183d55eec9f1a548eaedd48018b62

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp312-cp312-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 5877a9254dc4025a19113a51b21c3f5556d599f7c536922a8e15bcc8e6b14c44
MD5 433e20239a4d50ce9225b43ffa8d7a70
BLAKE2b-256 f873d2cb60f95464ce7a562f7d1dc8bd0c4a4726edab97b78d326c1bdac2ef3c

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: esspy-0.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 691.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for esspy-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e94add64ca20d2e54e07ecc2db4c1e0da4b6aa498491d99904aa4b01d3fb8ac6
MD5 9a92a14aa2bfca234cce39a49f9cedcc
BLAKE2b-256 e7113743f0827edee8266e962ee5127640d0418c9f3f7fd94e0b8d9253f83297

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ce2f9d9513b448894b52016b98d91df379f3b9c3bbabb2abed259ce61d0ec4ae
MD5 b5d8ae5abf410321e91f235b9dedf8d8
BLAKE2b-256 41a64d79e554a990afb9e650ee76be9eb2b107767ab27369ea0cc92c16c12c66

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 670d99c7a3a8b6858342e3363b473377733e335d0649cd8f7b6757e83f90a59b
MD5 d0f000a86b83ec830636f8969d83f7c4
BLAKE2b-256 a3e1ae13fbcc6cedf988e5c02e7b2d56da7ac2f4070974fedbe66b3aead2522b

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp311-cp311-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4c3eded325f651e24656a12539c9d65f164ac7ba8e455c72ae29db4d560ad309
MD5 3dd871c5544b55f88c0e6a08d8cc51ef
BLAKE2b-256 a2bb62a7ceb0963ff55b7317d57d5cac9f5dd790eb696a2ddba8e0abbc73983b

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: esspy-0.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 690.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for esspy-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ebf693353e60fbcb8f6ccf4af5b1473daa40f9b928edf4d9d8159ab6fe59d678
MD5 0f544bfb9b1d076fcf45e8d49314c70a
BLAKE2b-256 ed6c73247dc4bee0a75de1f392269be9fd112b3b064dc1e1e75f62baca0e995e

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f3deec34c7b9618d418559c8572143fa7f936280e2a94670d58d7844ee841eb8
MD5 e976c7d617ab6643e2678f33b092fe48
BLAKE2b-256 ae956f1225df65caff443e0f40aa8c1e88f1b301ccbafa0ef789dd4d305325e9

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dfafdd086df16bb2c06bdf1b412d11cf47c877c80bf0a6a3b17a8765758c40e1
MD5 615aec3796bd54bc3c828348baf1b436
BLAKE2b-256 7c2e94e3f47520f2d6af5d0a9d1f4c88cdce373eeb6189f413bc4e46f5cffaf8

See more details on using hashes here.

File details

Details for the file esspy-0.1.3-cp310-cp310-macosx_10_15_x86_64.whl.

File metadata

File hashes

Hashes for esspy-0.1.3-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 4d7b85e237d4c07acc6c57fa5cb93b0b04e8c3e6ceb650faa9d7e9b8e91e20d5
MD5 6d33bbdd14210398274c564cd299d4e8
BLAKE2b-256 90fa03000a8f5e13d4fe6df3dc41dd1e9477ac1a515e78f4519414d947b2d622

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page