CellListMap.jl
CellListMap.jl copied to clipboard
Make the high-level interface more flexible
we strongly encourage the use of the
PeriodicSystems
interface
From the docs, it seems that the high-level PeriodicSystems
interface is supposed to be used for most purposes.
However, it neither supports non-periodic boxes nor coordinate matrices.
The underlying low-level interface supports both of these, so this is just due to too strict type requirements in the PeriodicSystems
interface:
-
unitcell
must be an abstract vector or matrix and can't be aLimits
, even though it's supported byBox
. -
xpositions
must be a vector of vectors, even though theCellList
supports matrices as well.
In version 0.8.23 the PeriodicySystems
interface accepts any AbstractVector{<:AbstractVector}
as input coordinates, so at least one can reinterpret(reshape, SVector{3,Float64}, m::Matrix)
, for example, and use matrices as inputs, indirectly.
I will work on generalizing the interface for matrices and check the limitations of the unitcell as well at some point, to make the interface as flexible as the low level one.
On version 0.8.28 matrices are supported as input coordinates in the PeriodicSystems
interface. Note that matrices cannot be resized, so the number of particles cannot change when using this.
Missing still the support for non-periodic systems.
Non-periodic systems will be supported in the high-level interface in v0.8.30 by simply not providing a unitcell
, or setting unitcell = nothing
.
Because of this feature and other code rearrangements, probably I will be settling the interface to be ParticleSystem
instead of the now somewhat misnomer PeriodicSystem
, for a nearby 1.0 release.
Also the necessity of loading the PeriodicSystems
submodule was removed, now using CellListMap
provides access to all the functionality. The submodule was kept for now for backward compatibility of the 0.8
series, with a warning.