본문으로 건너뛰기
Skillpedia
머신러닝51k · #3542

pymatgen

하는 일

이 도구는 재료에 관한 데이터를 분석하고 정리하도록 돕습니다. 정보를 확인하고, 형식을 바꾸고, 구조와 화합물의 특성을 이해할 수 있습니다.

사용하는 경우

  • ✓재료 데이터가 있고 그것이 올바른지 확인하고 싶을 때.
  • ✓데이터를 한 형식에서 다른 형식으로 변환해야 할 때.
  • ✓재료의 구조와 특성을 이해하고 싶을 때.

스킬 링크

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pymatgen/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/pymatgen/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 재료 구조 파일을 분석하고 그 특성을 알려 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구는 재료 정보를 읽고, 검증하고, 조작하기 위한 규칙과 함수 세트를 사용합니다. 각 단계가 기록되어 정확성을 유지하도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

pymatgen

Use pymatgen for explicit, provenance-preserving work with compositions, molecules, periodic structures, computed entries, symmetry, phase diagrams, electronic structures, and electronic-structure-code files. Treat every parse, conversion, symmetry assignment, transformation, and database result as method- and parameter-dependent.

The MIT frontmatter license covers this skill. pymatgen and pymatgen-core are MIT; mp-api declares BSD-3-Clause-LBNL. Materials Project data is generally CC BY 4.0, while contributed data remains owned by its contributors. Check the exact artifact and data terms before redistribution.

Verified snapshot (2026-09-30)

  • pymatgen==2026.9.24 is the latest stable wrapper release (uploaded 2026-09-23). Package metadata requires Python 3.11+ and directly requires pymatgen-core>=2026.9.23.
  • pymatgen-core==2026.9.23 is the latest stable core release (2026-09-23). It now contains core objects, symmetry/lattice operations, and the I/O layer, all under the existing pymatgen.* namespace.
  • mp-api==0.46.5 is the latest stable Materials Project client (2026-08-18), requires Python 3.11+, and depends on pymatgen>2024.2.20.
  • The current API site is built from 2026.9.23 core documentation. Pinning both distributions prevents pymatgen==2026.9.24 from silently resolving to a different future core.
  • Pymatgen uses date-based versions. PyPI renders the date with dots; do not infer semantic-version compatibility from the numbers.

The local CLI suite and synthetic examples were executed on this snapshot. File-dependent VASP/Q-Chem parses and authenticated API examples below are illustrative: their signatures and current SDK source were checked, but no licensed calculation or authenticated service retrieval was performed.

Create a project lock for reproducibility:

uv init --python 3.11
uv add "pymatgen==2026.9.24" "pymatgen-core==2026.9.23" "mp-api==0.46.5"
uv lock
uv sync --frozen

For a disposable reviewed environment:

uv venv --python 3.11 .venv-pymatgen
uv pip install --python .venv-pymatgen/bin/python \
  "pymatgen==2026.9.24" "pymatgen-core==2026.9.23" "mp-api==0.46.5"

Direct pins do not freeze all transitive wheels. Preserve uv.lock, platform, Python version, package versions, and artifact hashes.

Required workflow

  1. State whether the object is a non-periodic Molecule or periodic Structure; record lattice and periodic boundary conditions.
  2. State units. Pymatgen commonly uses Å, degrees, eV, eV/atom, amu, and g/cm³, but each API's documented contract is authoritative.
  3. State coordinate mode. Structure coordinates are fractional unless coords_are_cartesian=True; Molecule coordinates are Cartesian.
  4. Inspect every parser warning. For CIF, preserve occupancy, site-merging, stoichiometry, and correction warnings; do not silently accept fixes.
  5. Report disorder/partial occupancies and oxidation-state decoration. Never guess oxidation states implicitly.
  6. Run validation before symmetry, neighbor, transformation, conversion, or thermodynamic analysis.
  7. Sweep symmetry tolerances and report symprec in Å and angle_tolerance in degrees with every assignment.
  8. Treat transformations as new artifacts. Preserve the input, parameters, software versions, warnings, and parent/child checksums.
  9. Before conversion, identify representation loss. Write only to a new path and round-trip-check scientifically relevant properties.
  10. Build phase diagrams only from compatible total energies and correction schemes. A computed hull is conditional on the supplied entry set.
  11. Keep all database access off by default. Disclose endpoint, filters, fields, result limit, cache behavior, output, license, and citation before an explicit execution step.
  12. Preserve an artifact manifest. Never use pickle or load an untrusted general object graph; use schema-validated JSON and explicit constructors.

Core objects

Use the public convenience imports:

from pymatgen.core import Composition, Element, Lattice, Molecule, Structure

composition = Composition("LiFePO4", strict=True)
iron = Element("Fe")

lattice = Lattice.cubic(5.64)  # Å
structure = Structure(
    lattice,
    ["Na", "Cl"],
    [[0, 0, 0], [0.5, 0.5, 0.5]],
    coords_are_cartesian=False,
    validate_proximity=True,
)

molecule = Molecule(
    ["O", "H", "H"],

…
자주 묻는 질문

이 맥락에서 ‘구조’와 ‘화합물’은 무엇인가요?

구조는 재료를 이루는 원자의 배열, 즉 공간에서 어떻게 조직되어 있는지를 뜻합니다. 화합물은 이 재료를 구성하는 화학 원소의 결합입니다.

모든 단계를 기록하는 것이 왜 중요한가요?

모든 단계를 기록(출처)하면 결과가 어떻게 얻어졌는지 정확히 알 수 있어, 다른 사람이 작업을 검증하거나 재현할 수 있습니다.

비결정질 재료에도 쓸 수 있나요?

네, 이 도구는 결정(주기적 구조)과 비주기적 분자 모두를 다룰 수 있습니다.

상세 정보

작성자의 원본 설명

Analyzes, validates, converts, and transforms materials structures and computed materials data with pymatgen. Use for local phase diagrams, symmetry sensitivity, electronic-structure I/O, and bounded Materials Project queries.

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3542
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