pymatgen-structure
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "pymatgen-structure" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b5a8fcf7cb01ab65df81710f3c317eb4796dc0a3412649cdf555928878be436c. Verify the upstream source and version against https://github.com/jinzhezenggroup/computational-chemistry-agent-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Structure manipulation and crystallographic analysis workflows built on pymatgen. Use for reading and writing common atomic formats (CIF, POSCAR, XYZ), building supercells, performing site substitution/doping, checking symmetry (space group), and computing local structural descriptors.
Introduction source: third_party · jinzhezenggroup · 0.1.0 Reference
SkillPi interpretation
- Tasks
- Use this skill to perform **structure preprocessing and analysis** with `pymatgen`.
- Inputs and outputs
- Typical input formats: `cif` `POSCAR` / `CONTCAR` `xyz` (for non-periodic or when cell is provided separately) other formats supported by `pymatgen` IO backends Typical output formats: `cif` `POSCAR` `xyz` optional JSON summaries
- Software, accounts and paid services
- The user must provide an input structure source (file path or explicit coordinates + lattice). If structure input is missing, stop and ask for it.
- Testing
- Not tested
Browse files
Frontmatter
name: pymatgen-structure
description: >
Structure manipulation and crystal analysis workflows based on pymatgen.
USE WHEN you need to read/write common atomistic formats (CIF, POSCAR, XYZ),
build supercells, perform site substitution/doping, inspect symmetry
(space group), or compute local structure descriptors for materials tasks.
compatibility: Requires Python 3.10+ and pymatgen (recommended via uv).
license: LGPL-3.0-or-later
metadata:
author: qqgu
version: 0.1.0
repository: https://github.com/materialsproject/pymatgenpymatgen Structure Operations
Use this skill to perform structure preprocessing and analysis with pymatgen.
Scope
This skill should:
- require at least one user-provided structure file
- parse and normalize common structure formats
- perform requested geometry edits (for example supercell, substitution)
- run basic crystal analysis (for example symmetry, composition)
- write explicit output files and summarize key changes
This skill should not:
- submit HPC jobs
- run expensive DFT/MD production calculations
- invent missing scientific intent (for example random doping strategy) without confirmation
If the user asks for DFT submission, hand off to a submission skill such as dpdisp-submit after preprocessing is done.
Hard requirement
The user must provide an input structure source (file path or explicit coordinates + lattice).
If structure input is missing, stop and ask for it.
Supported input/output formats
Typical input formats:
cifPOSCAR/CONTCARxyz(for non-periodic or when cell is provided separately)- other formats supported by
pymatgenIO backends
Typical output formats:
cifPOSCARxyz- optional JSON summaries
Expected workflow
- Read user-provided structure.
- Validate periodicity and cell information.
- Confirm requested operation (convert, supercell, substitution, analysis).
- Collect only missing critical parameters.
- Execute operation via
pymatgen. - Write output structure(s) and a short result summary.
- If requested, prepare handoff-ready files for downstream skills.
For concrete command patterns, see references/commands-and-workflow.md.
Operations this skill should handle
A) Format conversion
- convert between
cif/POSCAR/xyz - preserve lattice and species ordering when possible
B) Supercell construction
- apply scaling matrix, for example
[[2,0,0],[0,2,0],[0,0,1]] - report final atom count and new lattice vectors
C) Substitution / doping-like edits
- deterministic site substitution by species or by explicit site index
- report stoichiometry before/after
- ask user before applying random substitutions
D) Symmetry and composition analysis
- reduced formula
- lattice parameters
- space group symbol/number
- optional primitive/conventional standardization when explicitly requested
E) Local environment quick checks
- nearest-neighbor distances or coordination-style summaries
- report method/threshold assumptions
Parameters to collect
Must provide
- input structure path
- target operation type
- output path (or output naming rule)
Operation-specific
For format conversion:
- output format
For supercell:
- scaling matrix or
(na, nb, nc)
For substitution:
- source species/site selection
- target species
- substitution fraction or exact indices
For symmetry analysis:
- symmetry tolerance (if non-default behavior is desired)
Required behavior
- Check file existence/readability before processing.
- Detect and report missing lattice info for periodic workflows.
- Do not silently drop atoms or reorder species without notice.
- Explicitly show assumptions (for example tolerance values).
- Return exact output file paths.
Defaulting policy
Allowed only for low-risk defaults, clearly labeled.
Reasonable defaults:
- symmetry tolerance defaults from
pymatgenwhen user does not specify - output basename derived from input name + operation suffix
Do not silently invent:
- lattice for periodic systems
- substitution ratio for doping tasks
- magnetic/electronic settings (outside this skill's scope)
Expected output
Provide:
- output file path(s)
- concise summary of changes (atom count, composition, lattice deltas)
- analysis result highlights (for example space group)
- explicit assumptions and unresolved choices
- next-step suggestion when user wants downstream DFT/MD submission
Common failure points
- unreadable input file or ambiguous format
- xyz input lacking periodic cell when periodic workflow is requested
- invalid scaling matrix or impossible substitution request
- too aggressive tolerances causing unstable symmetry classification
Current listing version
0.1.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供材料科学中常见原子级格式(CIF、POSCAR、XYZ)的读写与转换能力
- 支持超胞构建、位点取代/掺杂、对称性分析等核心晶体操作
- 面向明确科研需求,具有广泛实用价值
Highlights
- 触发描述清晰完整,覆盖格式转换、超胞、取代、对称性等多种操作场景
- 边界定义明确,避免与其他技能重叠
Areas to improve
-
引用文件缺失 Reported severity: Major
SKILL.md 中引用了 references/commands-and-workflow.md 文件,但该文件未传入
Recommendation: 请补充 references/commands-and-workflow.md 文件,或移除对该文件的引用
Highlights
- 文档结构清晰,包含完整的工作流步骤和操作说明
- frontmatter 信息完整,包含兼容性、许可证等关键信息
Areas to improve
-
引用文件缺失 Reported severity: Major
references/commands-and-workflow.md 文件缺失,影响工作流完整性
Recommendation: 请补充 references/commands-and-workflow.md 文件以确保工作流完整性
Highlights
- 工具来源明确(pymatgen),参数定义清晰
- 覆盖主要异常情况,有合理的默认策略和用户确认机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
The user must provide an input structure source (file path or explicit coordinates + lattice). If structure input is missing, stop and ask for it.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.