← 返回实验室English Markdown中文 Markdown

Crystal & Diffraction Lab 1.0 — scientific basis and independent AI review

This is a generic educational workbench for ideal cubic structure prototypes. It is not a calibrated diffractometer, experimental image generator, CIF parser or refinement package. All basis sites have equal, real scalar scattering weight f=1. Default a=4 angstrom and lambda=1.5406 angstrom are independent illustrative settings, not a fitted material or a simulation of the Cu K-alpha doublet.

Coordinates and structure

The incident wavevector is (0,0,+1/lambda). We use inverse angstrom without a 2pi factor: g=R(h,k,l)/a and g=k_out-k_in. The Ewald sphere is centered at -k_in with radius 1/lambda. R=Rz Ry Rx acts on column vectors; positive detector X points right and Y points up. The phase convention is exp(+2pi i u dot b).

The unique conventional-cell fractional basis lies in [0,1): SC has 1 site, BCC 2, FCC 4, diamond 8. Diamond is an FCC Bravais lattice plus a basis, not a fourth Bravais lattice. Boundary copies in the displayed cell are excluded from scattering sums. Miller plane polygons satisfy hx+ky+lz=m for integer m in fractional cell coordinates. Atom radii, connectors, shading and mechanical hardware are illustrative. Structure close-up and instrument atomic models have separate display magnification. The 3D detector face nevertheless preserves its width/distance ratio: 6.2 display units represents 200 mm and the face lies at z=.031L from the sample, so predicted rays meet the same detector coordinates.

The reciprocal view draws conventional-cell integer hkl candidate index points in -3..3; the selected hkl is shown separately. Centering/basis cancellations are not all nonzero reciprocal scattering nodes. Extinct candidates are hidden by default and can be shown in gray.

Elastic single-crystal detector

For each pixel center r=(X,Y,L), k_out=r/(|r|lambda). Thus every outgoing ray is elastic. u=aR-transpose*(k_out-k_in) enters the continuous basis structure factor F(u)=sum_j exp(2pi i u dot b_j). A finite N-by-N-by-N block of conventional cells has amplitude F(u) times product over axes of sum_n=0..N-1 exp(2pi i n*u_axis). The full geometric sum is used, with the integer limit N squared for its squared magnitude. Intensity is divided by N^6 and the squared basis-site count. No integer-only extinction shortcut, random spots, arbitrary excitation envelope or isolated sinc approximation is substituted for this computation.

The detector covers 200-by-200 mm on a forward plane. Its central beamstop has radius 2 mm. Bragg reachability (lambda*|g| <= 2) does not guarantee acceptance: k_out.z must be positive and both intersection coordinates must lie within +/-100 mm. For a=4,lambda=1.5406,400 is backward, though it satisfies Bragg. The image uses pixel-center sampling and log contrast, not pixel-area integration. Polarization, pixel solid angle, efficiency, absorption, thermal effects and multiple/dynamical scattering are omitted. Values are relative point-scatterer intensities, never experimental photon counts.

A worker computes from an immutable parameter snapshot. During updates the UI identifies the previous calculated frame; synchronization is declared only after the latest queued request completes. Interrupting an orientation animation commits the exact final angle snapshot before declaring synchronization.

Ideal random powder

All signed/permuted integer reciprocal candidates within the 8..120 degree 2theta range are enumerated. Allowed |F_hkl|^2 values are summed into equal-d shells; this already includes multiplicity. The common unpolarized random-powder LP convention (1+cos^2(2theta))/(sin^2(theta)*cos(theta)) is applied, independently of the single-crystal detector model. No second multiplicity correction is used.

Equal-d shells can contain distinct families: SC h^2+k^2+l^2=9 combines {300} and {221}, with total shell multiplicity 30. JSON includes the full family list; CSV explicitly labels representative h/k/l and shell_multiplicity. Individual reflection families must not be assigned that combined multiplicity.

