User Tools

Site Tools


renumber_residues_rename_chains_residues_or_atoms

If the first protein residue in the file that was read in is 4, and you wish to renumber it to 1, type:

alter name, resi=str(int(resi)-3) (name= object name)
→ subtract 3 from each residue number; use a + sign if you wish to add)

alter sele, resi=str(int(resi)+22) (sele= selected residues)
→ add 22 to each residue number; use a - sign if you wish to subtract)

If you want to change the number of a particular residue to '26', for example, select it and then type:
alter sele, resi='26'

With the same command, you also can rename a chain; select the group of residues and then type:
alter sele, chain='A'
(chain A is defined)

or a selected atom:
alter sele, name='H3'
(the selected atom is renamed H3 but, to see the result, you will have to clear labels and label with atom names again)

or a selected residue:
alter sele, resn='CAP'

Notes: (1) To see the changes you need to relabel; (2) to reorder atoms in the structure you may want to use the command sort

renumber_residues_rename_chains_residues_or_atoms.txt · Last modified: 2017/02/08 06:36 by root