Skip to main content

ZStar

PyPI Python License

ZStar is a Python workflow toolkit for polarization, Born effective charge (BEC), phonon, infrared, Raman, and dielectric-response calculations with ABACUS, PyATB, and Phonopy.

Highlights

  • Forward or central finite-difference BECs.
  • Symmetry reduction, full-cell reconstruction, and acoustic-sum-rule correction.
  • Serial and resumable 0.no-move -> displacements execution.
  • Reuse of the converged reference charge density.
  • A one-time insulating-state gate using a normal band path by default.
  • Shell, Slurm, and Torque/PBS driver generation.
  • Legacy and direct-static-response PyATB compatibility.
  • Hybrid 2D BECs: Berry-phase in-plane response plus cube-integrated out-of-plane dipole.
  • IR, Raman, static/frequency-dependent dielectric, and MD + BEC response.

Installation

pip install -U zstar
zstar --version

Python 3.9 or newer is required. ABACUS, PyATB, and Phonopy are external programs used only by the corresponding workflows.

Serial BEC Workflow

# Generate 0.no-move and displacement folders
zstar gen --stru STRU --pyatb --method forward --force

# Run one resumable serial chain
zstar workflow run --root . --dim 3 \
  --abacus-command "mpirun -np 1 abacus" \
  --pyatb-command "mpirun -np 1 pyatb"

# Inspect progress
zstar workflow status

# Construct symmetry-consistent BEC tensors
zstar deal --dim 3 --method forward --pyatb

For a 2D slab, use --dim 2 in generation, execution, and post-processing. Full x/y/z displacements are required because the out-of-plane BEC row is obtained from the real-space slab dipole. The slab normal must currently align with Cartesian z.

The default insulating gate runs only for 0.no-move and uses:

pyatb_input --band

The path gate is a lightweight fail-fast check and cannot exclude an off-path metallic pocket. Use --gap-mode mp when a stricter MP-grid check is desired.

Generate one environment-specific driver:

zstar workflow script --backend shell
zstar workflow script --backend slurm --queue compute --cpus-per-task 28
zstar workflow script --backend torque --queue batch --cpus-per-task 28

Phonon, IR, and Dielectric Response

# INPUT must contain: cal_force 1
zstar ph --stru STRU --dim "2 2 2"
# Run all disp-* force calculations.
zstar postph
zstar irrep --file irreps.yaml --mode db

# Copy BORN and Z-BORN-symm.out from the BEC workflow.
zstar calc --qpoints qpoints.yaml --born Z-BORN-symm.out --dielectric BORN
zstar freq --qpoints qpoints.yaml --born Z-BORN-symm.out --dielectric BORN
zstar ir --qpoints qpoints.yaml --born Z-BORN-symm.out --dielectric BORN

For --dim 2, dielectric/IR response is reported as sheet polarizability unless an effective --thickness is supplied.

Raman Workflow

zstar raman prepare --stru STRU --qpoints qpoints.yaml \
  --modes "4-12" --copy INPUT-scf --copy KPT

zstar raman run --raman-dir raman --reference 0.no-move \
  --qpoints qpoints.yaml --dim 3

The Raman runner reuses the reference insulating gate and charge density, records every plus/minus stage, collects central-difference dielectric derivatives, and writes a Placzek spectrum.

MD + BEC Dielectric Response

ZStar accepts either fixed BEC tensors or one tensor array per trajectory frame. Frame-dependent tensors may be generated by ZStar, forced to fixed values, or predicted by an external model.

zstar md --dump dump.lammpstrj \
  --bec-dir bec_frames --bec-pattern "frame_{step}.npy" \
  --electronic-dielectric BORN \
  --temperature 300 --type-map "1:Hf,2:Zr,3:O" \
  --outdir md_dielectric

The output separates ionic susceptibility, epsilon_infinity, and

epsilon_total = epsilon_infinity + chi_ionic

Main Outputs

File Meaning
Z-BORN-reduced.out Raw explicitly calculated representative tensors.
Z-BORN-symm.out Full-cell symmetry-reconstructed and neutral BEC tensors.
BORN Electronic dielectric tensor plus Phonopy-order BECs.
ir_spectrum/ Mode charges, IR spectrum, and dielectric/sheet response.
raman_spectrum/ Raman activities, tensors, and broadened spectrum.
md_dielectric/ Ionic, electronic, and total MD dielectric tensors.

Logo on PyPI

This description intentionally contains no repository-relative logo. PyPI cannot render an image stored only in a private GitHub repository. A logo must use a stable, publicly accessible HTTPS URL; relative images remain suitable for the private GitHub README itself.

License

ZStar is distributed under GPL-3.0.

Download files

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

Source Distribution

zstar-0.1.0.tar.gz (3.6 MB view details)

Uploaded Source

Built Distribution

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

zstar-0.1.0-py3-none-any.whl (146.5 kB view details)

Uploaded Python 3

File details

Details for the file zstar-0.1.0.tar.gz.

File metadata

  • Download URL: zstar-0.1.0.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for zstar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6ad681e23215b7b6c96de450e819ef493eb2ee563f7a563be59404c3977b5f82
MD5 c6c53208c81e86ae0932c0f0927723b3
BLAKE2b-256 bf901ecc267728503957dec166765bbf4d0b62e71a2e378af3b09d9be7fed199

See more details on using hashes here.

File details

Details for the file zstar-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zstar-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 146.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for zstar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 50f05a5a6978be2b4ea4a32d7177800f9873867c890e2076330773cdba45ba5b
MD5 3f7b1f2f12bc1fda08655980e42f4ab3
BLAKE2b-256 6d4b88e0fa411f9508a75745e9780f2b8687c24459bec762d055924c99a8091e

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

0.0.8

2 files

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

0.0.3

1 file

0.0.2

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page