Alter: Difference between revisions
Jump to navigation
Jump to search
Line 16: | Line 16: | ||
===EXAMPLES=== | ===EXAMPLES=== | ||
* Change chain label and residue index | |||
<source lang="python"> | |||
alter (chain A),chain='B' | alter (chain A),chain='B' | ||
alter (all),resi=str(int(resi)+100) | alter (all),resi=str(int(resi)+100) | ||
sort | sort | ||
</source> | |||
* Change van der Waals radius of a given atom | |||
<source lang="python"> | |||
alter (name P), vdw=1.90 | |||
</source> | |||
===SEE ALSO=== | ===SEE ALSO=== |
Revision as of 03:42, 16 January 2007
DESCRIPTION
alter changes one or more atomic properties over a selection using the python evaluator with a separate name space for each atom. The symbols defined in the name space are:
name, resn, resi, chain, alt, elem, q, b, segi, type (ATOM,HETATM), partial_charge, formal_charge, text_type, numeric_type, ID, vdw
All strings must be explicitly quoted. This operation typically takes several seconds per thousand atoms altered.
WARNING: You should always issue a sort command on an object after modifying any property which might affect canonical atom ordering (names, chains, etc.). Failure to do so will confound subsequent "create" and "byres" operations.
USAGE
alter (selection),expression
EXAMPLES
- Change chain label and residue index
alter (chain A),chain='B'
alter (all),resi=str(int(resi)+100)
sort
- Change van der Waals radius of a given atom
alter (name P), vdw=1.90