Core
SelectionExpression
¶
Bases: ABC
Abstract base class for all selection criteria and logical operations.
This class defines the interface for expressions that can be evaluated
to produce a boolean mask for atoms within an Ensemble microstate.
It also provides dunder methods for convenient logical operations
(AND, OR, NOT) using Python's &, |, and ~ operators.
evaluate(ensemble, run_id=None, micro_id=None)
¶
Evaluates this expression for specified microstates.
This method generates an atom-level boolean mask for each requested microstate. The mask indicates which atoms meet the criteria defined by the expression.
| PARAMETER | DESCRIPTION |
|---|---|
|
The
TYPE:
|
|
The ID of the specific run within the ensemble to evaluate.
If
TYPE:
|
|
Specifies the microstate IDs for which to evaluate the expression.
If
TYPE:
|
| YIELDS | DESCRIPTION |
|---|---|
NDArray[bool_]
|
A 1D boolean NumPy array ( |