- class chemfiles.Selection(selection)¶
Select atoms in a
Framewith 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
Selectionfrom the given
Selectionfor a given
Frame, and return a list of matching atoms, either as a list of index or a list of tuples of indexes.
- property size¶
Get the size of this
The size of a selection is the number of atoms we are selecting together. This value is 1 for the ‘atom’ context, 2 for the ‘pair’ and ‘bond’ context, 3 for the ‘three’ and ‘angles’ contextes and 4 for the ‘four’ and ‘dihedral’ contextes.