Skip to content

Commit

Permalink
Fix leftover SpecialPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
singularitti committed Oct 10, 2023
1 parent 40b89fd commit 97c51c3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/PHonon/input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function Base.tryparse(::Type{QPointsCard}, str::AbstractString)
captured = only(m.captures)
data = map(eachmatch(Q_POINTS_SPECIAL_ITEM_REGEX, captured)) do matched
# TODO: Match `nqs`
ReciprocalPoint(map(x -> fparse(Float64, x), matched.captures))
SpecialPoint(map(x -> fparse(Float64, x), matched.captures))
end
return QPointsCard(data)
end
Expand Down
2 changes: 1 addition & 1 deletion src/PWscf/input.jl
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ function Base.tryparse(::Type{SpecialPointsCard}, str::AbstractString)
return SpecialPointsCard(
map(eachmatch(K_POINTS_SPECIAL_ITEM, m.captures[2])) do matched
# TODO: Match `nks`
ReciprocalPoint(map(x -> fparse(Float64, x), matched.captures)...)
SpecialPoint(map(x -> fparse(Float64, x), matched.captures)...)
end,
option,
)
Expand Down
7 changes: 3 additions & 4 deletions test/PWscf/output.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ using QuantumESPRESSOParser.PWscf
@test parse_ibz(str) == (
KPointsCard(
"tpiba",
SpecialPoint[
[
SpecialPoint([0.0625, 0.0625, 0.0625], 0.0078125),
SpecialPoint([0.0625, 0.0625, 0.1875], 0.0234375),
SpecialPoint([0.0625, 0.0625, 0.3125], 0.0234375),
Expand All @@ -62,9 +62,8 @@ using QuantumESPRESSOParser.PWscf
SpecialPoint([0.0625, 0.0625, 0.8125], 0.0234375),
SpecialPoint([0.0625, 0.0625, 0.9375], 0.0234375),
SpecialPoint([0.0625, 0.1875, 0.1875], 0.0234375),
SpecialPoint([0.0625, 0.1875, 0.3125], 0.046875) SpecialPoint(
[0.3125, 0.3125, 0.3125], 0.0078125
),
SpecialPoint([0.0625, 0.1875, 0.3125], 0.046875)
SpecialPoint([0.3125, 0.3125, 0.3125], 0.0078125),
SpecialPoint([0.3125, 0.3125, 0.4375], 0.0234375),
SpecialPoint([0.3125, 0.3125, 0.5625], 0.0234375),
SpecialPoint([0.3125, 0.3125, 0.6875], 0.0234375),
Expand Down

0 comments on commit 97c51c3

Please sign in to comment.