A separate constant FWHM Gaussian is area-normalized in degrees on the 2theta axis. Displayed 1D curves are rescaled to their peak height, and detector colors use the single highest-weight Gaussian peak height as reference before log contrast. Powder rings are generated from exactly the same angular profile, using 2theta=atan2(sqrt(X^2+Y^2),L). Powder rotation is statistically averaged; single-crystal angles and N do not enter it. FWHM is not a Scherrer size estimate and is not derived from the finite single-crystal N.

Reference checks

  1. IUCr, The reciprocal lattice — Ewald and Bragg construction: https://www.iucr.org/what-we-do/education/pamphlets/reciprocal-lattice
  2. IUCr, Structure factor — complex basis sum: https://dictionary.iucr.org/Structure_factor
  3. CCP4-ED, Compounds — centered and diamond basis examples: https://www.ccp4.ac.uk/ccp4-ed/misc/compounds/ The diamond index-sum rule requires the FCC parity condition; 211 is extinct.
  4. Official pymatgen XRDCalculator documentation — reciprocal enumeration, multiplicity and LP convention: https://pymatgen.org/pymatgen.analysis.diffraction.html Unlike that quantitative calculator, this workbench deliberately uses f=1 rather than element-dependent atomic form factors.

Independent AI review and numerical evidence

An independent AI reviewer checked the scientific design and implementation against independent direct finite-crystal complex sums and reference numbers. Baseline a=4 angstrom, lambda=1.5406 angstrom:

The reviewer identified a missing endpoint on a cube-boundary Miller polygon. A failing four-corner regression reproduced it; collecting both edge endpoints corrected it. The reviewer also identified an orientation-interruption frame synchronization gap. A browser regression reproduced up to about two degrees of stale detector orientation; submitting the final snapshot corrected it to zero. Ten scientific regression tests now cover Bragg limits, cubic geometry, centering and diamond absences, continuous structure factors, independent direct finite-block sums, Friedel symmetry, powder multiplicity, independent line weights, forward/backward acceptance, complete cube faces and Gaussian integrated area.

Model SHA256 at review: af3bfa6845b97dbb49fb09f247866d00ccdf119202ced4b7b3d33c784baff915. Final independent review closure and browser/release evidence are recorded in VALIDATION.md. Independent AI review is not certification by a crystallography expert; the declared model omissions remain applicable.

Unified Crystal & XRD workspace

The protected online workspace now also hosts the D8 symmetric powder-scan instrument and an interactive principles workspace. The original explorer remains a distinct single-crystal/reciprocal-space model. Explicit pending-parameter transfer never converts single-crystal orientation into acquired powder data or overwrites a historical scan. See the joint principles review for angle conventions, plane interference, peak formation and transfer limits.

晶体与衍射实验室:科学基础与独立 AI 审核

本工具是理想立方结构原型的教学工作台,不是标定衍射仪、实验图像生成器、CIF 分析或结构精修软件。所有基元使用相等实标量散射权重 f=1。默认 a=4 Å、λ=1.5406 Å 是独立演示设定,不是拟合材料,也不模拟 Cu Kα 双线。

结构与坐标

入射波矢 ki=(0,0,+1/λ)。倒易单位为 Å⁻¹,不含 2π;g=R(h,k,l)/a=kf−ki,Ewald 球心为 −ki、半径 1/λ。R=Rz Ry Rx 作用于列向量;探测器 X 向右,Y 向上。基元相位约定 exp(+2πi u·b)。

半开常规晶胞 [0,1) 内,SC/BCC/FCC/金刚石型分别有 1/2/4/8 个唯一位置。金刚石型为 FCC Bravais 点阵加基元,不是第四种 Bravais 点阵。显示的边界复制不参与重复计数。Miller 晶面满足分数坐标 h x+k y+l z=m,m 为整数;多边形裁剪包括边界两端点。

原子半径、连接线、材质和仪器外观为示意。晶胞特写、仪器模型和倒易空间采用不同尺度。3D 探测器仍严格保留宽度与距离比:6.2 显示单位对应 200 mm,探测器面距离为 .031 L,因此射线落点与二维图像一致。倒易视图显示 −3…3 的常规晶胞 hkl 候选点,所选索引单独显示;消光候选默认隐藏,可显示为灰色,不能全部称为非零散射点。

