This page gives a description of how RasTop "world" works and summarizes some of the problems that were encountered during its building.
In early RasMol versions, including all R. Sayle's versions, the molecule is inscribed in a box, the bounding box, which is orthogonal to the data file's original coordinate axes. The rotation center is located at the center of gravity and during rotation, the center of rotation is kept in a unique plane, the screen plane or canvas. Therefore the sensation of depth is apparent and RasMol world is 2-dimensional.
Three parameters are required to describe a RasMol view: the translation values, the rotation values, and the zoom value. Translation and zoom are expressed in relative units. The translation values along the X- and the Y-axis are expressed in percents of the canvas size in their respective dimension taken from the center of the canvas to the center of gravity. The zoom value depends on the size of the bounding box. A default value of 100 renders the molecule slightly smaller than the size of the canvas.
Since zooming occurs at the center of gravity, translation values are independent from zoom values. Therefore, the three parameters are unique, independent from each other. These are perfect conditions for scripting that make RasMol so wonderful to use.
When multiple molecules are present, the parameters translation and zoom are not independent anymore. First at all, positions in the space now depend on the canvas size since x value are relative to the width of the canvas and y values to its height. There are multiple centers of gravity and, depending on which one is chosen for zooming, translation values will vary. When a larger molecule is loaded, the maximum size of the bounding box will increase and therefore the zoom value to keep previous molecules at the same size will change.
RasTop code to display multiple molecules derives in large part from the UCB mods by Gary Grossman and Marco Molinaro and its adaptation by Herbert Bernstein in RasMol 2.7.2 and 126.96.36.199 versions. The term "RasTop world" is used to described varied modifications and options made to overcome some of the problems described above. In any case, it is a definitive solution but rather an experiment to explore some possibilities for manipulating a world and scripting it.
Homogeneity of translation values: In RasTop world, translation values in all axes, including Z-axis, are expressed in percent of the smallest size of the canvas. Existing RasMol scripts should appear almost identically on screen.
Freedom of translation: In RasMol, translations are limited to a maximum of 200% (-100 / +100) of the canvas size. In RasTop world, translations are not limited. Internally, translations are counted as the sum of the world translation and the molecule translation. If the world origin is far away, or zooming is at high value, some translations would be become impossible without apparent reasons.
World origin and world axes: The use of a world origin and associated axes permits to reset a molecular assembly to a given initial position, which brings interesting scripting potentialities. Translation values in a world reset to a default zoom value become unique. If we choose the world origin as zooming and rotation center, we can zoom, rotate, and translate the reset world in a unique way to its initial position. Initial versions of RasTop 2.0 used this technique to save a view.
Nevertheless, the variations of the bounding box maximum size along with the loading of larger molecules makes difficult to save and restore current views in a script. The parameter 'set worlddepth' allows to set the value of an imaginary larger bounding box at start; thus resolving the conflict.
With depth queuing, the worlddepth parameter is also the distance that determine the depth of the current view. With this new capability, saving and restoring of current views become virtually impossible. This is why the commands 'position' and 'scale' were introduced. These commands express translation and zooming in angstrom, thus resolving conflicts or ambiguities related to molecule location.
In the present version of RasTop, the world is 2-dimensional, i.e. the world origin is always in the canvas plane (like the center of gravity in early RasMol, see above), and molecules are moving around in the 3 dimensions. Value along the Z-axis are always given relatively to the position of the world origin along this axis, this includes clipping planes and coordinate systems.