You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just noticed that if you initialize the coordinates of your system with a Vector{Vector} instead of a Vector{SVector} you get an issue in the forces function specifically line 163 of forces.jl in the zero 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 but zero([SVector(1,2,3), SVector(3,2,3)] is valid
Either 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.
The text was updated successfully, but these errors were encountered:
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.
ejmeitz
added a commit
to ejmeitz/Molly.jl
that referenced
this issue
Feb 10, 2024
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.The text was updated successfully, but these errors were encountered: