Skip to main content

mcta mcta mcta mcta mcta mcta mcta

mcta — Meta Crystal Toolkit & Analysis

mcta (Meta Crystal Toolkit & Analysis) tools package

mt prints an overview, checks the current directory and suggests the next command.

  • Install (Python ≥ 3.9; core dependencies: numpy, matplotlib, ase):
pip install mcta              # plotting tools only
pip install "mcta[seeker]"    # + mt.seeker (pymatgen, mp-api, scikit-learn, joblib)
pip install "mcta[seeker,llm,sqs]"   # + LLM mode (openai) and SQS (sqsgenerator)

mt.bandplot — VASP output is the default data source, vaspkit is optional

  • -i takes a directory (default: current). VASP output (EIGENVAL / DOSCAR / PROCAR) is preferred, otherwise BAND.dat / PBAND*.dat / PDOS*.dat are used.
  • -i alone plots bands, -d alone the DOS, -i -d both side by side; -r -p Mo-d adds projected bands (needs PROCAR, LORBIT = 11); -D -d spin-polarized mirror plot (--no-mirror to keep both positive); -m effective masses from EIGENVAL; two or three directories compare calculations.
  • Energies are shifted to the Fermi level (--no-shift keeps raw values); k-path labels come from KPOINTS/KLABELS or are computed automatically; --export-dat DIR dumps vaspkit-style .dat files.
mt.bandplot                               # bands of the current directory
mt.bandplot -i calc_PBE -l g m k g        # given directory, VASP or .dat auto-detected
mt.bandplot -i calc_PBE -d -z             # bands + DOS (DOSCAR or PDOS*.dat)
mt.bandplot -i calc_PBE -r -p Mo-d        # projected bands from PROCAR
mt.bandplot -i calc_PBE -D -d             # spin polarized: up/down panels + mirror DOS
mt.bandplot -i calc_PBE -m 0.15           # effective masses from EIGENVAL
mt.bandplot -i calc_PBE calc_HSE          # compare calculations
mt.bandplot -i BAND.dat -d PDOS*.dat      # vaspkit .dat route
File Used for
vasprun.xml eigenvalues, k-points, occupations, Fermi level, structure (parsed by ASE, preferred)
EIGENVAL eigenvalues, k-points (needed for bands / masses without vasprun.xml)
PROCAR / DOSCAR projected bands / DOS (LORBIT = 11)
OUTCAR E-fermi fallback, ISPIN, element names
KPOINTS / KLABELS high-symmetry labels
POSCAR / CONTCAR lattice and formula legend

mt.pbandplot — phonon band / DOS plotting

mt.pbandplot -h                                                    # all parameters
mt.pbandplot -i BAND.dat -o BAND.png -l g m k g -d projected_dos.dat -z
mt.pbandplot -B 23 100 -l g m k g -y -2 110                        # broken axis
mt.pbandplot -i BAND1.dat BAND2.dat -B 20 100                      # several files

mt.ph — phonopy workflow helper

  • mt.ph -b -d writes band.conf + mesh.conf (names via -B / -D). Without -b/-d it walks the phonopy steps one by one (supercell → force constants → band → DOS), printing and confirming each command; -Y runs without asking, -y only prints. B + Enter goes back one level, Q + Enter quits.
  • The unit cell file is auto-detected (POSCAR-unitcell → CONTCAR → POSCAR), or give -c FILE.
  • By default the phonopy v4+ commands are used (phonopy-init for setup steps, phonopy_params.yaml for band/DOS); add -O to use the legacy (v3) forms instead.
  • -n values (for the force-extraction step, implied by -n alone) may be directories, vasprun.xml suffixes or brace ranges; dir-{001..003} stays compact and bash expands it.
mt.ph                                           # supercell step (default; -s 2 2 1 sets DIM)
mt.ph -b -d --band "0 0 0 0.5 0 0 0.5 0.5 0.5 0 0 0" --labels "G X M G"
mt.ph supercell -s 2 2 1 -c POSCAR-unitcell     # explicit supercell
mt.ph -r                                        # force constants from ./vasprun.xml
mt.ph -n 001-003                                # extract forces -> phonopy-init -f vasprun.xml-{001..003}
mt.ph band                                      # band.conf -> band.yaml -> BAND.dat
mt.ph dos --total                               # mesh.conf -> projected_dos.dat (+ total_dos.dat)
mt.ph -O -y supercell -s 2 2 1                  # preview the legacy v3 command only
Option Meaning Default
-c FILE unit cell file auto-detected
-s N [N ...] supercell DIM, 1-3 integers (2x2x1, (2,2,1) also accepted) 1 1 1
-r [FILE] forces source; alone runs fc; with -n the forces file name inside each directory vasprun.xml
-n NAME [NAME ...] directories / vasprun.xml suffixes / ranges for the f step —
-b / -d write band.conf / mesh.conf only —
-B / -D names written by -b / -d band.conf / mesh.conf
--band / --labels / --points / --mp BAND path, labels, points, mesh used with -b / -d built-in, 20 20 20
-O / -Y / -y legacy v3 commands / run without asking / print only —

