Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove normalize_orbs_sgrid function #218

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 0 additions & 31 deletions atoMEC/mathtools.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,37 +61,6 @@ def normalize_orbs(eigfuncs_x, xgrid, grid_type):
return eigfuncs_x_norm


def normalize_orbs_sgrid(eigfuncs_x, sgrid):
r"""
Normalize the KS orbitals within the chosen sphere.

Parameters
----------
eigfuncs_x : ndarray
The radial KS eigenfunctions :math:`X_{nl}^{\sigma}(x)`
xgrid : ndarray
The logarithmic grid over which normalization is performed

Returns
-------
eigfuncs_x_norm : ndarray
The radial KS eigenfunctions normalized over the chosen sphere
"""
# initialize the normalized eigenfunctions
eigfuncs_x_norm = eigfuncs_x

# loop over the eigenfunctions
for n in range(np.shape(eigfuncs_x)[0]):
# compute the mod squared eigenvalues
eigfuncs_sq = eigfuncs_x[n].real ** 2 + eigfuncs_x[n].imag ** 2
# compute the intergal ampsq=4*pi*\int_dr r^2 |R(r)|^2
ampsq = int_sphere(eigfuncs_sq, sgrid, "sqrt")
# normalize eigenfunctions
eigfuncs_x_norm[n] = eigfuncs_x[n] / sqrt(ampsq)

return eigfuncs_x_norm


def int_sphere(fx, xgrid, grid_type):
r"""
Compute integral over sphere defined by input grid.
Expand Down