{"library":"pymatgen-analysis-alloys","title":"pymatgen-analysis-alloys Library","description":"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.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install pymatgen-analysis-alloys"],"cli":null},"imports":["from pymatgen_analysis_alloys.composition import DisorderedComposition","from pymatgen_analysis_alloys.disordered_systems import DisorderedStructure"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pymatgen_analysis_alloys.composition import DisorderedComposition\nfrom pymatgen.core.composition import Composition\n\n# Create a simple disordered composition, e.g., Cu_0.5 Ni_0.5\ndisordered_comp = DisorderedComposition({\"Cu\": 0.5, \"Ni\": 0.5})\n\nprint(f\"Disordered composition: {disordered_comp}\")\nprint(f\"Formula: {disordered_comp.reduced_formula}\")\n\n# Compare with a standard pymatgen Composition\nstandard_comp = Composition({\"Cu\": 0.5, \"Ni\": 0.5})\nprint(f\"Standard composition: {standard_comp}\")\n\n# Accessing properties\nprint(f\"Atomic fractions: {disordered_comp.as_dict()}\")\n","lang":"python","description":"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`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}