mt.seeker — Materials Project retrieval, curation and SQS

Retrieves crystal structures from the Materials Project, writes CIF / POSCAR / JSON and packs them into bundles ready for scp to a server (with optional INCAR / KPOINTS / slurm templates). Local structures can be filtered, deduplicated and re-exported; a custom unit cell can be expanded into special quasirandom structures (SQS). No calculations are executed locally.

Set the API key once (free account at https://next-gen.materialsproject.org):

mkdir -p ~/.config/mcseeker
echo 'MP_API_KEY=your-key' >> ~/.config/mcseeker/config
chmod 600 ~/.config/mcseeker/config
# or: export MP_API_KEY=... (lookup order: env -> $MCSEEKER_CONFIG -> the file above -> ./mcseeker.conf)

Typical usage:

mt.seeker --offline                                  # offline self-check, no key needed
mt.seeker -c Ti-C -k 3 -n ti-c                       # search by chemsys, export top 3
mt.seeker -f MoS2 -k 5 -F cif,poscar                 # search by formula
mt.seeker -I mp-149 mp-2658                          # or give mp_ids directly
mt.seeker -c Cr-I -k 2 --job-template                # + INCAR/KPOINTS/slurm templates
mt.seeker -t "find 2D candidates in Cr-I" -p deepseek  # natural language (needs mcta[llm])
mt.seeker -L                                         # list previous bundles

# local curation (dedup, filter, diversity, top-up)
mt.seeker -d                                         # dataset summary
mt.seeker -w "ehull<=0.05 and is_2d and has('Mn')"   # rule filter (-y previews only)
mt.seeker -r -D 8 -o my-pick                         # dedup + pick 8 most dissimilar
mt.seeker -T 5 -c Mn-P-S                             # download 5 more structures
mt.seeker -M                                         # ML analysis: random forest on manifests,
                                                     #   predicts ehull / band gap -> <home>/ml/

# SQS from a custom cell (needs mcta[sqs]; no network, no key)
mt.seeker -S cell.vasp -a "Cu:0.5,Au:0.5" -x 4,4,4 -n cuau-sqs
mt.seeker -S LaAlO3.cif --sqs-host La -a "La:0.5,Sr:0.5" -x 2,2,2   # A-site only

Each bundle lands in exports/<name>/ (structures/<id>/, manifest.csv with 14 columns, README.md, results/) plus exports/<name>.tar.gz; SQS bundles additionally contain sqs.json and sqs_summary.csv. Upload with scp exports/<name>.tar.gz user@server:~/calc/.

Short options are case-sensitive: -t task vs -T top-up, -r dedup vs -R refresh. mt.seeker -h prints the full option list; LLM engines (-p openai/deepseek/qwen/glm/kimi/siliconflow/gemini/openrouter/ollama/vllm, any OpenAI-compatible endpoint) and all MCSEEKER_* environment variables are documented there and in the code (mcta/seeker/config.py).


mt.sh — run bash helper scripts by short name

  • mt.sh NAME [args...] executes script NAME with bash and forwards the arguments unchanged, e.g. mt.sh xy POSCAR runs xy.sh POSCAR. The exit code of the script is returned.
  • Script lookup order: the current directory (./NAME.sh, local overrides first) → directories listed in $MTSH_SCRIPTS (colon/semicolon-separated) → the scripts bundled with the package (mcta/sh/scripts/).
  • Bare mt.sh (or mt.sh -l) lists every script found with its source path and a one-line description taken from the first comment line. python -m mcta.sh works as well.
  • Bundled scripts (VASP workflow helpers, best run on Linux/WSL; Windows needs Git Bash on PATH and the scripts use sed/awk/bc):

Citation

Structure data comes from the Materials Project: A. Jain et al., APL Materials 1, 011002 (2013).

Metadata

Release files for mcta 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for mcta 0.0.1
File Interpreter ABI Platform Actions
mcta-0.0.1-py3-none-any.whl Python 3 none any Details for mcta-0.0.1-py3-none-any.whl

Release files / mcta-0.0.1-py3-none-any.whl

Download URL mcta-0.0.1-py3-none-any.whl
Size 116.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0861cb7c726d6ff48c7bf8290b54e7e9d47b5f9b732e2e79aaff5631eeb026a0
BLAKE2b-256 checksum
How to use checksums
76006b9cc74018ad3da482b7bac08e06f031042586330552f49006e26d1ce192
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for mcta 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

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