chemfiles / Chemfiles.jl

Julia bindings to chemfiles

Home Page:http://chemfiles.org/Chemfiles.jl/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make `Frame` indexable

rashidrafeek opened this issue · comments

I saw from the docs of the C++ interface that Frame objects can be indexed to get atoms from the frame. But this is not implemented here. This will be very useful to have here also. If you think this is good, I'll send a PR for this.

I think the frame is not indexable because before version 0.9 the functions to get atom/residue/topology were making copies, and so code like set_mass!(frame[0], 3.3) would only modify a copy, which is very surprising to users.

Now these functions return a reference counted pointer inside the main frame, so everything should work fine, and making a frame indexable sounds good!