有限单晶逐像素计算

每个探测器像素中心 r=(X,Y,L),kf=r/(|r|λ),保证弹性散射。u=a Rᵀ(kf−ki);连续结构因子 F(u)=Σj exp(2πi u·bj)。有限 N×N×N 晶块振幅为 F(u) 乘三个方向的完整几何级数 Σn=0…N−1 exp(2πi n u)。强度以 N⁶ 和基元数平方归一,整数极限取 N²。没有用整数消光规则代替连续求和,也没有用随机亮点、任意激发包络或独立 sinc 近似伪造图样。

前向探测器为 200×200 mm,中心束挡半径 2 mm。满足 λ|g|≤2 只说明 Bragg 可达;还须 kf,z>0 且落点 X/Y 均在 ±100 mm 内。默认参数下 400 为后向反射,不投影至前方。图像采用像素中心采样和对数对比,不做像素面积积分;未加入极化、立体角、效率、吸收、热效应和动力学/多重散射。因此是相对点散射强度,不是光子计数。

Worker 使用不可变参数快照;计算中明确标记上一已计算帧。只有最新请求完成才显示同步。中断取向动画也提交最终实际取向,避免画面与读数不同步。镜头环绕不改变散射计算。

随机粉末

枚举 2θ=8…120° 内所有有符号和排列的允许整数反射,按相同 d 合并,已经包含多重性。采用无织构随机粉末的常用非偏振 LP=(1+cos²2θ)/(sin²θ cosθ),不再重复乘多重性,也不把它作为单晶探测器校正。

等 d 壳层可能包括多个晶面族,例如 SC 的 h²+k²+l²=9 包括 {300} 与 {221},壳层总多重性 30,不能归给其中单独一个族。JSON 保留族清单,CSV 明确区分代表索引与壳层多重性。

粉末峰使用独立等 FWHM、在度数 2θ 轴上面积归一的高斯展宽。曲线按峰高进行显示归一;探测器颜色以最高权重单个高斯峰高为参照再取对数。环图由同一剖面经 2θ=atan2(√(X²+Y²),L) 映射。粉末不依赖所显示单晶的取向或 N,FWHM 不是由 N 推导的 Scherrer 尺寸。

数值审核

独立 AI 审核以直接有限晶块复数求和及独立基准检查模型。默认参数下,111 的 d=2.3094010767585034 Å,2θ=38.96873821328758°;对准后 g=(.4082151565332153,0,−.14443125) Å⁻¹、kf,z=.5046665041217708 Å⁻¹、X/L=.8088810198402174。400 的 kf,z=−.12120224587822925 Å⁻¹。连续 u=(.5,0,0) 时 SC/BCC/FCC/金刚石型 F²=1/2/8/27.313708498984766。金刚石型 200/211/222 消光,111 与 220 的 F² 分别为 32、64。

审核发现并修复了晶胞边界晶面缺少顶点,以及中断对准后探测器残留旧取向的问题。十项科学回归覆盖 Bragg 限制、几何、消光、连续结构因子、直接求和、Friedel 对称、多重性、独立线权重、前后向接收、完整边界及高斯面积。完整交互和发布证据见 VALIDATION.md。独立 AI 审核不等同于晶体学专家认证。

模型 SHA256 保持为 af3bfa6845b97dbb49fb09f247866d00ccdf119202ced4b7b3d33c784baff915。真实原子散射因子的 q 依赖、温度因子、无序、织构、吸收及真实仪器响应仍不在模型范围内。

依据

晶体与 XRD 联合工作台

登录后的在线工作区同时整合 D8 对称双臂粉末扫描和交互原理工作台。原有晶体探究保持独立的单晶与倒易空间模型。待采参数仅通过显式按钮传递,不把单晶取向转换为已采粉末信号,也不改写历史扫描。角度约定、晶面干涉、峰形成及传递边界见联合原理审核。