Image spin Image spin


Select specific spins.


select.spin(spin_id=None, boolean=`OR', change_all=False)

Keyword arguments

spin_id: The spin ID string.

boolean: The boolean operator specifying how spins should be selected.

change_all: A flag specifying if all other spins should be changed.


The `change all' flag default is False meaning that all spins currently either selected or deselected will remain that way. Setting this to True will cause all spins not specified by the spin ID string to be selected.

Boolean operators

The boolean operator can be used to change how spin systems or interatomic data containers are selected. The allowed values are: `OR', `NOR', `AND', `NAND', `XOR', `XNOR'. The following table details how the selections will occur for the different boolean operators.

Please see Table 17.1 on page [*].

Prompt examples

To select only glycines and alanines, assuming they have been loaded with the names GLY and ALA, type one of:

relax> select.spin(spin_id=':GLY|:ALA')

To select residue 5 CYS in addition to the currently selected residues, type one of:

relax> select.spin(':5')

relax> select.spin(':5&:CYS')

relax> select.spin(spin_id=':5&:CYS')

The relax user manual (PDF), created 2020-08-26.