Chimera2 Command-Structure Thoughts

May 6 2015 gestalt conclusions after coming up with and discarding many command-revision ideas as logically flawed:

Potential components of a command:

  1. command or command-subcommand name (e.g. color, measure area)
  2. required arguments in required order
  3. optional keyword-value arguments in any order

Atomspecs (or other target specs, e.g. volume models, surface pieces):

See also: Chimera2 User Guide, Chimera2 atomspec writeup, Chimera2 commands for initial release (wiki), Chimera2 manpage mockups:

Potential renaming of Chimera1 commands (up for discussion):

General Command Guidelines

Further notes:

Examples

style  spec  [atoms | cartoon | surface | pbonds] style-type style-type-options
- or maybe -
style  spec  style-type1 [style-type1-options] [style-type2 [style-type2-options]] ...

...or, if including the sub-options is too complicated:

style  spec  [atoms atoms-style] [cartoon cartoon-style] [surface surface-style] [pbonds pbonds-style]
- or -
style  spec  style-type1 [style-type2] ... cartoon spec cartoon-options surface spec surface-options show/hide [atoms | models] spec color spec colorspec [target alscrnmbpd]
transparency spec percent [target alscrnmbpd] [ frames N ]
  (target: atoms/bonds, atom/bond labels, surfaces, cartoons, residue labels, nonmolecular models, molecular models, bonds-only, pseudobonds, distances and other pseudobond labels; default further limited to als when spec contains only explicitly specified atoms)
Extremely useful, logically structured catchalls for setting attributes and global settings, respectively:
setattr  spec  level  attr-name attr-value
- or (Chimera1 order) -
setattr  level  attr-name attr-value  spec

set setting-name setting-value
- or -
set  category  setting-name1 setting-value1 [setting-name2 setting-value2 ...]
...could be one value at a time, or a group of related values (e.g. the subcommand could be a category and the subsequent options the settings in that category):

set transparencyLayers (single | multiple)
set transparency [layers single | multiple] [angleDependent T | F] [transp-parm3 value] [transp-parm4 value] ...
set bgColor color-spec
set background [ solid color-spec | gradient gradient-spec | image image-spec [placement-options]] [transparent T | F]

meng [AT] cgl.ucsf.edu / July 2015