Six domains matverse had the machinery for and did not reach - #22
Merged
Conversation
Working through a list of what a materials library was not covering. Each of
these is a formula over quantities matverse already produced; what was missing
was the step that reads them off.
Batteries. mv.thermo.voltage is the hull slope along the working-ion axis, and
mv.thermo.theoretical_capacity is the same question asked of one structure
rather than two — an electron count from oxidation states, which is what a
screen wants first and much more cheaply. LiFePO4 comes out at 3.497 V and
169.9 mAh/g against a measured plateau of 3.4-3.5 V and 170; NaFePO4 gives 154.2
for sodium against about 154, and zero for lithium, which is the right answer to
the wrong question.
The gap was a classification, not an oversight. The coverage map exempted the
whole 'apps' package as "pymatgen's own applications (borg, battery)", and that
one sentence put a directory-crawling data assimilator and a thermodynamic
calculation under the same verdict. Splitting it moved six modules into scope.
classify now matches a full module name as well as a top-level package, because
a package can hold unlike things and exempting it exempts all of them.
Scattering. mv.prop.scattering applies the two transforms an amorphous
structure needs before it can be compared with a measurement of one: S(q) and
G(r). Both are definitions, so both are checkable — an ideal gas returns
S(q) = 1.000000 everywhere, and a hard-sphere step reproduces its closed form.
The residual error is quadrature on whatever r grid mv.prop.rdf produced and
falls linearly with its step, 0.24 to 0.012 as the step goes 0.10 to 0.005.
Applying this to a crystal produces termination ripple larger than any real
peak, and the notes say so and point at mv.prop.xrd.
Superconductivity. mv.prop.superconductivity computes omega_log from the phonon
density of states and applies Allen-Dynes with the f1 and f2 strong-coupling
factors. It will not guess lambda: that is an integral over alpha^2 F and needs
EPW, and a guessed one produces a temperature that reads as a prediction. The
substitution of the phonon density of states for alpha^2 F is recorded, because
it assumes the coupling does not depend on frequency and that is wrong wherever
one branch dominates.
Catalysis. mv.surf.scaling fits the linear relation between two adsorbates and
mv.surf.volcano ranks surfaces against a Sabatier optimum. The residual is the
column worth reading rather than the fit — a catalyst that beats the scaling
ceiling has to break the relation. The optimum is an input and says so.
Thermoelectrics. mv.prop.zt needs a relaxation time the constant relaxation
time approximation exists in order not to supply, so it is required with no
default. But zt_ceiling needs none: tau appears in sigma and again in the
electronic thermal conductivity, and cancels. Checked across five decades of
conductivity, zT climbs 0.027, 0.24, 1.03, 1.55 and settles at 1.6384 against
an analytic 1.6393. A material whose Seebeck coefficient puts its ceiling below
the zT you need cannot be rescued by any conductivity, and that survives not
knowing tau.
Three of these refuse a default — lambda, tau, and the reference metal energy —
for the same reason, and it is worth stating once: a guessed input here does
not produce a wrong number, it produces a number that reads as a prediction.
What was deliberately not built is now written down. OUT_OF_SCOPE records five
domains with the reason each is a boundary rather than a backlog: dislocations
and plasticity, grain boundaries and texture, radiation damage, continuum
mechanics, and training interatomic potentials. A coverage figure computed over
one library's modules says nothing about the fields this library does not enter
either, and somebody deciding whether matverse fits their problem needs the
second list more than the first.
Ring statistics is on the amorphous list and is not here. King, Guttman and
primitive rings give different distributions from the same structure, and
shipping a number under an ambiguous definition is the failure mode the rest of
this commit is written to avoid.
One bug found by the contract probe: theoretical_capacity declared its columns
with an {ion} placeholder while the parameter is called working_ion, so nothing
expanded and all four claims read as unfulfilled. The verified rate fell to
99.4% and named them.
1012 tests pass on py3.12, 892 on py3.10. Contract-verified rate back to
165/165, all 16 notebooks execute with their printed numbers matching the prose,
docs build.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016wh5NzNE9Wn49nuUm7zg2a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Working through a list of what a materials library was not covering. Each of these is a formula over quantities matverse already produced; what was missing was the step that reads them off.
Batteries
mv.thermo.voltageis the hull slope along the working-ion axis.mv.thermo.theoretical_capacityasks the same question of one structure instead of two — an electron count from oxidation states, which is what a screen wants first and much more cheaply.The gap was a classification, not an oversight. The coverage map exempted the whole
appspackage as "pymatgen's own applications (borg, battery)" — one sentence putting a directory-crawling data assimilator and a thermodynamic calculation under the same verdict. Splitting it moved six modules into scope.classifynow matches a full module name as well as a top-level package, because a package can hold unlike things.Scattering
mv.prop.scatteringgives S(q) and G(r) — what an amorphous structure needs before it can be compared with a measurement of one. Both are definitions, so both are checkable: an ideal gas returns S(q) = 1.000000 everywhere, and a hard-sphere step reproduces its closed form. Error is quadrature on the r grid and falls linearly with its step (0.24 → 0.012 as the step goes 0.10 → 0.005). Applied to a crystal it produces termination ripple larger than any real peak; the notes say so and point atmv.prop.xrd.Superconductivity
ω_log from the phonon DOS, then Allen-Dynes with the f₁ and f₂ strong-coupling factors. It will not guess λ — that is an integral over α²F and needs EPW. The substitution of the phonon DOS for α²F is recorded, because it assumes frequency-independent coupling.
Catalysis
mv.surf.scalingfits the relation between two adsorbates;mv.surf.volcanoranks against a Sabatier optimum. The residual is the column worth reading, not the fit — a catalyst that beats the scaling ceiling has to break the relation.Thermoelectrics
mv.prop.ztrequires a relaxation time the constant-τ approximation exists in order not to supply. Butzt_ceilingneeds none: τ appears in σ and again in κ_electronic, and cancels.A material whose Seebeck coefficient puts its ceiling below the zT you need cannot be rescued by any conductivity — and that survives not knowing τ.
Three of these refuse a default — λ, τ, and the reference metal energy — for one reason worth stating once: a guessed input here does not produce a wrong number, it produces a number that reads as a prediction.
What was deliberately not built is now written down
OUT_OF_SCOPErecords five domains with the reason each is a boundary rather than a backlog: dislocations, grain boundaries, radiation damage, continuum mechanics, and training potentials. A coverage figure over one library's modules says nothing about the fields this library does not enter either.Ring statistics is on the amorphous list and is not here. King, Guttman and primitive rings give different distributions from the same structure, and shipping a number under an ambiguous definition is the failure mode the rest of this commit is written to avoid.
One bug, found by the probe
theoretical_capacitydeclared its columns with an{ion}placeholder while the parameter isworking_ion, so nothing expanded and all four claims read as unfulfilled. The verified rate fell to 99.4% and named them.Verification
1012 pass on py3.12, 892 on py3.10. Contract-verified rate back to 165/165. All 16 notebooks execute, with their printed numbers matching the prose. Docs build.
🤖 Generated with Claude Code
https://claude.ai/code/session_016wh5NzNE9Wn49nuUm7zg2a