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

Refactor radial_distribution_between_species() #340

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Nov 14, 2024

This PR follows up on #338 , and makes it easier to access the rdf data. It also re-uses the rdf plotting code.

Hi @stefsmeets thanks a lot!
The only concern is that raw data is not easily accessible now, and it's nice to have such opportunity as sometimes we need to visualize several RDFs at one plot. Can we maybe move _get_radial_distribution_between_species function as a Trajectory function?

Originally posted by @AstyLavrinenko in #338 (comment)

Intended usage:

rdf = trajectory.radial_distribution_between_species(specie_1=..., specie_2=...)
rdf.plot()

# data is accessible via
rdf.x
rdf.y

@stefsmeets stefsmeets changed the title Refactor radial_distribution_between_species() Refactor radial_distribution_between_species() Nov 14, 2024
@stefsmeets stefsmeets marked this pull request as ready for review November 14, 2024 14:00
@stefsmeets stefsmeets merged commit c1888d8 into main Nov 14, 2024
3 of 4 checks passed
@stefsmeets stefsmeets deleted the rdf-species-patch branch November 14, 2024 14:31
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.

1 participant