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

DummyReader should be convertable to a MemoryReader #2077

Closed
kain88-de opened this issue Sep 18, 2018 · 3 comments
Closed

DummyReader should be convertable to a MemoryReader #2077

kain88-de opened this issue Sep 18, 2018 · 3 comments

Comments

@kain88-de
Copy link
Member

Is your feature request related to a problem? Please describe.

I would like to create a dummy universe with a trajectory attached. I can create the dummy universe. I do not know how I load a numpy array as a trajectory into it.

This would work nicely as a feature with our new trajectory writer shortcut.

Describe the solution you'd like

u = mda.Universe.empty(2, trajectory=True)
# shape is (n_frames, n_atoms, 3)
u.trajectory.add_coordinates(np.ones((100, 2, 3))

Describe alternatives you've considered
I could load a file from the test trajectories.

@orbeckst
Copy link
Member

Can you do a u.transfer_to_memory()?

@kain88-de
Copy link
Member Author

kain88-de commented Sep 18, 2018 via email

@richardjgowers richardjgowers self-assigned this Sep 18, 2018
@richardjgowers
Copy link
Member

Related to #2076 we should just nuke dummyreader and replace with memory

richardjgowers added a commit that referenced this issue Oct 1, 2018
Universe.empty now creates a MemoryReader trajectory

Removed DummyReader (it was buggy)

added varying box size to MemoryReader

Universe.transfer_to_memory now also transfer velocities and forces

MemoryReader now always has array of dimensions

fixes Issue #2081 #2076 #2077 #1041
richardjgowers added a commit that referenced this issue Oct 9, 2018
Universe.empty now creates a MemoryReader trajectory

Removed DummyReader (it was buggy)

added varying box size to MemoryReader

Universe.transfer_to_memory now also transfer velocities and forces

MemoryReader now always has array of dimensions

fixes Issue #2081 #2076 #2077 #1041
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants