Jmol/JSmol interactive scripting documentation |
Search
View Full Database
Index
measure or measures or monitor or monitors | |||||||||||
![]() See examples-11/measure.htm | |||||||||||
Renders a measurement between the specified atoms. See also set (measure). Two general syntaxes are available. In the older syntax, a series of two to four atom numbers are given, and the appropriate measure (distance, angle, or dihedral angle) is then displayed. The newer, more general syntax is as follows: measure RANGE <minValue> <maxValue> ALL|ALLCONNECTED|DELETE (<atom expression>) (<atom expression>) ... Using this syntax one can specify a set of measurements to define all at once. Note that these sets are embedded atom expressions that must be enclosed in parentheses. If neither ALL nor ALLCONNECTED is present, only the first matching atom in the entire model set (all frames, so probably the first frame) is matched in each atom expression. When ALL or ALLCONNECTED is specified, all matching criteria in all frames are generated, thus allowing for "animated" measures. In general, this syntax restricts measurements to within the same model. However, measures can also be between two atoms in different frames (different models) as long as each atom expression evaluates to a single, specific atom. (To specify a particular atom in a particular model, use "AND */n", where n is the model number, "ATOMNO=3" by itself, for example, will indicate the third atom in each model/frame, but "ATOMNO=3 and */6" specifies only atom 3 in model 6). If a measurement is made between atoms in different models, both models must be displayed in order for the measurement to appear. A simple way to display two specific models is to use display */i or */j, where i and j are two model numbers. Thus, for example, measure (*) (*) will measure nothing, because both expressions will simply match the first atom in the first frame. measure allconnected (*/3) (*/3) (*/3) will measure every angle associated with bonds for model 3; measure allconnected (*) (*) will measure every bonded distance in every loaded model; measure all (*) (*) measures all possible interatomic distances in all models (not recommended!). For the applet, using getProperty measurementInfo will then deliver full information relating to all measurements. The format of the label that accompanies the measurement line can be set for previously created measurements using measure "n:labelFormat", described below. In addition, the default format (affecting only future-created labels) for measurement labels can be set using set defaultDistanceLabel, set defaultAngleLabel, and set defaultTorsionLabel. The font of measurements can be set, for example, using font measure 20. You can specify units for a specific label using "//" at the end of the format followed by a unit designation such as A or nm. Special units are available for NMR data arising from Magres files: "2://dc_hz" or "2://dc_khz" or "2://khz" for calculated dipolar constant in Hz or kHz and "2://isc_hz" or "2://hz" for calculated J-coupling constants. These units are also available for the measure() function as, for example, x = measure({a},{b},"isc_hz"). | |||||||||||
measure ON/OFF{default: ON} | |||||||||||
| |||||||||||
measure "n:labelFormat" | |||||||||||
| |||||||||||
measure (two to four atom expressions, each in parentheses) "labelFormat" | |||||||||||
| |||||||||||
measure (integer) (integer) "labelFormat" | |||||||||||
| |||||||||||
measure (integer) (integer) (integer) "labelFormat" | |||||||||||
| |||||||||||
measure (integer) (integer) (integer) (integer) "labelFormat" | |||||||||||
| |||||||||||
measure ALL (two to four atom expressions) "labelFormat" | |||||||||||
| |||||||||||
measure ALLCONNECTED (two to four atom expressions) "labelFormat" | |||||||||||
| |||||||||||
measure DELETE | |||||||||||
| |||||||||||
measure DELETE (integer) | |||||||||||
| |||||||||||
measure DELETE (two to four atom expressions) | |||||||||||
| |||||||||||
measure LIST | |||||||||||
| |||||||||||
measure RANGE (decimal) (decimal) ALL|ALLCONNECTED|DELETE (two to four atom expressions, each in parentheses) | |||||||||||
| |||||||||||
measure SEARCH "SMARTstring" | |||||||||||
| |||||||||||
measure SELECT .. | |||||||||||
| |||||||||||
measure SELECT ALL | |||||||||||
| |||||||||||
measure SELECTED | |||||||||||
| |||||||||||
measure SELECTED .. | |||||||||||
| |||||||||||
measure .. DEFAULT | |||||||||||
| |||||||||||
measure TICKS X|Y|Z {major,minor,subminor} FORMAT [%0.2f, ...] SCALE {scaleX, scaleY, scaleZ} | x.xx FIRST x.xx {point1} {point2} | |||||||||||
| |||||||||||
Examples: | |||||||||||
![]() See examples-11/measure.htm | |||||||||||
| |||||||||||
![]() ![]() ![]() |
measure or measures or monitor or monitors
measure ON/OFF{default: ON}
measure "n:labelFormat"
measure (two to four atom expressions, each in parentheses) "labelFormat"
measure (integer) (integer) "labelFormat"
measure (integer) (integer) (integer) "labelFormat"
measure (integer) (integer) (integer) (integer) "labelFormat"
measure ALL (two to four atom expressions) "labelFormat"
measure ALLCONNECTED (two to four atom expressions) "labelFormat"
measure DELETE
measure DELETE (integer)
measure DELETE (two to four atom expressions)
measure LIST
measure RANGE (decimal) (decimal) ALL|ALLCONNECTED|DELETE (two to four atom expressions, each in parentheses)
measure SEARCH "SMARTstring"
measure SELECT ..
measure SELECT ALL
measure SELECTED
measure SELECTED ..
measure .. DEFAULT
measure TICKS X|Y|Z {major,minor,subminor} FORMAT [%0.2f, ...] SCALE {scaleX, scaleY, scaleZ} | x.xx FIRST x.xx {point1} {point2}
last updated: May 04, 2025 11:01:10