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, esspy run first checks whether site allocation is impossible, unique, or genuinely variable. Unique allocations run as ordinary arrangement-only ESS. Multiple feasible allocations use the Ewald-probed allocation search (allocation.mode: optimize_by_ewald).

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.4.tar.gz (563.8 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.4-cp313-cp313-win_amd64.whl (775.4 kB view details)

Uploaded CPython 3.13Windows x86-64

esspy-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (911.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

esspy-0.1.4-cp313-cp313-macosx_11_0_arm64.whl (777.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

esspy-0.1.4-cp313-cp313-macosx_10_15_x86_64.whl (827.3 kB view details)

Uploaded CPython 3.13macOS 10.15+ x86-64

esspy-0.1.4-cp312-cp312-win_amd64.whl (775.4 kB view details)

Uploaded CPython 3.12Windows x86-64

esspy-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (911.8 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

esspy-0.1.4-cp312-cp312-macosx_11_0_arm64.whl (777.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

esspy-0.1.4-cp312-cp312-macosx_10_15_x86_64.whl (827.1 kB view details)

Uploaded CPython 3.12macOS 10.15+ x86-64

esspy-0.1.4-cp311-cp311-win_amd64.whl (775.0 kB view details)

Uploaded CPython 3.11Windows x86-64

esspy-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (913.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

esspy-0.1.4-cp311-cp311-macosx_11_0_arm64.whl (777.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

esspy-0.1.4-cp311-cp311-macosx_10_15_x86_64.whl (824.0 kB view details)

Uploaded CPython 3.11macOS 10.15+ x86-64

esspy-0.1.4-cp310-cp310-win_amd64.whl (774.0 kB view details)

Uploaded CPython 3.10Windows x86-64

esspy-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (912.6 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

esspy-0.1.4-cp310-cp310-macosx_11_0_arm64.whl (776.4 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

esspy-0.1.4-cp310-cp310-macosx_10_15_x86_64.whl (822.7 kB view details)

Uploaded CPython 3.10macOS 10.15+ x86-64

File details

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

File metadata

  • Download URL: esspy-0.1.4.tar.gz
  • Upload date:
  • Size: 563.8 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.4.tar.gz
Algorithm Hash digest
SHA256 40c6641623d16ba2595c2e33dab665f31e81d6274cab24a1f762c409b0299439
MD5 11bbd25ba6ebabf82449ac4edd8831e3
BLAKE2b-256 e81dd5e9efdd2f0cbe2c9513864fb8b560291c19c85dde2ed22b0ee479c4c6e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esspy-0.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 775.4 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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 22442dc123dd6bfdea4008b801e4790054c6d9da2aa98ee31959c7c7771b2e5c
MD5 35e448b26eb8abb1a7de31319e99fea3
BLAKE2b-256 eb9e2b3b97cc8d91aeb7c7411c9b9dbab9b5157929f4d23311fa12c8c4fc480d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c9ab9598d06eda81e47864895566a461c73ef4dbb57cd307f4ed131c0b69cc3e
MD5 873cfc9ea5bd63eb5e968e84190e88f0
BLAKE2b-256 29fe47b1159ed6b58820e7ff31b88b186d0357f4ce94a8bc9e8d63face6fab37

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 345857ab70adb5446fca94d364d3f200f7ce3862ca4232b826868745c12b18e0
MD5 40f7a30b73b82fc082dc52ae2a3ad225
BLAKE2b-256 5597897d29f2182a97aae92862d673f4556fb239ed4149fadae6ec7dcb599df9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp313-cp313-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 53c5fcc6fe07b024b3fdc0308a92e08a3e61a1fceeac3dda5255e57e1913b737
MD5 0d69ecd0abd607526fbdbf17c664b41a
BLAKE2b-256 1e2402e673e182008106f122781d5e3cdaff2f424c680c01a1619096b0fe4c7c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esspy-0.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 775.4 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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9cf68760146cac4bacdac099b52388ea0a155206a04b72b9f7b662d64fd36531
MD5 7a2c3e2d5a97595b8b8c7f1a1375805e
BLAKE2b-256 a9d0bf72c417b81dad4586bad604725e4429baf2ef3f6472e3f49fafc664161c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d5cbd75abf52979174bfe26ed8ccc681aec9f97ded6d6c6ed559302262866446
MD5 7e3ca928595f8d72a79fc1c2e737dc8e
BLAKE2b-256 94589ed824146c12f04e930fcda0a7a1ff269e2ac8c43df867fdeb162005cb50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 27fa3dbc00a1d2a7c736cfa890e527910523388388e554ecb7e60b2324da3fa2
MD5 7c9b27215adc74a421cc2c564bd0258b
BLAKE2b-256 0c9f641b42c036faa7ecc601018cf9372c6b78cb2c289658121fe66b566e66eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp312-cp312-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 c9645f249be3a9bedf9a546f15b14db174284b06cc6c8899b319a93c780a8a70
MD5 9ee603179129f4e74e23d52759ddea2e
BLAKE2b-256 57df50f225312eec804d25bf72c04f0e30d7f930ba13c76689ae0c5d0238c9f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esspy-0.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 775.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.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 73df2c25890b86aea927a0e982445ac702818265bf73bfb6bd20988457096955
MD5 1b0401aaf3c075b64b451b14e09a8280
BLAKE2b-256 e019b7b024b64e07e191825d2a65424ecd0b009e2a6c258f9fc9e215b7ac3002

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8f55839e84e59688fb2b2a2c52a00f35bbe852029a54e70341ba87479a3d5a5a
MD5 6b3bbf9f518ec5ef26b46d65013b2152
BLAKE2b-256 0c1379eb1d52519550de28307098d1c320051f816e40c23d309b59feeeb3abc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29df92477fdaf126255cf2278b94ec63f7ca8f7455d016b491f747505d39ded2
MD5 9fd600e3564794142b663f405e8633c6
BLAKE2b-256 874f89ac14b5914ac1d58d88184ea4269c172630945dcdebcc298fd58903dcc3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp311-cp311-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 061ca55e43c4ae07b5b1597894dd001b6aafb1cc41c92a3357d1ab17e92a921c
MD5 5cb45e5cdfce7f93425872c817f8cec7
BLAKE2b-256 b899abd7dd7c9adc6f66a9a3dc9c9d7e68e4033c6bbaf293f06ca5ca200ae7f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: esspy-0.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 774.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.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 bf0ef645728d4725c64ab84d286bc2638b0ead3a126d5bec11233b032895fe5f
MD5 a9eb0b395d5f1d3d03080760b41b36da
BLAKE2b-256 c9d977db520d85e90cd9be2cb955036fd49eb074a4964c21875472235ec873bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f3723b62a10c13366b71d8a9900b83fb12f32df243f5b0fa9b7949af8caf1ba
MD5 a1e51b33ff461ce3c668f414e513d92c
BLAKE2b-256 52511bbb1d0f0bf10c168cf648f7800e5693bda41b4566af5dd50aa84c03b10f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82891c95be299e595b98698bd17fb7ac6387ba9f9426eccb509eae909edcb0e5
MD5 d09db7fe74c903e6ba98fbca67809c8c
BLAKE2b-256 9e0591e579708dbbc6186455aab2ab8c9357bb1fc53c7a5396bd6fa0d612f7a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for esspy-0.1.4-cp310-cp310-macosx_10_15_x86_64.whl
Algorithm Hash digest
SHA256 2d050de7c7038b75779056ac0ffde4e687d99c2762cd86402b14fad2376a81a4
MD5 bea399a6357d9068562697108e0efdba
BLAKE2b-256 cad81f7f6d5ff55db04fc1583948d9b990588fdcdc70536b473b5df3c9099ecc

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