Iterate: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
It can be used to perform operations and aggregations using atomic selections, and store the results in any global object, such as the predefined '''stored''' object. | It can be used to perform operations and aggregations using atomic selections, and store the results in any global object, such as the predefined '''stored''' object. | ||
The local namespace for "iterate" contains the following names | The local namespace for "iterate" contains the following names: | ||
*name | |||
*resn | |||
*resi | |||
*chain | |||
*alt | |||
*elem | |||
*q | |||
*b | |||
*segi | |||
*type (ATOM,HETATM) | |||
*formal_charge | |||
*partial_charge | |||
*numeric_type | |||
*text_type | |||
*ID | |||
All strings in the expression must be explicitly quoted. This operation typically takes a second per thousand atoms. | All strings in the expression must be explicitly quoted. This operation typically takes a second per thousand atoms. | ||
Line 25: | Line 36: | ||
===SEE ALSO=== | ===SEE ALSO=== | ||
[[Cmd iterate_state]], [[Cmd alter]], [[Cmd alter_state | [[Cmd iterate_state]], [[Cmd alter]], [[Cmd alter_state]] | ||
[[Category:Commands|iterate]] | [[Category:Commands|iterate]] |
Revision as of 20:22, 6 January 2006
DESCRIPTION
iterate iterates over an expression with a separate name space for each atom. However, unlike the "alter" command, atomic properties can not be altered. Thus, iterate is more efficient than alter.
It can be used to perform operations and aggregations using atomic selections, and store the results in any global object, such as the predefined stored object.
The local namespace for "iterate" contains the following names:
- name
- resn
- resi
- chain
- alt
- elem
- q
- b
- segi
- type (ATOM,HETATM)
- formal_charge
- partial_charge
- numeric_type
- text_type
- ID
All strings in the expression must be explicitly quoted. This operation typically takes a second per thousand atoms.
USAGE
iterate (selection),expression
EXAMPLES
stored.net_charge = 0
iterate (all),stored.net_charge = stored.net_charge + partial_charge
stored.names = []
iterate (all),stored.names.append(name)