CHFL_SELECTION
ΒΆchfl_selection
(const char * selection)Create a new selection from the given selection string.
chfl_selection_size
(const CHFL_SELECTION * selection, size_t * size)Get the size of the selection, i.e. 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.
selection
- The selection
size
- The size of the selection
chfl_selection_evalutate
(CHFL_SELECTION * selection, const CHFL_FRAME * frame, size_t * n_matches)Evaluate a selection for a given frame.
Use the chfl_selection_get
function to get the matches for this selection.
selection
- The selection
frame
- The frame
n_matches
- The number of matches for the selection
chfl_selection_matches
(const CHFL_SELECTION * selection, chfl_match_t matches[], size_t n_matches)Get the matches for a selection after a call to chfl_selection_evalutate
selection
- the selection
matches
- a pre-allocated array of size (number of matches)
n_matches
- the number of matches, as indicated by chfl_selection_evaluate
chfl_selection_free
(CHFL_SELECTION * selection)Destroy a selection, and free the associated memory.
selection
- The selection to destroy
chfl_match_t
A match from a selection evaluation.
A match is a set of atomic indexes matching a given selection. The size of a match depends on the associated selection, and can vary from 1 to 4.
Public Members
size
The actual size of the match. Elements in matches
are significant up to this value, and filled with (size_t)-1
for all the other values.
atoms
[CHFL_MAX_SELECTION_SIZE]Indexes matching the associated selection.
Maximal size for a selection match.