Skip to content

Commit

Permalink
Some fixes for bulk
Browse files Browse the repository at this point in the history
Not yet tested.
  • Loading branch information
mfherbst authored Nov 21, 2024
1 parent 2c18c1b commit 9733537
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/bulk.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,21 @@ specify the kwargs `a` or `c` to determine the lattice constants.
"""
function bulk(sym::Symbol; T=Float64, cubic = false, pbc = (true,true,true),
a=nothing, c=nothing) # , x=nothing, y=nothing, z=nothing)
symm = Chemistry.symmetry(sym)
symm = try
Chemistry.symmetry(sym)
catch e
if e isa KeyError
throw(ArgumentError("No symmetry information known for element $sym"))
else
rethrow()
end
end
if symm in _simple_structures
X, C = _simple_bulk(sym, cubic; a=a)
elseif symm == :hcp
X, C = _bulk_hcp(sym; a=a, c=c) # cubic parameter is irrelevant for hcp
else
throw(ArgumentError("Currently bulk not immplemented for symmetry $symm"))
end
m = Chemistry.atomic_mass(sym)
Z = Chemistry.atomic_number(sym)
Expand Down

0 comments on commit 9733537

Please sign in to comment.