Decouple SpheriCart from Polynomials4ML#123
Conversation
Replaces the lib/AtomicOrbitals subpackage: the type and all Ylm-generic logic live in src/atomicorbitals/, with the SpheriCart-specific glue (complex value type, _rand_* fixtures) in ext/SpheriCartExt.jl behind a [weakdeps] SpheriCart. Avoids registering a generically-named package.
|
Update: Reconsidered the
This revises the earlier "no
🤖 Generated with Claude Code |
- Restore src/atomicorbitals/atomicorbitals.jl name - _rand_* builders live in core via a _default_ylm extension hook - Re-add atomic-orbital cases to test_lux - Document the import-SpheriCart requirement (docstring + polynomials.md) - Fix docs build: drop stale @refs, update regression tutorial to SpheriCart
|
Follow-up (review fixes):
Verified: 🤖 Generated with Claude Code |
Decouples P4ML from SpheriCart. The spherical-harmonics wrapper and the
atomic-orbitals basis (P4ML's only SpheriCart consumer) move out, so P4ML
core no longer depends on SpheriCart at all.
Changes
src/sphericart.jldeleted;SpheriCartdroppedfrom
[deps]/[compat]). The harmonics + their evaluate interface nowlive in SpheriCart itself (Complex harmonics + ACEbase evaluate-interface extension lab-cosmo/sphericart#235).
natural_indicesvia ACEbase:import ACEbase: natural_indicesinstead of a local stub, so it is the shared generic
(Add natural_indices to the shared evaluation interface ACEbase.jl#10). ACEbase compat → 0.4.7.
AtomicOrbitalsinto a newlib/AtomicOrbitalssubpackage(mirrors EquivariantTensors
lib/ACEradials; not a P4ML dependency).Its angular
Ylmis now a bare SpheriCart basis used purely via theACEbase interface (parameter/state-free, Bumper-stack buffers keep it
allocation-free). All dead code (commented Lux layers / hyperdual /
evaluate_ed_dpblocks) dropped in the move.test_sphericart.jl,test_atorbrad.jlremovedfrom core; sphericart cases dropped from
test_gpu/test_lux/test_transformed).Breaking (version 0.5.10 → 0.6.0):
Polynomials4ML.real_solidharmonics/real_sphericalharmonics/complex_*/AtomicOrbitalsare gone. Downstream should useSpheriCartACEbasefor harmonics, orlib/AtomicOrbitalsfor atomic-orbital bases.Depends on ACEbase ≥ 0.4.7 (#10) and SpheriCart ≥ 0.2.4 (#235);
CI here will only resolve once those are registered.
Verified locally (deps dev'd): P4ML
Pkg.test1303/1303;lib/AtomicOrbitals
Pkg.test141/141 (zero allocations).🤖 Generated with Claude Code