ACEsuit / ACE.jl

Parameterisation of Equivariant Properties of Particle Systems
65 stars 15 forks source link

Should States and Properties be StaticArrays? #25

Closed cortner closed 3 years ago

cortner commented 3 years ago

CC @zhanglw0521 @MatthiasSachs

What if we created the following type hierarchy:

abstract type Property{...} <: StaticArray{...} end 

struct MyProp1 <: Property
val ...
end

struct MyProp2 <: Property
val ...
end

then we have the advantage that we can leverage all of StaticArrays.jl to do arithmetic on these properties.

See also this part of the documentation

One reason I started thinking about this is I am hoping that this might help with derivatives - taking derivatives increases the dimensionality. How best to handle this? Should we take vectors of properties, or should we create a higher-dimensional array?

cortner commented 3 years ago

States and properties seem to have a sensible working interface now.