Parser of atom selection expressions. Full description of the syntax can be found at the Cuby wiki.

class SelectionParser

GeometrySelections.atomlist_to_string   GeometrySelections.overlap?   atomlist_from_atom_selection_fragment   atomlist_from_reslist   atomlist_from_selection   atomlist_from_simple_selection   atomlist_from_special_selection   atomlist_from_subselection   atomlist_of_element   geometry_from_selection   parse_on_geometry   residuelist_from_residue_selection_fragment   residuelist_of_name  

parse_on_geometry(geometry, string)

module GeometrySelections

The almighty method and one derivative of it

atomlist_from_selection(selection)

Get list of atoms (array of indexes) that match the selection

geometry_from_selection(selection)

Get Geometry object of atoms that match the selection

Reverse: string from atomlist

GeometrySelections.atomlist_to_string(atomlist, first = 1) # => String

Convert atom list (array of indexes) to selection expression in the simple syntax (list of index ranges).

Private methods

atomlist_from_subselection(selection)

Parse elementary selection expression

atomlist_from_simple_selection(selection)

Parse elementary expression in the simple syntax

atomlist_from_atom_selection_fragment(fragment)

return array of indexes of atoms that matches following selections:

atomlist_of_element(element)

return array of indexes of atoms of the specified element

residuelist_from_residue_selection_fragment(fragment)

return array of indexes of residues that matches following selections:

residuelist_of_name(name)

Get list of residue numbers for residues of given name

atomlist_from_reslist(reslist)

Get atom list from list of residue numbers

Special selections

atomlist_from_special_selection(selection)

Special selection functions

Set operations

GeometrySelections.overlap?(atomlist1, atomlist2) # => true/false

Check overlap of two atomlists