This is a read-only mirror of pymolwiki.org
Difference between revisions of "Flag"
Jump to navigation
Jump to search
m (3 revisions) |
(table) |
||
| Line 1: | Line 1: | ||
| + | [[Flag]] is a command to set or clear ''flags'' on atom sets. A flag is just some atom-specific property. A flag is either on or off for a residue. Possible flags are: | ||
| − | + | {| class="wikitable" | |
| − | + | |- | |
| − | '''focus''' | + | ! Flag name |
| − | + | ! Value | |
| − | '''free''' | + | ! Description |
| − | + | ! Notes | |
| − | '''restrain''' | + | |- |
| − | + | | '''focus''' | |
| − | '''fix''' | + | | 0 |
| − | + | | Atoms of Interest (i.e. a ligand in an active site) | |
| − | '''exclude''' | + | |rowspan="6"| Reserved for molecular modeling. |
| − | + | ||
| − | + | Affects [[Molecular Sculpting|sculpting]]. | |
| − | + | |- | |
| − | + | | '''free''' | |
| − | + | | 1 | |
| − | + | | Free Atoms (free to move subject to a force-field) | |
| − | + | |- | |
| − | '''exfoliate''' | + | | '''restrain''' |
| − | + | | 2 | |
| − | '''ignore''' | + | | Restrained Atoms (typically harmonically constrained) |
| − | + | |- | |
| − | '''no_smooth''' | + | | '''fix''' |
| − | + | | 3 | |
| − | + | | Fixed Atoms (no movement allowed) | |
| − | + | |- | |
| − | + | | '''exclude''' | |
| − | If the | + | | 4 |
| − | + | | Atoms which should not be part of any simulation | |
| − | = | + | |- |
| − | < | + | | '''study''' |
| − | + | | 5 | |
| − | </ | + | | |
| + | |- | ||
| + | | | ||
| + | | 6 | ||
| + | | Protein (<code>polymer.protein</code> selector) | ||
| + | |rowspan="2"| See [[auto_classify_atoms]] and [[auto_show_classified]] | ||
| + | |- | ||
| + | | | ||
| + | | 7 | ||
| + | | Nucleic acid (<code>polymer.nucleic</code> selector) | ||
| + | |- | ||
| + | | | ||
| + | | 8-15 | ||
| + | | ''Free for end users to manipulate'' | ||
| + | |rowspan="2"| | ||
| + | |- | ||
| + | | | ||
| + | | 16-23 | ||
| + | | Reserved for external GUIs and linked applications | ||
| + | |- | ||
| + | | '''exfoliate''' | ||
| + | | 24 | ||
| + | | Remove surface from atoms when surfacing (redundant with excluding those atoms from the selection in <code>show surface, sele</code>) | ||
| + | |rowspan="2"| Affects [[surface]] (with [[surface_mode]]=0), [[dots]] (with [[trim_dots]]=on), [[Get_Area|get_area]] | ||
| + | |- | ||
| + | | '''ignore''' | ||
| + | | 25 | ||
| + | | Ignore atoms altogether when surfacing | ||
| + | |- | ||
| + | | '''no_smooth''' | ||
| + | | 26 | ||
| + | | Do not smooth atom position | ||
| + | |rowspan="1"| Affects [[cartoon]] | ||
| + | |- | ||
| + | | | ||
| + | | 27 | ||
| + | | Polymer | ||
| + | |rowspan="5"| See [[auto_classify_atoms]] and [[auto_show_classified]] | ||
| + | |||
| + | See [[Selection Algebra]] "Chemical classes" | ||
| + | |- | ||
| + | | | ||
| + | | 28 | ||
| + | | Solvent | ||
| + | |- | ||
| + | | | ||
| + | | 29 | ||
| + | | Organic | ||
| + | |- | ||
| + | | | ||
| + | | 30 | ||
| + | | Inorganic | ||
| + | |- | ||
| + | | | ||
| + | | 31 | ||
| + | | Guide atom (e.g. CA in proteins) | ||
| + | |} | ||
| + | |||
| + | == Usage == | ||
| + | |||
| + | flag flag, selection [, action [, quiet ]] | ||
| + | |||
| + | If the [[auto_indicate_flags]] setting is true, then PyMOL will automatically create a selection called "indicate" which contains all atoms with that flag after applying the command. | ||
| + | |||
| + | == Arguments == | ||
| + | |||
| + | * '''flag''' = int or str: Flag name or value | ||
| + | * '''selection''' = str: atom selection | ||
| + | * '''action''' = set|clear|reset: ''Note that "reset" will set the flag on the given selection, and clear it on all other atoms'' {default: reset} | ||
| + | |||
| + | == Examples == | ||
| + | |||
| + | [[File:flags-ignore-exfoliate.png|thumb|right|CYS residue with flag "ignore" (left) and flag "exfoliate" (right)]] | ||
| + | |||
| + | <syntaxhighlight lang="python"> | ||
| + | fab AC | ||
| + | |||
| + | # Image on the left | ||
| + | flag ignore, resn CYS | ||
| + | show surface | ||
| + | |||
| + | # Image on the right | ||
| + | flag ignore, all, clear | ||
| + | flag exfoliate, resn CYS | ||
| + | rebuild surface | ||
| + | </syntaxhighlight> | ||
| − | |||
<source lang="python"> | <source lang="python"> | ||
| − | # | + | # in sculpting, ensure the newMethyl group just added doesn't move around |
| − | + | flag fix, newMethyl | |
| − | + | ||
| − | flag | + | # Introspect the flags bitmask |
| − | # | + | iterate all, print(hex(flags)) |
| − | |||
| − | # | + | # Select atoms with "fix" flag |
| − | + | select fixedatoms, flag 3 | |
| − | flag | ||
</source> | </source> | ||
[[Category:Commands]] | [[Category:Commands]] | ||
Revision as of 06:42, 23 June 2020
Flag is a command to set or clear flags on atom sets. A flag is just some atom-specific property. A flag is either on or off for a residue. Possible flags are:
| Flag name | Value | Description | Notes |
|---|---|---|---|
| focus | 0 | Atoms of Interest (i.e. a ligand in an active site) | Reserved for molecular modeling.
Affects sculpting. |
| free | 1 | Free Atoms (free to move subject to a force-field) | |
| restrain | 2 | Restrained Atoms (typically harmonically constrained) | |
| fix | 3 | Fixed Atoms (no movement allowed) | |
| exclude | 4 | Atoms which should not be part of any simulation | |
| study | 5 | ||
| 6 | Protein (polymer.protein selector)
|
See auto_classify_atoms and auto_show_classified | |
| 7 | Nucleic acid (polymer.nucleic selector)
| ||
| 8-15 | Free for end users to manipulate | ||
| 16-23 | Reserved for external GUIs and linked applications | ||
| exfoliate | 24 | Remove surface from atoms when surfacing (redundant with excluding those atoms from the selection in show surface, sele)
|
Affects surface (with surface_mode=0), dots (with trim_dots=on), get_area |
| ignore | 25 | Ignore atoms altogether when surfacing | |
| no_smooth | 26 | Do not smooth atom position | Affects cartoon |
| 27 | Polymer | See auto_classify_atoms and auto_show_classified
See Selection Algebra "Chemical classes" | |
| 28 | Solvent | ||
| 29 | Organic | ||
| 30 | Inorganic | ||
| 31 | Guide atom (e.g. CA in proteins) |
Usage
flag flag, selection [, action [, quiet ]]
If the auto_indicate_flags setting is true, then PyMOL will automatically create a selection called "indicate" which contains all atoms with that flag after applying the command.
Arguments
- flag = int or str: Flag name or value
- selection = str: atom selection
- action = set|clear|reset: Note that "reset" will set the flag on the given selection, and clear it on all other atoms {default: reset}
Examples
fab AC
# Image on the left
flag ignore, resn CYS
show surface
# Image on the right
flag ignore, all, clear
flag exfoliate, resn CYS
rebuild surface
# in sculpting, ensure the newMethyl group just added doesn't move around
flag fix, newMethyl
# Introspect the flags bitmask
iterate all, print(hex(flags))
# Select atoms with "fix" flag
select fixedatoms, flag 3
