Alter: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
 
mNo edit summary
Line 1: Line 1:
===DESCRIPTION===
===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:
"alter" changes one or more atomic properties over a selection
  name, resn, resi, chain, alt, elem, q, b, segi,
using the python evaluator with a separate name space for each
type (ATOM,HETATM), partial_charge, formal_charge,
atom.  The symbols defined in the name space are:
text_type, numeric_type, ID
   
 
  name, resn, resi, chain, alt, elem, q, b, segi,
All strings must be explicitly quoted.  This operation typically takes several seconds per thousand atoms altered.
  type (ATOM,HETATM), partial_charge, formal_charge,
 
  text_type, numeric_type, ID
'''WARNING''': You should always issue a '''sort''' command on an object
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
after modifying any property which might affect canonical atom
ordering (names, chains, etc.).  Failure to do so will confound
ordering (names, chains, etc.).  Failure to do so will confound
subsequent "create" and "byres" operations.
subsequent "create" and "byres" operations.
 
===USAGE===
===USAGE===
  alter (selection),expression
  alter (selection),expression
 
===EXAMPLES===
===EXAMPLES===
  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
 
===SEE ALSO===
===SEE ALSO===
  [[Cmd alter_state]], [[Cmd iterate]], [[Cmd iterate_state]], [[Cmd sort ]]
[[Cmd alter_state]], [[Cmd iterate]], [[Cmd iterate_state]], [[Cmd sort ]]


[[Category:Commands|alter]]
[[Category:Commands|alter]]

Revision as of 11:33, 8 July 2005

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

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

alter (chain A),chain='B'
alter (all),resi=str(int(resi)+100)
sort

SEE ALSO

Cmd alter_state, Cmd iterate, Cmd iterate_state, Cmd sort