Skip to content

Commit

Permalink
add some note about coordinate updating
Browse files Browse the repository at this point in the history
  • Loading branch information
lmiq committed Sep 14, 2023
1 parent 3c82e7f commit b72b042
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/src/PeriodicSystems.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,9 @@ If the `map_pairwise!` function will compute energy and/or forces in a iterative

### Updating coordinates

The coordinates can be updated (mutated, or the array of coordinates can change in size by pushing or deleting particles), simply by directly acessing the `xpositions` field of the system. Let us exemplify the interface with the computation of forces:
The coordinates can be updated (mutated, or the array of coordinates can change in size by pushing or deleting particles), simply by directly acessing the `xpositions` field of the system. The `xpositions` array is a `Vector` of `SVector` (from `StaticArrays`), with coordinates copied from the input array provided. Thus, the coordinates in the `PeriodicSystem` structure must be updated independently of updates in the original array of coordinates.

Let us exemplify the interface with the computation of forces:

```julia-repl
julia> using CellListMap.PeriodicSystems, StaticArrays
Expand Down

2 comments on commit b72b042

@lmiq
Copy link
Member Author

@lmiq lmiq commented on b72b042 Sep 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/91466

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.23 -m "<description of version>" b72b042845f49fde85fb63909cbd8f01572ad88f
git push origin v0.8.23

Please sign in to comment.