-
Notifications
You must be signed in to change notification settings - Fork 868
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
VASP IO copy()
methods
#3602
VASP IO copy()
methods
#3602
Conversation
Depends on how general the copy method is. If it is generic and uses the MSONAble capabilities to do the copy, then it makes sense. |
Just an addendum that when I say "makes sense", it means it makes sense for any MSONable class, not just VASP io related stuff. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might also make sense to turn all VASP IO classes into @dataclasses
so we get __eq__
for free and copy
with minimal variation
as pointed out by @esoteric-ephemera, calling
.copy()
on VASP IO classes likeIncar
andVaspInput
returns a dict rather than a new instance of the class as most users would expect. this PR adds explicitcopy()
methods to minimize user surprise.@esoteric-ephemera that mixin snippet i sent doesn't work as the
__init__
signatures of IO classes are too different. for the record, we considered definingand making all Vasp IO classes inherit from it