libAtoms / ExtXYZ.jl

Extended XYZ read/write support for Julia
MIT License
13 stars 6 forks source link

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

Closed KaiLiersch closed 2 years ago

KaiLiersch commented 2 years ago

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.

jameskermode commented 2 years ago

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

jameskermode commented 2 years ago

v0.1.8 now tagged in General registry