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

Save particle state in a dict #4060

Merged
merged 3 commits into from
Dec 21, 2020
Merged

Save particle state in a dict #4060

merged 3 commits into from
Dec 21, 2020

Conversation

mili1247
Copy link
Contributor

@mili1247 mili1247 commented Dec 18, 2020

Fixes #3916

Add functions: ParticleHandle.to_dict() and ParticleSlice.to_dict()

Description of changes:
Returns the particles attributes as a dictionary, such that it can be used to save the particle data and recover it by using

p = system.part.add(...)
particle_dict = p.to_dict()
system.part.add(particle_dict)

Codes are mainly written by @RiccardoFrenner

@mili1247 mili1247 closed this Dec 18, 2020
@mili1247 mili1247 reopened this Dec 18, 2020
@mili1247 mili1247 closed this Dec 18, 2020
@mili1247 mili1247 reopened this Dec 18, 2020
@jngrad
Copy link
Member

jngrad commented Dec 18, 2020

@mili1247 do you have time now to discuss on Mattermost?

@mili1247 mili1247 marked this pull request as draft December 18, 2020 16:27
@mili1247 mili1247 marked this pull request as ready for review December 21, 2020 10:17
@mili1247 mili1247 marked this pull request as draft December 21, 2020 10:17
@mili1247 mili1247 force-pushed the python branch 3 times, most recently from 244af09 to c13b23a Compare December 21, 2020 10:40
@mili1247 mili1247 marked this pull request as ready for review December 21, 2020 10:53
@mili1247 mili1247 marked this pull request as draft December 21, 2020 10:58
mili1247 and others added 2 commits December 21, 2020 13:00
@mili1247 mili1247 marked this pull request as ready for review December 21, 2020 12:06
@espressomd espressomd deleted a comment from espresso-ci Dec 21, 2020
@jngrad jngrad added this to the Espresso 4.2 milestone Dec 21, 2020
Copy link
Member

@jngrad jngrad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good, thanks!

@jngrad jngrad added the automerge Merge with kodiak label Dec 21, 2020
@kodiakhq kodiakhq bot merged commit 1af4d1c into espressomd:python Dec 21, 2020
@mili1247
Copy link
Contributor Author

look good, thanks!

Thanks for your instruction!

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

Successfully merging this pull request may close these issues.

Need a way to save particle state in a dict
2 participants