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

Fix/vasp energies #190

Merged
merged 2 commits into from
Oct 31, 2023
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
10 changes: 5 additions & 5 deletions src/software/vasp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
tdos_raw[:,n] = parse.(Float64, split(ln))
end
# Create DensityOfStates struct for total DOS
tdos = DensityOfStates(fermi, tdos_raw[1,:], tdos_raw[2,:], tdos_raw[3,:])
tdos = DensityOfStates(fermi*EV2HARTREE, tdos_raw[1,:].*EV2HARTREE, tdos_raw[2,:], tdos_raw[3,:])

Check warning on line 304 in src/software/vasp.jl

View check run for this annotation

Codecov / codecov/patch

src/software/vasp.jl#L304

Added line #L304 was not covered by tests
pdos = Vector{ProjectedDensityOfStates}(undef, nion)
if haspdos
# Loop through all the ions
Expand All @@ -318,7 +318,7 @@
pdos_raw[:,n] = parse.(Float64, split(ln))
end
# Add to the vector
pdos[i] = ProjectedDensityOfStates(fermi, pdos_raw[1,:], pdos_raw[2:end,:])
pdos[i] = ProjectedDensityOfStates(fermi.*EV2HARTREE, pdos_raw[1,:].*EV2HARTREE, pdos_raw[2:end,:])

Check warning on line 321 in src/software/vasp.jl

View check run for this annotation

Codecov / codecov/patch

src/software/vasp.jl#L321

Added line #L321 was not covered by tests
end
else
# Don't return a vector filled with a bunch of undefined objects...
Expand Down Expand Up @@ -389,7 +389,7 @@

# Returns a FatBands struct
return FatBands{3}(
energies,
energies .* EV2HARTREE,
projband,
phase
)
Expand All @@ -406,8 +406,8 @@
function get_fermi(io::IO)
readuntil(io, "E-fermi :")
ln = split(readline(io))
fermi = parse.(Float64, ln[1])
alphabeta = parse.(Float64, strip(ln[5],':'))
fermi = parse.(Float64, ln[1]) .* EV2HARTREE
alphabeta = parse.(Float64, strip(ln[5],':')) .* EV2HARTREE

Check warning on line 410 in src/software/vasp.jl

View check run for this annotation

Codecov / codecov/patch

src/software/vasp.jl#L409-L410

Added lines #L409 - L410 were not covered by tests
return (fermi = fermi, alphabeta = alphabeta)
end

Expand Down
Loading