-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PseudoPotentialFamily
: allow support of multiple pseudo formats
Originally, each pseudopotential family could only specify a single supported pseudopotential type, meaning a single subclass of the `PseudoPotentialData` base class. However, this policy forced one to create a new family subclass for each pseudopotential type that one might want to create a family off. Semantically, this does not even make sense, because the pseudopotential types are merely describing the file format with which the pseudopotential is written to file. In principle, any pseudo could be transformed from any format to any other format. A family with a certain set of pseudopotentials in format A, could be represented by the same pseudos but then in format B, without changing the informational content. Forcing a different pseudo family class to be used is nonsensical and unpractical. The `PseudoPotentialFamily` class is updated such that the `_pseudo_type` class attribute is renamed to `_pseudo_types` and now takes a tuple of `PseudoPotentialData` subclasses. An instance of a family can be created where the pseudopotentials are in any one of these formats. Note that a family class can support multiple pseudopotential types, but any one instance can only host pseudopotentials of a single type.
- Loading branch information
Showing
6 changed files
with
135 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.