Registry / data / pymatgen-analysis-alloys

pymatgen-analysis-alloys

JSON →
library0.0.9pypypiunverified

pymatgen-analysis-alloys is an add-on library for Pymatgen, providing classes and tools specifically designed for describing alloy (disordered) systems. It extends Pymatgen's core functionalities to handle compositions and structures where atomic sites may be occupied by multiple species with certain probabilities. The current version is 0.0.8, and releases are generally tied to new features or compatibility updates within the broader Pymatgen ecosystem.

pip install pymatgen-analysis-alloys
INSTALL
IMPORT
SIG · PYMATGEN-ANALYSIS-
P
pymatgen-analysis-alloys
datapythonv0.0.9
Install
28.5s avg
Import
Disk
618MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.0.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 28.5s · import 0.000s · 580MB
618MB installed
● package 618MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

DisorderedComposition
from pymatgen.analysis.alloys import DisorderedComposition
from pymatgen.analysis.alloys.composition import DisorderedComposition

This example demonstrates how to create a `DisorderedComposition` object for an alloy system and access its basic properties. It also shows the distinction between a `DisorderedComposition` and a standard Pymatgen `Composition`.

from pymatgen_analysis_alloys.composition import DisorderedComposition from pymatgen.core.composition import Composition # Create a simple disordered composition, e.g., Cu_0.5 Ni_0.5 disordered_comp = DisorderedComposition({"Cu": 0.5, "Ni": 0.5}) print(f"Disordered composition: {disordered_comp}") print(f"Formula: {disordered_comp.reduced_formula}") # Compare with a standard pymatgen Composition standard_comp = Composition({"Cu": 0.5, "Ni": 0.5}) print(f"Standard composition: {standard_comp}") # Accessing properties print(f"Atomic fractions: {disordered_comp.as_dict()}")
Debug
Known issues
gotchaCompatibility with `pymatgen` versions is crucial. This library requires `pymatgen>=2022.0.8`. Using an older `pymatgen` version may lead to `ImportError`s, `TypeError`s, or unexpected behavior.
fix
Ensure your `pymatgen` installation meets the minimum version requirement: `pip install --upgrade pymatgen`.
affects: <0.0.8
gotchaObjects from `pymatgen-analysis-alloys` (e.g., `DisorderedComposition`, `DisorderedStructure`) are specialized extensions of `pymatgen`'s core objects. While they often inherit similar methods, they may not be fully compatible with all functions expecting a pure `pymatgen.Composition` or `pymatgen.Structure` without explicit handling.
fix
Always refer to the specific documentation or source code for `pymatgen-analysis-alloys` objects when integrating them into workflows, especially if passing them to other Pymatgen-based tools.
affects: All
gotchaThe library primarily focuses on the *description* and representation of disordered systems. While it provides useful data structures, it does not inherently offer advanced simulation or analysis capabilities (e.g., Monte Carlo, DFT calculations) beyond what Pymatgen itself provides, without further integration with other tools.
fix
Understand the scope of `pymatgen-analysis-alloys` as a foundational descriptive tool for disordered materials, and plan to integrate it with other computational packages for advanced simulations.
affects: All
Upgrade
Version history
0.0.9latest on PyPI · released Apr 24, 2026
Audit
Dependencies
pymatgenrequiredCore dependency for materials science data structures; requires >=2022.0.8
Agent activity
28 hits · last 30 days
node
26
OpenAI (training)
2
Resources
pymatgen-analysis-alloys — pip install pymatgen-analysis-alloys · libregistry