Skip to content
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

velocity(s::Atoms) throws an error if velocities are not defined #25

Merged
merged 3 commits into from
Oct 9, 2022

Conversation

KaiLiersch
Copy link
Contributor

Hello,
I changed velocity(s::Atoms), velocity(s::Atoms, i) to return missing, if the velocities are not defined.
Additionally s.atom_data.velocity[i] should be s.atom_data.velocities[i]
Currently, there is no porper way for AtomsBase users to ckeck if a system has velocities, excpet if the velocities are either 0 or missing and AtomsBases FastSystem uses missing for that. The documentation https://juliamolsim.github.io/AtomsBase.jl/stable/apireference/#AtomsBase.velocity even explictitly allows missing as a return value.

and velocity(a:AtomView) now return missing instead of throwing an error
if no velocities a specified for a system
@jameskermode
Copy link
Member

Looks good, thank you. I will merge providing CI passes.

@jameskermode jameskermode merged commit ad481cf into libAtoms:master Oct 9, 2022
@jameskermode
Copy link
Member

v0.1.8 now tagged in General registry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants