Copy the prompt and paste it into a new session in Claude Science. By default, Claude asks with a permission card before it runs code or installs packages.
Prompt
X-ray diffraction is how we know where the atoms sit in a crystal. Simulate the powder diffraction patterns of silicon (diamond structure, a = 5.4311 Å) and rock salt (NaCl, a = 5.6402 Å) with pymatgen, for copper Kα₁ X-rays (wavelength="CuKa1", λ = 1.54056 Å) and angles 2θ up to 90°. Nothing needs downloading. Label every peak with its Miller indices hkl, and check each angle by hand with Bragg's law, λ = 2d sin θ, where d = a/√(h²+k²+l²). Both crystals share a face-centered cubic lattice, which allows 9 reflections in this range, yet silicon shows only 6: show that its 2-atom basis cancels 200, 222 and 420. In salt the all-odd peaks (111, 311, 331) are weak because Na and Cl scatter out of phase: show that too. Leave out other salts and what-ifs such as Na and Cl scattering equally, and round every number once, from its full-precision value. Put both patterns in 1 figure. Explain each step as you would to an undergraduate.
Simulates the X-ray powder patterns of silicon and table salt and labels every peak with Bragg’s law. Both share a face-centered cubic lattice, yet below 2θ = 90° salt shows 9 peaks and silicon 6, because silicon’s 2-atom basis cancels the 200, 222, and 420 reflections.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Claude.ai Documentation","colors":{"primary":"#0E0E0E","light":"#D4A27F","dark":"#0E0E0E"},"logo":{"light":"https://mintcdn.com/claude-ai/1fyDNLAICe3KG6rB/logo/light.svg?fit=max\u0026auto=format\u0026n=1fyDNLAICe3KG6rB\u0026q=85\u0026s=e870c19cb781d8a7c7b7d19de53b0a10","dark":"https://mintcdn.com/claude-ai/1fyDNLAICe3KG6rB/logo/dark.svg?fit=max\u0026auto=format\u0026n=1fyDNLAICe3KG6rB\u0026q=85\u0026s=80cc0b06d8fd9aeefec8acb226de6866"},"favicon":"https://mintcdn.com/claude-ai/N9YeVEPVxANlc2We/favicon.ico?fit=max\u0026auto=format\u0026n=N9YeVEPVxANlc2We\u0026q=85\u0026s=a22e48fa0189917f9be516d4a555898c","background":{"color":{"light":"#FDFDF7","dark":"#09090B"}},"navbar":{"links":[{"href":"https://support.anthropic.com","label":"Support"}],"primary":{"type":"button","label":"Go to Claude","href":"https://claude.ai"}},"footer":{"socials":{"x":"https://x.com/AnthropicAI","linkedin":"https://www.linkedin.com/company/anthropicresearch"},"links":[{"header":"Company","items":[{"label":"Anthropic","href":"https://www.anthropic.com/company"},{"label":"Careers","href":"https://www.anthropic.com/careers"},{"label":"Economic Futures","href":"https://www.anthropic.com/economic-futures"},{"label":"Research","href":"https://www.anthropic.com/research"},{"label":"News","href":"https://www.anthropic.com/news"},{"label":"Trust center","href":"https://trust.anthropic.com/"},{"label":"Transparency","href":"https://www.anthropic.com/transparency"}]},{"header":"Help and security","items":[{"label":"Availability","href":"https://www.anthropic.com/supported-countries"},{"label":"Status","href":"https://status.anthropic.com/"},{"label":"Support center","href":"https://support.claude.com/"}]},{"header":"Learn","items":[{"label":"Courses","href":"https://academy.claude.com/"},{"label":"MCP connectors","href":"https://claude.com/partners/mcp"},{"label":"Customer stories","href":"https://www.claude.com/customers"},{"label":"Engineering blog","href":"https://www.anthropic.com/engineering"},{"label":"Events","href":"https://www.anthropic.com/events"},{"label":"Powered by Claude","href":"https://claude.com/partners/powered-by-claude"},{"label":"Service partners","href":"https://claude.com/partners/services"},{"label":"Startups program","href":"https://claude.com/programs/startups"}]},{"header":"Terms and policies","items":[{"label":"Privacy policy","href":"https://www.anthropic.com/legal/privacy"},{"label":"Disclosure policy","href":"https://www.anthropic.com/responsible-disclosure-policy"},{"label":"Usage policy","href":"https://www.anthropic.com/legal/aup"},{"label":"Commercial terms","href":"https://www.anthropic.com/legal/commercial-terms"},{"label":"Consumer terms","href":"https://www.anthropic.com/legal/consumer-terms"}]}]},"seo":{"metatags":{"canonical":"https://claude.com/docs"}},"fonts":{"family":"Anthropic Sans"},"contextual":{"options":["copy","view","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"claude-ai","hasAudioNarration":false,"actualSubdomain":"claude-ai","customDomains":["claude.com"],"gitSource":{"type":"github","owner":"anthropics","repo":"claude-ai-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6aecd2323e88da70853022de","collectionId":"6ad27b7d-e90c-4d06-9bdb-9519e02f46e8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6aecd2323e88da70853022de"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aed151869a2ec0c40a68b0f","clientVersion":"0.0.4074","searchFilterCounts":[{"language":"default","tag":"Claude Tag","count":76},{"language":"default","tag":"For administrators","count":61},{"language":"default","tag":"Claude for Government","count":44},{"language":"default","tag":"Claude on third-party platforms","count":42},{"language":"default","tag":"Claude Desktop","count":42},{"language":"default","tag":"Claude Science","count":41},{"language":"default","tag":"Build for Claude","count":30},{"language":"default","tag":"Set up Claude Tag","count":30},{"language":"default","tag":"Use Claude Science","count":23},{"language":"default","tag":"Customize Claude","count":22}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/docs/_mintlify/custom/claude-ai/f864c4801ebb83ca/style.css"}],"page":{"pagePath":"claude-science/example-gallery/mat-xrd","slug":"/claude-science/example-gallery/mat-xrd","pageMetadata":{"title":"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9","sidebarTitle":"X-ray diffraction","description":"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg's law.","keywords":["materials"],"href":"/claude-science/example-gallery/mat-xrd"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg’s law.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(`div`,{className:`example-gallery-page`,children:_jsxs(Frame,{children:[_jsx(OptimizedImage,{className:`mint-block dark:mint-hidden`,src:`https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=6d56de735b8fe6c1fd456f7259fc7d4d`,alt:`Simulated X-ray diffraction patterns: silicon has 6 labeled peaks, with 200, 222, and 420 marked absent; rock salt has 9.`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`980`,height:`980`,\"data-path\":`images/claude-science/example-gallery/mat-xrd-full-light.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=280\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=ae3de39f27006093bafdd6da10257913 280w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=560\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=ab1f8e88b7ea6df5b5c99d713cabd7d2 560w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=840\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=3f12f431000e3a4c340df6e6f202ab8f 840w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=855ec9cf43fe3ee9f736ff421fcf34fa 1100w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=d17ff181083c325adada08ab637e4dff 1650w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-light.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=8eaa0091102da660a56474b7cd1405bc 2500w`}),_jsx(OptimizedImage,{className:`mint-hidden dark:mint-block`,src:`https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=ce7e07ffd94f457100ac376aa7a18fab`,alt:`Simulated X-ray diffraction patterns: silicon has 6 labeled peaks, with 200, 222, and 420 marked absent; rock salt has 9.`,\"data-og-width\":`1600`,width:`1600`,\"data-og-height\":`980`,height:`980`,\"data-path\":`images/claude-science/example-gallery/mat-xrd-full-dark.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=280\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=47ab79fe7fb5cca859fafe36c141a387 280w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=560\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=2db7060d14e9620fdccb8ce412e25c90 560w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=840\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=44fb679554078a0b0ce34a131af3d3d1 840w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=b87d3468e977f2ccb537f0be1457c5c0 1100w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=3dae4b89927b1ab0e7200fad1a142854 1650w, https://mintcdn.com/claude-ai/F2QP9ubtYgT0edFI/images/claude-science/example-gallery/mat-xrd-full-dark.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=F2QP9ubtYgT0edFI\u0026q=85\u0026s=ba6a4c635160a8add1971064b34f38a3 2500w`})]})}),`\n`,_jsxs(_components.p,{children:[`The numbers in your session might differ from this picture and from the summary in `,_jsx(_components.a,{href:`#reference-analysis`,children:`Reference analysis`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prompt`,children:`Prompt`}),`\n`,_jsxs(_components.p,{children:[`Copy the prompt and paste it into a new session in `,_jsx(_components.a,{href:`/claude-science/overview`,children:`Claude Science`}),`. By default, Claude asks with a `,_jsx(_components.a,{href:`/claude-science/core-concepts#permission-cards`,children:`permission card`}),` before it runs code or installs packages.`]}),`\n`,_jsx(CodeBlock,{filename:`Prompt`,wrap:`true`,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`X-ray diffraction is how we know where the atoms sit in a crystal. Simulate the powder diffraction patterns of silicon (diamond structure, a = 5.4311 Å) and rock salt (NaCl, a = 5.6402 Å) with pymatgen, for copper Kα₁ X-rays (wavelength=\"CuKa1\", λ = 1.54056 Å) and angles 2θ up to 90°. Nothing needs downloading. Label every peak with its Miller indices hkl, and check each angle by hand with Bragg's law, λ = 2d sin θ, where d = a/√(h²+k²+l²). Both crystals share a face-centered cubic lattice, which allows 9 reflections in this range, yet silicon shows only 6: show that its 2-atom basis cancels 200, 222 and 420. In salt the all-odd peaks (111, 311, 331) are weak because Na and Cl scatter out of phase: show that too. Leave out other salts and what-ifs such as Na and Cl scattering equally, and round every number once, from its full-precision value. Put both patterns in 1 figure. Explain each step as you would to an undergraduate.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`reference-analysis`,children:`Reference analysis`}),`\n`,_jsx(_components.p,{children:`Simulates the X-ray powder patterns of silicon and table salt and labels every peak with Bragg’s law. Both share a face-centered cubic lattice, yet below 2θ = 90° salt shows 9 peaks and silicon 6, because silicon’s 2-atom basis cancels the 200, 222, and 420 reflections.`}),`\n`,_jsx(Heading,{level:`2`,id:`data`,children:`Data`}),`\n`,_jsx(_components.p,{children:`This example doesn’t download any data.`})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9","sidebarTitle":"X-ray diffraction","description":"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg's law.","keywords":["materials"],"href":"/claude-science/example-gallery/mat-xrd"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prompt","slug":"prompt","depth":2,"children":[]},{"title":"Reference analysis","slug":"reference-analysis","depth":2,"children":[]},{"title":"Data","slug":"data","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/claude-ai/b857db804a3a9481/desktop-app-nav.js"],"dynamicCss":".mint-block {\n display: block\n}\n.mint-hidden {\n display: none\n}\n.dark\\:mint-block:is(.dark *) {\n display: block\n}\n.dark\\:mint-hidden:is(.dark *) {\n display: none\n}","subdomain":"claude-ai","siteName":"Claude.ai Documentation","title":"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9 - Claude.ai Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-16T16:02:20.303Z","originalFileLocation":"claude-science/example-gallery/mat-xrd.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg\u0026#x27;s law.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Claude.ai Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9 - Claude.ai Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg\u0026#x27;s law.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Claude.ai Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://claude.com/docs/claude-science/example-gallery/mat-xrd\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://claude-ai.mintlify.site/docs/_mintlify/api/og/v2?division=Example+gallery\u0026amp;title=A+first+X-ray+diffraction+pattern%3A+why+silicon+shows+6+peaks+and+salt+9\u0026amp;description=Simulate+the+X-ray+powder+patterns+of+silicon+and+table+salt+and+label+every+peak+with+Bragg%27s+law.\u0026amp;theme=c937feb09b37748e448783d0\u0026amp;signature=52182400045d077646ab47fa1b88196f7121e61f77e6ffc7d115b01bc6ac5ef9\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9 - Claude.ai Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg\u0026#x27;s law.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://claude-ai.mintlify.site/docs/_mintlify/api/og/v2?division=Example+gallery\u0026amp;title=A+first+X-ray+diffraction+pattern%3A+why+silicon+shows+6+peaks+and+salt+9\u0026amp;description=Simulate+the+X-ray+powder+patterns+of+silicon+and+table+salt+and+label+every+peak+with+Bragg%27s+law.\u0026amp;theme=c937feb09b37748e448783d0\u0026amp;signature=52182400045d077646ab47fa1b88196f7121e61f77e6ffc7d115b01bc6ac5ef9\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/claude-ai/zHw4o4W7dZma2XXV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Claude.ai Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0E0E0E\">\u003clink data-mint-head rel=\"canonical\" href=\"https://claude.com/docs/claude-science/example-gallery/mat-xrd\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/claude-science/example-gallery/mat-xrd.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://claude.com/#organization\",\"name\":\"Claude.ai Documentation\",\"url\":\"https://claude.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/claude-ai/1fyDNLAICe3KG6rB/logo/light.svg?fit=max\u0026auto=format\u0026n=1fyDNLAICe3KG6rB\u0026q=85\u0026s=e870c19cb781d8a7c7b7d19de53b0a10\"}},{\"@type\":\"WebSite\",\"@id\":\"https://claude.com/docs#website\",\"name\":\"Claude.ai Documentation\",\"url\":\"https://claude.com/docs\",\"publisher\":{\"@id\":\"https://claude.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd#webpage\",\"url\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd\",\"name\":\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9\",\"description\":\"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg's law.\",\"dateModified\":\"2026-10-16T16:02:20.303Z\",\"isPartOf\":{\"@id\":\"https://claude.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Use Claude Science\",\"item\":\"https://claude.com/docs/claude-science/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Example gallery\",\"item\":\"https://claude.com/docs/claude-science/example-gallery\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9\",\"item\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd#article\",\"headline\":\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9\",\"name\":\"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9\",\"description\":\"Simulate the X-ray powder patterns of silicon and table salt and label every peak with Bragg's law.\",\"url\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd\",\"mainEntityOfPage\":{\"@id\":\"https://claude.com/docs/claude-science/example-gallery/mat-xrd#webpage\"},\"dateModified\":\"2026-10-16T16:02:20.303Z\",\"keywords\":\"materials\",\"publisher\":{\"@id\":\"https://claude.com/#organization\"},\"isPartOf\":{\"@id\":\"https://claude.com/docs#website\"}}]}\u003c/script>","siteName":"Claude.ai Documentation","nav":{"global":null,"tabs":[{"tab":"Welcome","pages":[{"title":"Welcome","href":""}]},{"tab":"Customize Claude","pages":[{"title":"Customize Claude","href":"/extend/overview"}]},{"tab":"Build for Claude","pages":[{"title":"Build for Claude","href":"/build/overview"}]},{"tab":"Cowork","pages":[{"title":"Cowork","href":"/cowork/overview"}]},{"tab":"Claude Tag","pages":[{"title":"Claude Tag","href":"/claude-tag/overview"}]},{"tab":"Claude for M365","pages":[{"title":"Claude for M365","href":"/office-agents/overview"}]},{"tab":"Claude Science","groups":[{"group":"Use Claude Science","pages":[{"title":"Claude Science","sidebarTitle":"Claude Science","href":"/claude-science/overview"},{"title":"Get started","sidebarTitle":"Get started","href":"/claude-science/get-started"},{"title":"Claude Science in its own window on macOS","sidebarTitle":"Mac app window","href":"/claude-science/mac-app-window"},{"title":"Update Claude Science","sidebarTitle":"Update","href":"/claude-science/update-claude-science"},{"title":"Run on a remote Linux server","sidebarTitle":"Run on a remote server","href":"/claude-science/run-on-remote-linux-server"},{"title":"Core concepts","sidebarTitle":"Core concepts","href":"/claude-science/core-concepts"},{"group":"Example gallery","root":{"title":"Example gallery","mode":"wide","href":"/claude-science/example-gallery"},"pages":[{"title":"Genetic drift in a bottle: Buri's 107 fruit-fly populations","sidebarTitle":"Genetic drift in a bottle","href":"/claude-science/example-gallery/bio-drift"},{"title":"A titration curve from the full equilibrium: which indicator finds the equivalence point?","sidebarTitle":"Titration curve","href":"/claude-science/example-gallery/chem-titration"},{"title":"A first Kaplan–Meier curve: the 1963 leukemia trial of 6-MP","sidebarTitle":"Kaplan–Meier curve","href":"/claude-science/example-gallery/clin-km"},{"title":"PageRank on a web of 11 pages: why 1 good link beats 6 weak ones","sidebarTitle":"PageRank, 11 pages","href":"/claude-science/example-gallery/cs-pagerank-tiny"},{"title":"A first finite-element model: a clamped steel ruler bends and vibrates","sidebarTitle":"Cantilever beam","description":"Split a 300 mm steel ruler clamped at one end into 4 beam elements and check its bending under 1 N and its first 3 vibration modes against beam theory.","href":"/claude-science/example-gallery/eng-beam"},{"title":"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9","sidebarTitle":"X-ray diffraction","href":"/claude-science/example-gallery/mat-xrd"},{"title":"The Ulam spiral: are the primes' diagonal streaks real?","sidebarTitle":"Ulam spiral","description":"Compare the share of primes per diagonal on Ulam's 1963 spiral of 1 to 40,401 against as many random odd numbers.","href":"/claude-science/example-gallery/math-ulam"},{"title":"The double slit, one electron at a time","sidebarTitle":"Electron double slit","href":"/claude-science/example-gallery/phys-doubleslit"},{"title":"Schelling's segregation model: ask for 30% same-color neighbors, end up with 75%","sidebarTitle":"Schelling's segregation model","href":"/claude-science/example-gallery/soc-schelling-small"}]},{"title":"Safeguards","sidebarTitle":"Safeguards","href":"/claude-science/safeguards"},{"title":"Auto mode","sidebarTitle":"Auto mode","href":"/claude-science/auto-mode"},{"title":"Use Claude Science on more than one computer","sidebarTitle":"Multiple computers","href":"/claude-science/multiple-computers"},{"title":"Artifacts in Claude Science","sidebarTitle":"Artifacts","href":"/claude-science/artifacts"},{"title":"Comments","sidebarTitle":"Comments","href":"/claude-science/comments"},{"title":"The reviewer","sidebarTitle":"The reviewer","href":"/claude-science/the-reviewer"},{"title":"Tools and environments","sidebarTitle":"Tools and environments","href":"/claude-science/tools-and-environments"},{"title":"Troubleshoot Claude Science","sidebarTitle":"Troubleshooting","href":"/claude-science/troubleshooting"}]},{"group":"Integrations \u0026 skills","pages":[{"title":"Connectors and skills","sidebarTitle":"Connectors and skills","href":"/claude-science/connectors-and-skills"},{"title":"Remote compute clusters","sidebarTitle":"Remote compute clusters","href":"/claude-science/remote-compute-clusters"},{"title":"Compute providers","sidebarTitle":"Compute providers","href":"/claude-science/compute-providers"},{"title":"Cloud storage","sidebarTitle":"Cloud storage","href":"/claude-science/cloud-storage"},{"title":"Literature access","sidebarTitle":"Literature access","href":"/claude-science/literature-access"},{"title":"Custom connectors","sidebarTitle":"Custom connectors","href":"/claude-science/custom-connectors"}]},{"group":"For administrators","pages":[{"title":"Enable Claude Science","sidebarTitle":"Enable Claude Science","href":"/claude-science/enable-claude-science"},{"title":"How Claude Science works with your data","sidebarTitle":"How Claude Science works with your data","href":"/claude-science/how-claude-science-works-with-your-data"},{"title":"Admin controls","sidebarTitle":"Admin controls","href":"/claude-science/admin-controls"},{"title":"Manage Claude Science on devices","sidebarTitle":"Manage on devices","href":"/claude-science/manage-on-devices"},{"title":"Use Claude Science on a corporate network","sidebarTitle":"Corporate networks","href":"/claude-science/corporate-networks"},{"title":"Network requirements","sidebarTitle":"Network requirements","href":"/claude-science/network-requirements"},{"title":"Monitor Claude Science usage","sidebarTitle":"Monitor usage","href":"/claude-science/monitor-usage"}]},{"group":"Reference","pages":[{"title":"Glossary","sidebarTitle":"Glossary","href":"/claude-science/glossary"},{"title":"Command line settings","sidebarTitle":"Command line settings","href":"/claude-science/command-line-settings"},{"title":"Configuration file reference","sidebarTitle":"Configuration reference","href":"/claude-science/configuration-file-reference"}]},{"group":"Resources","pages":[{"title":"Claude Science changelog","sidebarTitle":"Changelog","href":"/claude-science/changelog"},{"title":"Legal and compliance","sidebarTitle":"Legal and compliance","href":"/claude-science/legal-and-compliance"}]}]},{"tab":"Claude on third-party platforms","pages":[{"title":"Claude on third-party platforms","href":"/third-party/claude-desktop/overview"}]},{"tab":"Claude self-hosted","hidden":true,"pages":[{"title":"Claude self-hosted","href":"/third-party/claude-desktop/self-hosted/overview"}]},{"tab":"Claude for Government","pages":[{"title":"Claude for Government","href":"/government/overview"}]}]},"basePath":"","title":"A first X-ray diffraction pattern: why silicon shows 6 peaks and salt 9 - Claude.ai Documentation","buildId":"dpl_CEsowfH15TDzsBT2BFbX312Be4Ct","deploymentId":"dpl_CEsowfH15TDzsBT2BFbX312Be4Ct","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-E5itAVSN.js","DynamicMarkdown-DORtg_Te.js","zoom-image-lightbox-OBZHPeVn.js","lightbox-handle-r17bVUz3.js"]}