ACEsuit / ACE.jl

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

Correct implementation of `filter` and `coco_init` for types `EuclideanVector` and `EuclideanMatrix` #100

Open MatthiasSachs opened 2 years ago

MatthiasSachs commented 2 years ago

Currently, the code for both EuclideanVector and EuclideanMatrix treats the zero-correlation and the 1-correlation case by if-clauses, respectively, e.g.,

function filter(φ::EuclideanMatrix, grp::O3, bb::Array)
   if length(bb) == 0  # no zero-correlations allowed 
      return false 
   end
   if length(bb) == 1 #MS: this line could be removed, I think...
      return true
   end

Can we remove either or both of these if-clauses?

How would we correctly implement coco_init(::EuclideanMatrix{CT}) and coco_init(::EuclideanVector{CT}), e.g.,

coco_init(::EuclideanMatrix{CT}) where {CT<:Real} = [EuclideanMatrix(SMatrix{3,3,Complex{CT},9}([1.0,0,0,0,1.0,0,0,0,1.0]))]  

? Are these actually needed?

cortner commented 2 years ago

hm - the zero-correlations clause is odd since we implement zero-correlations explicitly elsewhere.

cortner commented 2 years ago

Should we celebrate Issue #100 :)

MatthiasSachs commented 2 years ago

If celebrating it means ignoring it for now, I am all in...^^