-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key-based property interface #61
Conversation
eb5cdaa
to
06e226e
Compare
@@ -55,16 +56,15 @@ end | |||
function Atom(id::AtomId, position::AbstractVector, velocity::Missing; kwargs...) | |||
Atom(id, position; kwargs...) | |||
end | |||
function Atom(; atomic_symbol, position, velocity=zeros(length(position))u"bohr/s", kwargs...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this one set the default velocity to zero when the one above sets it to missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well actually the first catches the case where it is equal to missing
and changes that to zero. I can make that more explicit.
In fact in my usage of AtomsBase the missing
values often caused quite some annoyances (like duplicated code paths just to cover for the "missing" case). I'm almost convinced the better option would be to drop the missing idea (and just return zeros instead).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good – I put a few comments (I accidentally did them outside of this "review" so apologies if that muddles anything) raising some very minor things.
Extension of the implementation discussed in #56. Applied on top of the changes made in #58, which should be merged first.
Todos: