Skip to content

Add custom basis #49

Description

@ohno

Please add a basis function that holds the function like the custom term of hamiltonian:

Base.@kwdef struct Custom <: PotentialTerm
f::Function
end

The function element(o::Custom, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis) can be reused.

function element(o::Custom, SGB1::SimpleGaussianBasis, SGB2::SimpleGaussianBasis)
value, _ = QuadGK.quadgk(
r -> 4π * r^2 * φ(SGB1, r) * V(o, r) * φ(SGB2, r),
0.0,
Inf,
rtol=1e-10,
atol=1e-12,
)
return value
end

One suggested name is CustomBasis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions