Selections in MODELLER behave almost identically to standard Python sets - see the section in the Python manual on sets for further information. Selections are ‘sets’ in the mathematical sense, and as such can be combined with each other in unions (using the Python union function, or the | operator) or intersections (using the intersection function, or the & operator), etc.
All of the atoms in a selection must belong to the same Model object. Note that the selection is not a copy of the model atoms; if model atoms are changed, the atoms will also be moved in any selection that contains those atoms, and vice versa.
To add objects to a selection, you can list them when you create the selection with the Selection() constructor, add them to an existing selection with Selection.add(), or combine selections with set operations (see above).
See Model.atoms, Sequence.residues, Sequence.chains, Model.atom_range(), Model.residue_range(), Model.get_insertions(), Model.get_deletions(), and Model.loops() for valid objects (groups of atoms) to add to the selection. You can also add Model objects and existing Selection objects to a selection. (Adding a residue adds all atoms in that residue to the selection, adding a model adds all atoms in the model, and so on.)
See also Point.select_sphere(), which creates a new Selection object.
Once you have a selection, it can be manipulated by standard Python set operations (above), by methods to add new atoms (Selection.by_residue(), Selection.select_sphere()), or by methods to exclude atom or residue types (Selection.only_sidechain(), Selection.only_mainchain(), Selection.only_atom_types(), Selection.only_residue_types(), Selection.only_std_residues(), Selection.only_no_topology(), Selection.only_het_residues(), Selection.only_water_residues(), Selection.only_defined()).