Skip to content

Commit

Permalink
Removed type restriction on update position to allow for duals.
Browse files Browse the repository at this point in the history
  • Loading branch information
CedricTravelletti committed Mar 6, 2024
1 parent d54dad3 commit 1ca205b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/atomsbase_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Creates a new system based on ``system`` but with atoms positions updated
to the ones provided. Can also update lattice vectors if `bounding_box` is provided.
"""
function update_positions(system, positions::AbstractVector{<:AbstractVector{<:Unitful.Length}};
function update_positions(system, positions;
bounding_box=bounding_box(system))
particles = [Atom(atom; position) for (atom, position) in zip(system, positions)]
AbstractSystem(system; particles, bounding_box)
Expand Down Expand Up @@ -46,7 +46,7 @@ end
Creates a new system based on ``system`` where the non clamped positions are
updated to the ones provided (in the order in which they appear in the system).
"""
function update_not_clamped_positions(system, positions::AbstractVector{<:Unitful.Length})
function update_not_clamped_positions(system, positions)
mask = not_clamped_mask(system)
new_positions = deepcopy(position(system))
new_positions[mask] = eachcol(reshape(positions, 3, :))
Expand Down

0 comments on commit 1ca205b

Please # to comment.