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

Store shells in Neighbors Trajectory #444

Merged
merged 2 commits into from
Nov 30, 2021
Merged

Store shells in Neighbors Trajectory #444

merged 2 commits into from
Nov 30, 2021

Conversation

pmrv
Copy link
Contributor

@pmrv pmrv commented Nov 26, 2021

I've benchmarked this and it's only marginally slower to also compute the shells additionally (maybe ~5%), so I'm always adding this because I want it for my calculations. If anyone thinks it's too much, I will make it configurable whether shells are included or not.

@pmrv pmrv added the enhancement New feature or request label Nov 26, 2021
@samwaseda
Copy link
Member

shells works only for super perfect structures so I'm not really sure if it ever really plays a role in trajectories

@coveralls
Copy link

coveralls commented Nov 26, 2021

Pull Request Test Coverage Report for Build 1519730291

  • 4 of 6 (66.67%) changed or added relevant lines in 1 file are covered.
  • 39 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.07%) to 69.861%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyiron_atomistics/atomistics/structure/neighbors.py 4 6 66.67%
Files with Coverage Reduction New Missed Lines %
pyiron_atomistics/atomistics/structure/atoms.py 1 74.67%
pyiron_atomistics/lammps/base.py 38 79.7%
Totals Coverage Status
Change from base Build 1507820509: 0.07%
Covered Lines: 11453
Relevant Lines: 16394

💛 - Coveralls

@pmrv
Copy link
Contributor Author

pmrv commented Nov 26, 2021

I'm using NeighborsTrajectory over in pyiron_contrib also for the TrainingContainer so it's a "trajectory" only in the broadest sense. As I said, though I can put it behind an option.

Copy link
Member

@sudarsan-surendralal sudarsan-surendralal left a comment

Choose a reason for hiding this comment

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

Looks good to me!

pyiron_atomistics/atomistics/structure/neighbors.py Outdated Show resolved Hide resolved
@samwaseda
Copy link
Member

I have a totally different suggestion: How about storing only the vectors and indices, and make distances and shells functions? I am badly concerned by the amount of space this class could accidentally take by mistake (since we're talking about n_snapshots x n_neighbors x n_atoms x n_dim and therefore I'm not super eager to extend the space even more.

@pmrv
Copy link
Contributor Author

pmrv commented Nov 29, 2021

I have a totally different suggestion: How about storing only the vectors and indices, and make distances and shells functions? I am badly concerned by the amount of space this class could accidentally take by mistake (since we're talking about n_snapshots x n_neighbors x n_atoms x n_dim and therefore I'm not super eager to extend the space even more.

I see the issue, but at least for my application we're only talking about MB, so I always want to store this information. How about I put in a keyword argument to enable saving the "derived" data and only store vecs + indices as you proposed if it's not given? How easy is it to instantiate Neighbors to recalculate the data without the starting from the structure?

@samwaseda
Copy link
Member

How easy is it to instantiate Neighbors to recalculate the data without the starting from the structure?

I guess this is the real solution that we should aim for, because I have the feeling that it's not Neighbors that's slow, but loading the structures. In situations where the data is so large that calling Neighbors is too costly, it's certainly also imperative to store only the minimum amount of data, meaning most likely only the vectors and the indices.

Realizing all this is unfortunately not quite straightforward in the current format of get_neighbors, which probably I should take on. Since also the user interface will stay the same one way or other, you can also merge this PR as it is right now.

Co-authored-by: Sudarsan Surendralal <surendralal@mpie.de>
@pmrv pmrv merged commit 9e144aa into master Nov 30, 2021
@delete-merged-branch delete-merged-branch bot deleted the moretraj branch November 30, 2021 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants