ACEsuit / ACE.jl

Parameterisation of Equivariant Properties of Particle Systems
66 stars 15 forks source link

Access Product 1p Basis Components #73

Closed cortner closed 2 years ago

cortner commented 2 years ago

Implement an interface how to access the 1p basis components via a symbol. E.g.

Rn = B1p[:Rn] 
Ylm = B1p[:Ylm] 
cortner commented 2 years ago

follow-up : extract properties from those basis functions? cutoff radius r-distribution, etc.?

cortner commented 2 years ago

@davkovacs I think you asked about this at some point ...

julia> Rn = Rn1pBasis(J; label = "Rn")
Rn1pBasis{rr, n}(OrthPolyBasis(pl = 2, tl = 0.5, pr = 0, tr = 2.0, ...), PolyTransform{Int64, Float64}(1, 1.0), Rn)

julia> Ylm = Ylm1pBasis(maxdeg; label = "Ylm")
Ylm1pBasis{rr, l, m}(5, "Ylm")

julia> B1p = Product1pBasis( (Rn, Ylm) )
Product1pBasis(Rn1pBasis{rr, n}(OrthPolyBasis(pl = 2, tl = 0.5, pr = 0, tr = 2.0, ...), PolyTransform{Int64, Float64}(1, 1.0), Rn), Ylm1pBasis{rr, l, m}(5, "Ylm"))

julia> B1p["Ylm"]
Ylm1pBasis{rr, l, m}(5, "Ylm")

julia> B1p["Ylm"] == Ylm
true
cortner commented 2 years ago

this is now merged, and tagged as 0.12.28

cortner commented 2 years ago

Please follow the models in ACE.jl if you want to implement a label for a 1p basis outside ACE.jl

davkovacs commented 2 years ago

Thanks, that looks great! @JPDarby I think we talked about this.