Image structure Image spin


Load spins from the structure into the relax data store.


structure.load_spins(spin_id=None, from_mols=None, mol_name_target=None, ave_pos=True, spin_num=True)

Keyword arguments

spin_id: The spin identification string for the selective loading of certain spins into the relax data store.

from_mols: The list of similar, but not necessarily identical molecules to load spin information from.

mol_name_target: The name of target molecule container, overriding the name of the loaded structures.

ave_pos: A flag specifying if the position of the atom is to be averaged across models.

spin_num: A flag specifying if the spin number should be loaded.


This allows a sequence to be generated within the relax data store using the atomic information from the structure already associated with this data pipe. The spin ID string is used to select which molecules, which residues, and which atoms will be recognised as spin systems within relax. If the spin ID is left unspecified, then all molecules, residues, and atoms will be placed within the data store (and all atoms will be treated as spins).

As an alternative to using structural models, by specifying the list of molecules to load spins from similar though not necessarily identical molecules will be combined. In this case, the target molecule name must be supplied to create a single combined molecule. And only a single model can be loaded in the current data pipe. The spin numbering will be dropped to allow for sequential atom numbering in the PDB and other formats. Therefore only the residue number and name and atom name will be preserved for creating the spin containers. If the spin is only present in a subset of the structures, then the positional information will only be taken from that subset and hence the number of positions might be different for different spins.

If averaging the atomic positions, then average position of all models or molecules will be loaded into the spin container. Otherwise the positions from all models or molecules will be loaded separately.

Prompt examples

For a model-free backbone amide nitrogen analysis, to load just the backbone N sequence from the file `1F3Y.pdb' (which is a single protein), type the following two user functions:

relax> structure.read_pdb('1F3Y.pdb')

relax> structure.load_spins(spin_id='@N')

For an RNA analysis of adenine C8 and C2, guanine C8 and N1, cytidine C5 and C6, and uracil N3, C5, and C6, type the following series of commands (assuming that the PDB file with this atom naming has already been read):

relax> structure.load_spins(spin_id=":A@C8")

relax> structure.load_spins(spin_id=":A@C2")

relax> structure.load_spins(spin_id=":G@C8")

relax> structure.load_spins(spin_id=":G@N1")

relax> structure.load_spins(spin_id=":C@C5")

relax> structure.load_spins(spin_id=":C@C6")

relax> structure.load_spins(spin_id=":U@N3")

relax> structure.load_spins(spin_id=":U@C5")

relax> structure.load_spins(spin_id=":U@C6")

Alternatively using some Python programming:

relax> for id in [":A@C8", ":A@C2", ":G@C8", ":G@N1", ":C@C5", ":C@C6", ":U@N3", ":U@C5", ":U@C6"]:

relax>     structure.load_spins(spin_id=id)

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