Subsections


residue.number

Image residue Image edit-rename

Synopsis

Number the residues.

Defaults

residue.number(res_id=None, number=None, force=False)

Keyword arguments

res_id: The residue ID string corresponding to a single residue.

number: The new residue number.

force: A flag which if True will cause the residue to be renumbered.

Description

This simply allows residues to be numbered. The new number cannot correspond to an existing residue.

Spin ID string documentation

The identification string is composed of three components: the molecule ID token beginning with the `#' character, the residue ID token beginning with the `:' character, and the atom or spin system ID token beginning with the `@' character. Each token can be composed of multiple elements - one per spin - separated by the `,' character and each individual element can either be a number (which must be an integer, in string format), a name, or a range of numbers separated by the `-' character. Negative numbers are supported. 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 be used to select spins. For example the string `@H*' will select the protons `H', `H2', `H98'.

Prompt examples

The following sequence of commands will renumber the sequence {1 ALA, 2 GLY, 3 LYS} to {101 ALA, 102 GLY, 103 LYS}:

[numbers=none]
relax> residue.number(':1', 101, force=True)

[numbers=none]
relax> residue.number(':2', 102, force=True)

[numbers=none]
relax> residue.number(':3', 103, force=True)


The relax user manual (PDF), created 2016-10-28.