Closed ejmeitz closed 4 months ago
I think it's fair to assume that the coordinates are some array of SVector
s or a similar bits type. There is a big performance hit otherwise.
Makes sense. I'd like to add an error message about this though as the current error/crash is super unintuitive and I think its a pretty easy mistake to make. Will make a PR at some point.
Just noticed that if you initialize the coordinates of your system with a
Vector{Vector}
instead of aVector{SVector}
you get an issue in the forces function specifically line 163 of forces.jl in thezero
function. It probably pops up elsewhere also. The heart of the problem is for some reason:zero([[1,2,3],[2,3,4])
is not valid butzero([SVector(1,2,3), SVector(3,2,3)]
is validEither we force the input to be a Vector of SVector or find a work around for the forces. I think that line is just trying to make a matrix the same shape as coords.
similar
might do the trick.