@@ -17,21 +17,6 @@ function update_positions(system, positions::AbstractVector{<:AbstractVector{<:U
1717 AbstractSystem (system; particles)
1818end
1919
20- @doc raw """
21- Creates a new system based on ``system`` but with atoms positions and lattice
22- vectors updated to the ones provided.
23- New generalized coordinates should be provided in a ComponentArray with
24- component `atoms` and `bounding_box`, containing new atomic positions
25- and lattice vectors respectively.
26-
27- """
28- function update_positions (system, positions:: ComponentVector )
29- # Collect are needed with ComponentArrays to get concrete types.
30- particles = [Atom (atom; position) for (atom, position)
31- in zip (system, collect .(positions. atoms))]
32- AbstractSystem (system; particles, bounding_box= collect .(positions. bounding_box))
33- end
34-
3520@doc raw """
3621Creates a new system based on ``system`` where the non clamped positions are
3722updated to the ones provided (in the order in which they appear in the system).
@@ -44,25 +29,6 @@ function update_not_clamped_positions(system, positions::AbstractVector{<:Unitfu
4429 update_positions (system, new_positions)
4530end
4631
47- @doc raw """
48- Creates a new system based on ``system`` where the non clamped positions and
49- lattice vectors are updated to the ones provided.
50- Note that the `atoms`component of `positions` should be a vector of
51- coordinates.
52-
53- """
54- function update_not_clamped_positions (system, positions:: ComponentVector )
55- mask = not_clamped_mask (system)
56- new_positions = deepcopy (position (system))
57- atoms_positions = collect (positions. atoms)
58- new_positions[mask] = reinterpret (reshape, SVector{3 , eltype (atoms_positions)},
59- reshape (atoms_positions, 3 , :))
60- update_positions (system,
61- ComponentVector (atoms= new_positions,
62- bounding_box= collect .(positions. bounding_box))
63- )
64- end
65-
6632@doc raw """
6733Returns a mask for selecting the not clamped atoms in the system.
6834
0 commit comments