科研 Skill
材料统计方法与实验设计
materials-stats
Covers statistics shared across materials characterization and simulation: design of experiments. Use for cross-cutting statistical treatment of materials data.
SKILL.md
Materials Statistics
Overview
Three things come up across nearly every technique in this repo: designing an experimental campaign
efficiently (DOE), propagating measurement uncertainty through a derived quantity, and treating
replicate/repeated measurements correctly. This skill covers those. Weibull statistics for
brittle-fracture strength data live in mechanical-testing specifically because the domain context
(what counts as a valid specimen population, ASTM conventions) is inseparable from the technique
there; Bayesian-optimization-for-experiment-selection lives in high-throughput-autonomous-labs
since that's about choosing the next experiment, not analyzing completed ones.
When to use this skill
Activate when the request involves:
- Design of experiments, DOE, factorial design, uncertainty quantification, error propagation, measurement uncertainty, replicate measurements
- Terms: full factorial, fractional factorial, Latin hypercube, propagation of error, confidence interval
- "Design an experiment to test multiple factors," "propagate uncertainty through this calculation," "how many replicates do I need"
Core usage
Design of experiments — factorial design
from pyDOE2 import fullfact, fracfact
full_design = fullfact([3, 3, 2]) # 3 levels x 3 levels x 2 levels — e.g. temperature x time x atmosphere
# Full factorial grows combinatorially — fractional factorial trades some
# interaction-effect resolution for far fewer runs, standard for screening
# many factors before a smaller focused full-factorial or response-surface study:
frac_design = fracfact("a b c abc")
Uncertainty propagation (a general, technique-agnostic tool)
import numpy as np
def propagate_uncertainty(func, values, uncertainties, n_samples=100000, seed=42):
"""Monte Carlo error propagation — more robust than analytical propagation
formulas for nonlinear functions or correlated/non-Gaussian inputs, at the
cost of being approximate/sampling-based rather than exact."""
rng = np.random.default_rng(seed)
sampled_inputs = [rng.normal(v, u, n_samples) for v, u in zip(values, uncertainties)]
sampled_outputs = func(*sampled_inputs)
return {"mean": sampled_outputs.mean(), "std": sampled_outputs.std()}
# Example: propagating uncertainty in density = mass / volume
density_result = propagate_uncertainty(
lambda m, v: m / v, values=[10.5, 2.1], uncertainties=[0.02, 0.01]
)
Replicate measurement treatment
from scipy import stats
def replicate_summary(measurements, confidence=0.95):
"""Standard error and confidence interval from replicate measurements —
required whenever reporting a mean value from more than one measurement,
across any technique in this repo."""
n = len(measurements)
mean = np.mean(measurements)
sem = stats.sem(measurements)
ci = stats.t.interval(confidence, n - 1, loc=mean, scale=sem)
return {"mean": mean, "sem": sem, f"{int(confidence*100)}%_CI": ci, "n": n}
Validation & Pitfalls
Canonical references: Montgomery, Design and Analysis of Experiments (10th ed., 2019), for DOE; Taylor, An Introduction to Error Analysis (2nd ed., 1997), for uncertainty propagation.
- Fractional factorial designs sacrifice the ability to resolve certain interaction effects — check the design's resolution (which interactions are confounded with which) before choosing one, not just the run-count savings. A resolution III design confounds main effects with two-factor interactions, which can be seriously misleading if those interactions are actually important for the system being studied.
- Monte Carlo uncertainty propagation assumes the input uncertainty distributions (often assumed Gaussian, as in the code above) are actually representative — a systematic (not random) error source, or a genuinely non-Gaussian measurement error distribution, isn't captured correctly by a naive Gaussian Monte Carlo approach; identify systematic error sources separately rather than folding them into a random-uncertainty propagation.
- A single measurement has no meaningful "uncertainty" without either an instrument-specified precision or actual replicate measurements — don't report a confidence interval computed from a single data point treated as if it were a distribution. Replicate measurements (not just repeated reads of the same acquisition) are needed to capture real measurement-to-measurement variability.
- Reporting "n" (number of replicates/samples) is not optional — a mean value without a stated sample size and uncertainty is incomplete for any quantitative materials claim, matching the broader principle (shared with this repo's sibling neuroscience skills project) that no reported number should stand without its uncertainty.
- DOE assumes factors are actually independently controllable at the specified levels — in practice, some factor combinations may be physically unachievable or produce a different regime entirely (e.g. a temperature/atmosphere combination that changes reaction mechanism) — check that the full designed factor space is physically sensible before running it, not just statistically efficient.
示例提示词
我想设计一组实验方案并对这批材料数据做不确定度传播分析。
所属插件
安装该插件会一并获得同领域的 42 个 Skill / MCP。
同插件的其他科研 Skill
- 贝叶斯优化材料发现Covers Bayesian optimization for materials and chemistry design: surrogate models, acquisition functions, batch/constrained BO. Use when planning sample-efficient experiments or simulations.
- CALPHAD热力学计算工作流Covers CALPHAD computational thermodynamics: database selection, equilibrium/metastable calculations, binary/ternary phase diagrams. Use when predicting phase stability or solidification paths.
- 材料第一性原理与分子动力学模拟Routes first-principles and classical materials simulation (DFT, MD, ML potentials) to the right specialized workflow. Use as an entry point for any simulation-based materials task.
- 蠕变力学建模与验证Selects, calibrates, and validates creep deformation and rupture models under sustained thermomechanical load, covering rate prediction. Use when assessing long-term high-temperature components.
- 晶体塑性有限元建模Covers crystal plasticity and CPFE modeling of metals: slip systems for FCC/BCC/HCP, Schmid factors. Use when simulating texture- and orientation-dependent plastic deformation.
- 衍射结构表征Covers diffraction-based structure characterization (XRD, neutron, SAED): space group determination, Rietveld refinement, phase identification. Use for any diffraction-pattern analysis technique.
- EBSD织构分析Analyzes EBSD orientation maps for grain size, misorientation, phase, and texture, with pole figures and twin-boundary identification. Use for electron backscatter diffraction workflows.
- 电化学性能测试分析Covers electrochemical characterization: cyclic voltammetry, battery cycling analysis, EIS. Use for electrochemistry-specific data analysis distinct from general materials characterization.
- 金属疲劳寿命评估Builds, calibrates, and validates fatigue assessments for metals and components: stress-life, strain-life, multiaxial critical-plane. Use when predicting fatigue life or crack growth.
- 多物理场有限元建模Covers finite element modeling for coupled materials, mechanics, and transport problems: weak-form construction, boundary conditions, mesh choice. Use for multiphysics FEM simulations.
- 连续尺度有限元力学建模Covers continuum-scale mechanical, thermal, and multiphysics simulation with Abaqus/COMSOL conventions, mesh generation. Use for macroscale FEM consuming measured or computed material properties.
- 断裂力学评估与建模Selects, constructs, and validates fracture-mechanics assessments: LEFM checks, elastic-plastic fracture mechanics. Use when assessing cracked materials or components.
- 高斯过程材料回归建模Covers Gaussian process regression for materials and chemistry datasets: descriptor selection, kernel design. Use when a probabilistic surrogate model with uncertainty is needed.
- 自驱动实验室闭环材料发现Covers combinatorial synthesis, robotic experimentation. Use for autonomous or robotics-driven experimental campaigns, a less standardized domain.
- 材料数据库可复现访问Covers reproducible API access to materials databases (Materials Project, AFLOW, OQMD, NOMAD, COD, ICSD-style sources): authentication. Use when programmatically querying these databases.
- 材料数据库跨库查询Covers querying public materials databases beyond Materials Project: AFLOW, OQMD, NOMAD, JARVIS. Use when pulling or comparing data from these live, API-integrated resources.
- 材料数据标准与互操作Covers data interoperability standards for materials science: CIF crystal files, the OPTIMADE query API. Use when structuring or exchanging materials data between tools.
- 材料结构特征化Covers converting structures, compositions, and trajectories into ML feature vectors: Magpie-style elemental statistics. Use when building inputs for materials ML models.
- 材料科学图表绘制规范Covers publication-quality figure conventions for materials science plots: phase diagrams, pole figures, stress-strain curves. Use when the deliverable is a figure, not just an analysis result.
- 材料信息学性质预测Covers ML for materials property prediction and generative design: descriptor-based models, crystal GNNs (CGCNN/MEGNet-class). Use for materials informatics distinct from interatomic potentials.
- 材料生命周期评估Covers life-cycle assessment for materials and manufacturing routes: goal/scope definition, functional units, inventory construction. Use for environmental-impact studies of materials.
- 材料科学文献检索Covers formulating literature search queries for materials science questions and synthesizing/citing results responsibly. Requires a web search tool; it cannot substitute for one.
- 工程材料选型设计Selects engineering materials via material indices and Ashby charts, ranking candidates by performance per cost or mass. Use when picking a material class for a design constraint.
- 材料结构与成分核心分析Covers core structure and composition analysis: reading/writing crystal structures, composition handling, symmetry analysis, phase diagrams. Use as a general-purpose structure-analysis toolkit.
常见问题
材料统计方法与实验设计能做什么?
Covers statistics shared across materials characterization and simulation: design of experiments. Use for cross-cutting statistical treatment of materials data。
如何安装材料统计方法与实验设计?
在科搭 Codar 左侧点击「插件」,在「组件」页签搜索「材料统计方法与实验设计」并安装;在 Claude Code 或 Codex 中可以发送本页的安装提示词,或下载 Skill 包后解压到 ~/.claude/skills 或 ~/.codex/skills。
材料统计方法与实验设计需要哪些权限?
该科研 Skill没有声明额外权限;执行具体操作时仍由 Agent 按自身规则请求确认。
材料统计方法与实验设计经过官方审核吗?
是。SpeedSkills 收录的每个版本都会记录内容摘要与权限声明,当前版本已通过安全审核。