@@ -203,7 +203,7 @@ julia> init_list(x, i -> (i-1)÷2 + 1)
203203
204204```
205205
206- The above annonymous function `i -> (i-1)÷2 + 1` is equivalent to `i -> mol_indices(i,2)`,
206+ The above anonymous function `i -> (i-1)÷2 + 1` is equivalent to `i -> mol_indices(i,2)`,
207207and can be generalized if the the number of atoms of each molecule is not the same.
208208
209209=#
@@ -229,7 +229,7 @@ init_list(::Type{T}, n::Integer) where {T} = fill(zero(MinimumDistance{T}), n)
229229# Note that we have two types of output variables here: List, and a tuple of List.
230230# The List is simply an array of `MinimumDistance{T}`, and we have defined above
231231# `copy` and `zero` methods for this type, such that we only need to define
232- # that reseting this variable consists of returing its zero, and set up the reducer.
232+ # that resetting this variable consists of returning its zero, and set up the reducer.
233233# The methods for abstract arrays will take care of the rest.
234234#
235235# For the Tuple of lists, we need to be more explicit, and define appropriate copy_output,
261261Function that computes the minimum distances for an initialized system,
262262of `SelfPairs`, `CrossPairs`, or `AllPairs` types.
263263
264- The function returs a `Vector{MinimumDistance}` cor `SelfPairs` and `CrossPairs`
264+ The function returns a `Vector{MinimumDistance}` cor `SelfPairs` and `CrossPairs`
265265inputs, and a Tuple of two of such vectors for the `AllPairs` input types.
266266
267267This function is used as an advanced alternative from preallocated system inputs. Only a few allocations
@@ -477,24 +477,12 @@ abstract type SystemPairs end
477477
478478import Base: getproperty, propertynames
479479getproperty (sys:: SystemPairs , s:: Symbol ) = getproperty (sys, Val (s))
480+ getproperty (sys:: SystemPairs , :: Val{:minimum_distances} ) = sys. system. output
480481getproperty (sys:: SystemPairs , :: Val{:system} ) = getfield (sys, :system )
481482getproperty (sys:: SystemPairs , :: Val{:mol_indices} ) = getfield (sys, :mol_indices )
482483getproperty (sys:: SystemPairs , :: Val{:xmol_indices} ) = getfield (sys, :xmol_indices )
483484getproperty (sys:: SystemPairs , :: Val{:ymol_indices} ) = getfield (sys, :ymol_indices )
484- getproperty (sys:: SystemPairs , :: Val{:minimum_distances} ) = sys. system. output
485- getproperty (sys:: SystemPairs , :: Val{:xpositions} ) = sys. system. xpositions
486- getproperty (sys:: SystemPairs , :: Val{:ypositions} ) = sys. system. ypositions
487- getproperty (sys:: SystemPairs , :: Val{:cutoff} ) = sys. system. cutoff
488- getproperty (sys:: SystemPairs , :: Val{:unitcell} ) = sys. system. unitcell
489- getproperty (sys:: SystemPairs , :: Val{:parallel} ) = sys. system. parallel
490- propertynames (sys:: SystemPairs , private:: Bool ) =
491- (:system , :mol_indices , :minimum_distances , :xpositions , :ypositions , :unitcell , :cutoff )
492-
493- import Base: setproperty!
494- setproperty! (sys:: SystemPairs , s:: Symbol , value) = setproperty! (sys, Val (s), value)
495- setproperty! (sys:: SystemPairs , :: Val{:cutoff} , cutoff) = update! (sys. system; cutoff= cutoff)
496- setproperty! (sys:: SystemPairs , :: Val{:unitcell} , unitcell) = update! (sys. system; unitcell= unitcell)
497- setproperty! (sys:: SystemPairs , :: Val{:parallel} , parallel) = sys. system. parallel = parallel
485+ propertynames (sys:: SystemPairs , private:: Bool ) = (:system , :minimum_distances )
498486
499487#
500488# Functions for when the lists of minimum-distances is that of a single
0 commit comments