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

add_atom/remove_atom functions, example with mutability? #51

Open
rkurchin opened this issue Aug 4, 2022 · 2 comments
Open

add_atom/remove_atom functions, example with mutability? #51

rkurchin opened this issue Aug 4, 2022 · 2 comments

Comments

@rkurchin
Copy link
Collaborator

rkurchin commented Aug 4, 2022

Nothing should stop someone from having a subtype of AbstractSystem that's mutable, and it could be useful for setting up geometries for simulations, especially if they're rather large and the overhead of rebuilding a copy with one atom added/removed could be large.

I was thinking a few related things:

  1. It would be nice to have an example (see Library of examples #50) for using AtomsBase for building geometries for, e.g., MD or DFT simulations.
  2. For that purpose, having functions like add_atom and remove_atom that just return a copy of the system with an atom added/removed, would be useful. Or, if we make an example subtype of AbstractSystem that's actually itself mutable, we could also have add_atom! and remove_atom!, which could be nice for a larger system where the overhead of making the copy might be large.
  3. This would also serve as another example of how easy interoperability is, since you'd presumably want to convert back to some immutable and package-specific system type to run your actual calculation.

I'm happy to mock up a basic version of this, but thought I'd open an issue for discussion in case people had other thoughts about it.

My main question is, do add_atom/remove_atom belong in AtomsBase itself, or should they (like, e.g. visualization-related functionality that's being worked on in Sclera) rather live in a separate package that people can depend on if they need it?

@cortner
Copy link
Member

cortner commented May 18, 2024

could this go into AtomsBuilder

@rkurchin
Copy link
Collaborator Author

Yes!

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

No branches or pull requests

2 participants