AFLOW Database Keywords¶
The AFLOW database supports a fixed number of keywords related to
the calculated physical properties. The generators create a
sub-classed Keyword
object that supports
logical operations supported by the AFLUX standard.
Note
Because of the way the operators are overloaded, each comparison needs to be placed in its own set of parenthesis to ensure that the order of operators is respected correctly. See Example Queries with aflow.
The Keyword
class provides the following
operators:
- > and < behave as expected. However, these are overloaded for string comparisons in the spirit of the AFLUX endpoint. For example author < “curtarolo” will match *curtarolo and author > “curtarolo” will match `curtarolo*.
- == behaves as expected for all keywords.
- % allows for string searches. author % “curtarolo” matches *curtarolo*.
- ~ inverts the filter (equivalent to a boolean not).
- & is the logical and between two conditions.
- | is the logical or between two conditions.
API Documentation¶
Implements classes to represent each keyword with overloaded operators to make querying with AFLUX intuitive.
-
class
aflow.keywords.
Keyword
(state=None)[source]¶ Represents an abstract keyword that can be sub-classed for a specific material attribute. This class also represents logical operators that define search queries. The combination of two keywords with a logical operator produces one more keyword, but which has its
state
altered.Parameters: state (str) – current query state of this keyword (combination). -
state
¶ list – of str composite queries for this keyword (combination).
-
ptype
¶ type – python type that values for this keyword will have.
-
name
¶ str – keyword name to use in the AFLUX request.
-
cache
¶ list – of str simple operator comparisons.
-
classes
¶ set – of str keyword names that have been combined into the current keyword.
-