Skip to content
Open
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
7 changes: 4 additions & 3 deletions abipy/ppcodes/oncv_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,11 @@ def densities(self) -> dict[str, RadialFunction]:
# !r 0.0100642 4.7238866 53.4149287 0.0000000
rho_data = self._grep("!r").data

# Note: all charges in ONCVPSP outputs do not include r^2 coefficients.
return dict(
rhoV=RadialFunction("Valence charge", rho_data[:, 0], rho_data[:, 1]),
rhoC=RadialFunction("Core charge", rho_data[:, 0], rho_data[:, 2]),
rhoM=RadialFunction("Model charge", rho_data[:, 0], rho_data[:, 3])
rhoV=RadialFunction("Valence charge", rho_data[:, 0], rho_data[:, 1]*rho_data[:, 0]**2),
rhoC=RadialFunction("Core charge", rho_data[:, 0], rho_data[:, 2]*rho_data[:, 0]**2),
rhoM=RadialFunction("Model charge", rho_data[:, 0], rho_data[:, 3]*rho_data[:, 0]**2)
)

@cached_property
Expand Down
Loading