From fee1e4ccd8949c556fd28ab167866953b5280282 Mon Sep 17 00:00:00 2001 From: singularitti Date: Sun, 24 Sep 2023 21:08:39 -0400 Subject: [PATCH] Rename `CrystalCoordinates` to `CrystalCoordinates`, but keep an alias --- src/cell.jl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cell.jl b/src/cell.jl index 4f69d11..14aa300 100644 --- a/src/cell.jl +++ b/src/cell.jl @@ -3,16 +3,17 @@ using StructEquality: @struct_hash_equal_isequal export Cell, natoms, atomtypes -struct CrystalCoordinates{T} <: FieldVector{3,T} +struct ReducedCoordinates{T} <: FieldVector{3,T} x::T y::T z::T end +const CrystalCoordinates = ReducedCoordinates abstract type AbstractCell end @struct_hash_equal_isequal struct Cell{N,L,P,T} <: AbstractCell lattice::Lattice{L} - positions::SVector{N,CrystalCoordinates{P}} + positions::SVector{N,ReducedCoordinates{P}} atoms::SVector{N,T} end """ @@ -36,7 +37,7 @@ function Cell(lattice, positions, atoms) end N = length(positions) P = reduce(promote_type, eltype.(positions)) - positions = map(CrystalCoordinates{P}, positions) + positions = map(ReducedCoordinates{P}, positions) L, T = eltype(lattice), eltype(atoms) return Cell{N,L,P,T}(lattice, positions, atoms) end