科研 Skill

衍射结构表征

diffraction

Covers diffraction-based structure characterization (XRD, neutron, SAED): space group determination, Rietveld refinement, phase identification. Use for any diffraction-pattern analysis technique.

发布者 Codar安全审核通过v0.1.0更新于 2026-11-18

SKILL.md

Diffraction

Overview

Diffraction techniques determine atomic structure by measuring how a sample scatters X-rays, neutrons, or electrons. All three share the underlying crystallography (Bragg's law, space groups, structure factors) but differ in what they're sensitive to (X-rays: electron density; neutrons: nuclear positions, strong for light elements like H/Li; electrons: strong scattering, useful for nanocrystals and local/SAED work) and in practical acquisition constraints. This skill covers what's shared — space groups, Rietveld refinement, CIF format — and routes to type-specific references.

When to use this skill

Activate when the request involves:

  • XRD, X-ray diffraction, powder diffraction, neutron diffraction, SAED, electron diffraction
  • Terms: Bragg's law, space group, Rietveld refinement, structure factor, d-spacing, CIF
  • File formats: .cif, .xrdml, .raw (diffractometer formats), .gsas
  • "Index this diffraction pattern," "refine this crystal structure," "identify this phase"

Which reference to read

You have...Read
Powder or single-crystal X-ray diffractionreferences/xrd.md
Neutron diffractionreferences/neutron-diffraction.md
Electron diffraction (SAED, in a TEM)references/electron-diffraction.md — also see microscopy/references/tem.md

Core usage — shared crystallography

Reading and writing structures (CIF format)

from pymatgen.core import Structure

structure = Structure.from_file("material.cif")
print(structure.get_space_group_info())   # (symbol, number)
structure.to(filename="material_out.cif")

Structure/composition object handling is covered in depth in materials-structure-analysis — this skill focuses on the diffraction-specific measurement and refinement workflow.

Rietveld refinement (GSAS-II, scripted)

import GSASIIscriptable as G2sc

gpx = G2sc.G2Project(newgpx="refinement.gpx")
hist = gpx.add_powder_histogram("pattern.xrdml", "instrument.prm")
phase = gpx.add_phase("material.cif", histograms=[hist])

hist.set_refinements({"Background": {"no. coeffs": 6, "refine": True}})
hist.set_refinements({"Cell": True})   # refine lattice parameters
gpx.do_refinements([{}])   # execute the refinement steps queued above
gpx.save()

r_wp = hist.get_wR()   # weighted-profile R-factor — goodness of fit, see pitfalls

Validation & Pitfalls

Canonical reference: Toby & Von Dreele (2013), "GSAS-II: the genesis of a modern open-source all purpose crystallography software package," Journal of Applied Crystallography, for Rietveld methodology and tooling; Young (ed.), The Rietveld Method (1993), for the foundational method.

  • A low R-factor (Rwp) does not by itself mean the refined structure is correct. Rwp measures fit quality against the data, but an over-parameterized model (too many refined variables for the data quality) can achieve a low Rwp while being physically implausible. Check the goodness-of-fit (GOF/chi-squared) and refine parameters in a stable, physically motivated order (scale → background → lattice → peak shape → atomic positions → thermal parameters), not all at once.
  • Preferred orientation (non-random crystallite orientation in a powder sample) systematically distorts relative peak intensities and, if not modeled, biases refined atomic positions and site occupancies. Check for it (peak intensity ratios inconsistent with the structure model) before trusting a refinement, especially for plate- or needle-shaped crystallites.
  • Phase identification from peak positions alone is ambiguous when multiple candidate phases share similar unit cells — always cross-check against a reference database (ICDD PDF, or a structure database — see materials-databases) rather than accepting the closest peak-position match without verifying peak intensity ratios too.
  • Instrument contribution to peak broadening must be characterized (e.g. via a standard reference material) before extracting sample-intrinsic broadening (crystallite size, microstrain) — treating raw peak width as purely sample-intrinsic overestimates strain/underestimates crystallite size.

示例提示词

我有一组XRD谱图,需要做Rietveld精修确定相组成和空间群。

所属插件

材料表征、性能与材料信息学面向实验与数据驱动的材料研究:XRD/电镜/谱学/热分析/力学测试等表征,合成与加工,电化学与半导体表征,相场、CALPHAD 与连续介质力学,材料数据库、特征工程、贝叶斯优化与主动学习,选材与生命周期评价。

安装该插件会一并获得同领域的 42 个 Skill / MCP。

同插件的其他科研 Skill

常见问题

衍射结构表征能做什么?

Covers diffraction-based structure characterization (XRD, neutron, SAED): space group determination, Rietveld refinement, phase identification. Use for any diffraction-pattern analysis technique。

如何安装衍射结构表征?

在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「衍射结构表征」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。

衍射结构表征需要哪些权限?

该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。

衍射结构表征经过官方审核吗?

是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。