Next: Running modes
Up: Group selection
Previous: selection from the loaded
  Contents
To perform a group selection from an expression string, you have to click on the from an expression string
radiobutton. A dialog will be displayed in the underneath frame from which you will enter a valid Python expression
that must declare the selection variable as nested lists of atoms of the loaded universe. The variable
self.universe will be used as a reference for that universe (see Fig. 4.33).
Figure 4.33:
The group selection dialog for a selection from an expression string.
|
Here are some examples of valid expression strings that can be entered:
- selection = self.universe.objectList[0].atomList(): will pack all the atoms of the first object of the universe in one group,
- selection = [o.atomList()[0:10] for o in self.universe.objectList()]: will create a distinct group for each
object of the universe with its ten first atoms.
Once an expression string has been entered press Return to register it. The constructed selection string that will
be used by nMOLDYN for this kind of selection will be displayed in the Selection preview entry at the bottom of
the dialog with highlighted keywords.
Next: Running modes
Up: Group selection
Previous: selection from the loaded
  Contents
pellegrini eric
2009-10-06