Difference between revisions of "Spin ID strings"

From relax wiki
Jump to navigation Jump to search
m (added Category:Relax using HotCat)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
The spin ID strings are used to identify molecules, residues, and atoms/spin systems in the relax data store.
 +
 
== See manual ==
 
== See manual ==
 
4.2.2 Molecule, residue, and spin containers
 
4.2.2 Molecule, residue, and spin containers
Line 18: Line 20:
 
Regular expression can, in some instances, be used to select spins. For example the string
 
Regular expression can, in some instances, be used to select spins. For example the string
 
'''@H*''' will select the protons ‘H’, ‘H2’ and ‘H98’.
 
'''@H*''' will select the protons ‘H’, ‘H2’ and ‘H98’.
 +
 +
== See current spins ==
 +
<source lang="python">
 +
from pipe_control.mol_res_spin import spin_loop
 +
 +
for curspin, mol_name, res_num, res_name, spin_id in spin_loop(full_info=True, return_id=True, skip_desel=True):
 +
    print curspin.name, curspin.isotope, mol_name, res_num, res_name, spin_id
 +
 +
N 15N None 5 I :5@N
 +
N 15N None 6 S :6@N
 +
N 15N None 8 S :8@N
 +
N 15N None 9 A :9@N
 +
N 15N None 10 L :10@N
 +
N 15N None 11 Q :11@N
 +
N 15N None 12 D :12@N
 +
N 15N None 13 L :13@N
 +
N 15N None 14 L :14@N
 +
N 15N None 15 R :15@N
 +
N 15N None 16 T :16@N
 +
N 15N None 17 L :17@N
 +
N 15N None 18 K :18@N
 +
N 15N None 19 S :19@N
 +
N 15N None 21 S :21@N
 +
N 15N None 24 Q :24@N
 +
N 15N None 25 Q :25@N
 +
N 15N None 26 Q :26@N
 +
N 15N None 27 Q :27@N
 +
N 15N None 28 Q :28@N
 +
N 15N None 29 V :29@N
 +
N 15N None 30 L :30@N
 +
N 15N None 31 N :31@N
 +
N 15N None 32 I :32@N
 +
N 15N None 33 L :33@N
 +
N 15N None 34 K :34@N
 +
N 15N None 35 S :35@N
 +
N 15N None 36 N :36@N
 +
N 15N None 38 Q :38@N
 +
N 15N None 39 L :39@N
 +
N 15N None 40 M :40@N
 +
N 15N None 41 A :41@N
 +
N 15N None 42 A :42@N
 +
N 15N None 43 F :43@N
 +
N 15N None 44 I :44@N
 +
N 15N None 45 K :45@N
 +
N 15N None 46 Q :46@N
 +
N 15N None 48 T :48@N
 +
N 15N None 49 A :49@N
 +
N 15N None 50 K :50@N
 +
N 15N None 51 Y :51@N
 +
N 15N None 52 V :52@N
 +
N 15N None 53 A :53@N
 +
N 15N None 54 N :54@N
 +
N 15N None 55 Q :55@N
 +
N 15N None 57 G :57@N
 +
N 15N None 58 M :58@N
 +
N 15N None 59 Q :59@N
 +
</source>
 +
 +
== Example ==
 +
deselect.spin(spin_id=':5@N', change_all=False)
 +
 +
[[Category:Relax]]

Latest revision as of 21:40, 21 October 2020

The spin ID strings are used to identify molecules, residues, and atoms/spin systems in the relax data store.

See manual

4.2.2 Molecule, residue, and spin containers

Structure

  1. The molecule ID token beginning with the # character,
  2. The residue ID token beginning with the : character,
  3. The atom or spin system ID token beginning with the @ character.

The full ID string specification is

#<mol name> :<res id>[, <res id>[, <res id>, ...]] @<atom id>[,<atom id>[, <atom id>, ...]]

Where the token elements are <mol name>, the name of the molecule, <res id>, the residue identifier which can be a number, name, or range of numbers,
<atom id>, the atom or spin system identifier which can be a number, name, or range of numbers.

If one of the tokens is left out then all elements will be assumed to match.
For example if the string does not contain the # character then all molecules will match the string.
If only the molecule ID component is specified, then all spins of the molecule will match.
Regular expression can, in some instances, be used to select spins. For example the string @H* will select the protons ‘H’, ‘H2’ and ‘H98’.

See current spins

from pipe_control.mol_res_spin import spin_loop

for curspin, mol_name, res_num, res_name, spin_id in spin_loop(full_info=True, return_id=True, skip_desel=True):
    print curspin.name, curspin.isotope, mol_name, res_num, res_name, spin_id

N 15N None 5 I :5@N
N 15N None 6 S :6@N
N 15N None 8 S :8@N
N 15N None 9 A :9@N
N 15N None 10 L :10@N
N 15N None 11 Q :11@N
N 15N None 12 D :12@N
N 15N None 13 L :13@N
N 15N None 14 L :14@N
N 15N None 15 R :15@N
N 15N None 16 T :16@N
N 15N None 17 L :17@N
N 15N None 18 K :18@N
N 15N None 19 S :19@N
N 15N None 21 S :21@N
N 15N None 24 Q :24@N
N 15N None 25 Q :25@N
N 15N None 26 Q :26@N
N 15N None 27 Q :27@N
N 15N None 28 Q :28@N
N 15N None 29 V :29@N
N 15N None 30 L :30@N
N 15N None 31 N :31@N
N 15N None 32 I :32@N
N 15N None 33 L :33@N
N 15N None 34 K :34@N
N 15N None 35 S :35@N
N 15N None 36 N :36@N
N 15N None 38 Q :38@N
N 15N None 39 L :39@N
N 15N None 40 M :40@N
N 15N None 41 A :41@N
N 15N None 42 A :42@N
N 15N None 43 F :43@N
N 15N None 44 I :44@N
N 15N None 45 K :45@N
N 15N None 46 Q :46@N
N 15N None 48 T :48@N
N 15N None 49 A :49@N
N 15N None 50 K :50@N
N 15N None 51 Y :51@N
N 15N None 52 V :52@N
N 15N None 53 A :53@N
N 15N None 54 N :54@N
N 15N None 55 Q :55@N
N 15N None 57 G :57@N
N 15N None 58 M :58@N
N 15N None 59 Q :59@N

Example

deselect.spin(spin_id=':5@N', change_all=False)