Selection class¶
- class chemfiles.Selection(selection)¶
Select atoms in a
Frame
with a selection language.The selection language is built by combining basic operations. Each basic operation follows the
<selector>[(<variable>)] <operator> <value>
structure, where<operator>
is a comparison operator in== != < <= > >=
. Refer to the full documentation to know the allowed selectors and how to use them.Create a new
Selection
from the givenselection
string.- evaluate(frame)¶
Evaluate a
Selection
for a givenFrame
, and return a list of matching atoms, either as a list of index or a list of tuples of indexes.