Skip to content

Commit

Permalink
Add scaled_position for AtomView
Browse files Browse the repository at this point in the history
  • Loading branch information
rashidrafeek committed Dec 7, 2024
1 parent a429789 commit b2866c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/AtomsToolbox.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using AtomsBase: AbstractSystem,
FastSystem,
FlexibleSystem,
Atom,
AtomView,
position,
atomic_number,
atomic_symbol,
Expand Down
2 changes: 1 addition & 1 deletion src/getters.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ function scaled_position(sys::AbstractSystem)
Vector.(eachrow(frpos))
end
scaled_position(sys::AbstractSystem, index) = scaled_position(sys[index], cell_matrix(sys))
function scaled_position(atom::Atom, cellmat)
function scaled_position(atom::Union{Atom,AtomView}, cellmat)
frpos = position(atom)' * inv(cellmat')

frpos'
Expand Down

0 comments on commit b2866c4

Please sign in to comment.