home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 1 / ARM_CLUB_CD.iso / contents / education / a / mole / !Mole / !Help / HelpText < prev   
Text File  |  1993-05-19  |  19KB  |  449 lines

  1. Help on !Mole
  2. /***************************************************************************\
  3. *                                                                           *
  4. *       !Mole,                                                              *
  5. *                                                                           *
  6. *       3D Molecular modeller,                                              *
  7. *                                                                           *
  8. *       version 2.00 (28-Sep-92),                                           *
  9. *                                                                           *
  10. *       © Simon Kilvington, 1992                                            *
  11. *                                                                           *
  12. \***************************************************************************/
  13.  
  14.  
  15.    Mole is a program to edit and display molecular models, these may then be
  16. saved as Sprite or Draw files, or rendered to give a more realistic 3D image
  17. which can then be saved as a sprite.
  18.  
  19. Main menu options
  20. =================
  21.  
  22. 'Save'
  23.    leads to a submenu which allows the saving of the current molecule as a
  24. Mole, Sprite or Draw file. Each of these options leads to a normal 'Save as'
  25. dialogue box.
  26.    Note: Draw files are not clipped to the size of the main Mole window, so
  27. if a molecule is not fully visible when the window is at full size, parts of
  28. it will lie outside the background rectangle in the resulting Draw file.
  29.  
  30. 'File'
  31.    leads to a dialogue box giving information about the current molecule.
  32.  
  33. 'Display type'
  34.    leads to a dialogue box that allows the molecule to be shown in several
  35. different styles, monochrome skeletal, skeletal, 'ball and stick', space
  36. filling or as a Van der Waals surface. The dispersion of points over the VDW
  37. surface can be specified, large values give less points but will be faster
  38. to draw, the dispersion is actually the arc length (in pm) between adjacent
  39. points. It also allows Hydrogen atoms to be not shown, and the atoms to be
  40. drawn in a way that gives a more 3D feal to the image.
  41.    Note: at present, this 'pseudo-rendered' way of displaying molecules and
  42. the VDW surface can not be exported to Draw files.
  43.  
  44. 'Colours'
  45.    leads to a submenu that allows the background and bond colour (of mono
  46. skeletal and 'ball and stick' models) to be altered.
  47.  
  48. 'Render'
  49.    leads to the Render submenu, this will be discussed later.
  50.  
  51. 'Show Mover'
  52.    selecting this opens the Mover window, this allows the molecule to be
  53. rotated and translated to your hearts content.
  54.  
  55. 'Show Editor'
  56.    selecting this opens the Editor. See below.
  57.  
  58.  
  59. Mover
  60. =====
  61.  
  62.    Clicking on the arrow icons in the Mover window will change the position
  63. and orientation of the molecule, the angle and position steps used when the
  64. arrow icons are clicked can be altered in the Mover menu. To get the
  65. molecule redrawn in the main window click on the 'Update' icon, or it can be
  66. redrawn automatically when the orientation or position are changed by
  67. selecting 'Continuous update' from the Mover menu.
  68.    'Return to origin' on the Mover menu returns the molecule to its origin
  69. ie translation is 0,0,0 and the rotation about each axis is also 0.
  70.    This rotation is about the molecules internal axis, not the screen axis.
  71. To rotate the molecule about the screen axis, select the amount to rotate
  72. about each axis by in the 'Screen axis' part of the Mover window, then click
  73. on update. As before, if continuous update is selected the molecule will be
  74. automatically redrawn when you click on one of the Screen axis arrows.
  75.    To undo the rotation about the screen axis either rotate the molecule in
  76. the opposite direction about each axis (you will also have to do the
  77. rotations in the reverse order, ie if you did X +45°, then Y +10°, then Z
  78. -30°, you would have to do Z +30°, then Y -10°, and finaly X -45° to restore
  79. the molecule to its original orientation), or select 'Reset screen axis'
  80. from the Mover menu.
  81.    Note: the translation of the molecule is the last step that is performed
  82. before it is drawn, so any rotations will not effect its position. Also, the
  83. molecule will be redrawn a lot quicker if it has not been rotated about the
  84. screen axis at all.
  85.  
  86.  
  87. Editor
  88. ======
  89.  
  90.    On opening the Editor the edit cursor will appear in the main window,
  91. this shows the current atom (or fragment) to join to the molecule as a blue
  92. outline. The cursor shows where it will be attatched to the molecule. This
  93. atom or fragment can be rotated about the bond it is going to be joined to
  94. using the 'Rotation' icons, and  when it is in the correct position it can
  95. be joined by clicking on the large 'Join' icon.
  96.    Clicking on any atom in the main window will cause it to become the
  97. selected atom, this will be shown by highlighting the atom in the main
  98. window with a blue outline and diagramatically in the Editor window, in the
  99. 'Selected atom' icon. The diagram shows what the atom is bonded to and which
  100. of its bonds are free to connect things to. Clicking on one of the bonds in
  101. the diagram will cause it to be the selected bond, this is the bond to which
  102. new atoms or fragments will be joined (if the bond is not already
  103. connected).
  104.    Aswell as rotating the atom or fragment to join the 'Rotation' icons can
  105. be used to rotate selected parts of the molecule. If the selected bond is
  106. already connected then the edit cursor will just highlight the atom to which
  107. the bond is attatched. This atom (and the atoms connected to it) can then be
  108. rotated about the selected bond using the 'Rotation' icons.
  109.  
  110. Editor menu
  111. ===========
  112.  
  113. 'Name'
  114.    this allows the molecule name to be changed.
  115.  
  116. 'Rescale'
  117.    clicking on this option causes the molecule to be rescaled by the program
  118. so that the molecule picture neatly fits into the main window (well, that's
  119. the theory anyway - it works most of the time), alternatively a new scale
  120. can be entered in the submenu.
  121.  
  122. 'Recentre'
  123.    this translates the molecule so that the mean atom coordinates are zero.
  124.  
  125. 'Atoms'
  126.    this leads to a submenu that allows the atom type to join to be selected,
  127. the atom types to be edited, or the atom types to be saved.
  128.    When editing an existing atom type or entering a new one the caret is
  129. placed in the first text icon that needs to be filled in, pressing return
  130. will move it to the next and cause 'OK' to be selected after the last entry.
  131. The colour of the atom type can be changed by dragging the sliders (as in
  132. the Palette utility). The 'OK' icon must be clicked on to cause the changes
  133. to be registered with the program.
  134.  
  135. 'Fragments'
  136.    this leads to a submenu that allows the fragment to join to be selected,
  137. the fragments to be edited, or the fragments to be saved.
  138.    The only aspects of fragments that can be edited from here are the name,
  139. and where on the fragment it will be joined to the molecule. To choose which
  140. atom to join the fragment via, select it on the picture of the fragment, the
  141. bond to join via is selected from the atom diagram in the top right of the
  142. fragment editor window. Again 'OK' must be clicked to register the changes.
  143.  
  144. 'Change atom'
  145.    this allows the currently selected atom to be replaced by another atom
  146. type.
  147.  
  148. 'Move atom'
  149.    this allows the currently selected atom to be moved to a new position.
  150.  
  151. 'Close ring'
  152.    selecting this will cause the currently selected bond to be joined to an
  153. atom which it is touching. This has no effect if the bond is not touching
  154. another atom.
  155.  
  156. 'Break bond'
  157.    breaks the selected bond.
  158.  
  159. 'Delete atom'
  160.    deletes the currently selected atom.
  161.  
  162. 'Add Hydrogens'
  163.    adds Hydrogen atoms to all empty bonds in the molecule.
  164.  
  165. 'Wipe molecule'
  166.    asks for confirmation if the molecule is unsaved, and then wipes it.
  167.  
  168.  
  169. Rendering
  170. =========
  171.  
  172.    The molecule is rendered onto the screen as follows. The observer views
  173. the molecule along a line parallel to the +ve Z axis. 'xres' by 'yres' rays
  174. of light are considered, these leave the observer and pass through an
  175. imaginary grid at the focal distance in front of the observer. The grid is
  176. of size 'aspect' by 1.0, divided into 'xres' by 'yres' holes evenly
  177. distributed across it. The colour of the object at the bottom left hand
  178. corner of each hole is rendered onto the screen. This colour depends on the
  179. ambient light intensity and the intensity of the light reaching it from each
  180. lamp. Light from individual lamps may be blocked by other objects in the
  181. scene and this leads to shadows in the final image.
  182.    The spread of a lamp is the angle over which its intensity is not zero.
  183. The intensity within this range has a maximum along a line joining the
  184. position and the target and falls off linearly with the angle away from this
  185. line. A spread of zero means that the lamp has equal intensity in all
  186. directions.
  187.    Each lamps position and target coordinates are independant of the aspect
  188. ratio, they are expressed in terms of fractions of the distance across the
  189. imaginary grid. The observers coordinates are 0.5,0.5,-1.0, again these are
  190. independant of the aspect ratio. This means that position and target
  191. coordinates of 0,0,0 will be in the bottom left hand corner of the scene,
  192. whereas coordinates of 1,1,0 will be in the top right hand corner, and +ve Z
  193. coordinates are in the scene whereas Z coordinates of less than -1.0 are
  194. behind the observer.
  195.  
  196. Rendering menu
  197. ==============
  198.  
  199. 'Resolution'
  200.    a standard set of resolutions are available, or a user definable one can
  201. be selected. All resolutions are expressed in terms of X pixels by Y pixels.
  202.  
  203. 'Aspect'
  204.    this allows the aspect ratio (X/Y) of the image to be changed.
  205.  
  206. 'Focal'
  207.    a focal length of 1.0 will cause the rendered molecule to be the same
  208. size as the molecule pictured in the main window. Increasing the focal
  209. length will give a telephoto effect, whereas decreasing it will lead to a
  210. wide angle view.
  211.  
  212. 'Lamps'
  213.    this allows you to add extra lamps to illuminate the molecule, or to
  214. alter existing ones.
  215.    Lamp details can not be saved, although they can be set in the config
  216. file so that the program starts up with your prefered lamps each time. See
  217. inside the directory 'Docs' in the !Mole application for details of the
  218. config file.
  219.  
  220. 'Ambient'
  221.    this sets the ambient light level, ie the intensity of the light falling
  222. on every object irrespective of the lamps.
  223.  
  224. 'Brightness'
  225.    this sets the overall brightness, too large a value will cause the
  226. picture to be over exposed (ie too bright, so everything comes out white),
  227. too small a value will cause the picture to be too dark.
  228.  
  229. 'Shadows'
  230.    if selected shadows are cast in the rendered image, if not, they won't be.
  231.  
  232. 'Multi task'
  233.    if selected you can still use the computer when it is rendering, a
  234. dialogue box is opened to show how its going, and to allow you to pause or
  235. quit the rendering. If not selected the hourglass will be displayed while
  236. the rendering proceeds, this shows the percentage complete.
  237.  
  238. 'Render'
  239.    select this to start rendering when the above has all been set up to your
  240. desired values. (The rendering may take a few minutes!)
  241.  
  242. 'Stats'
  243.    this shows a dialogue box with a list of statistics about the last image
  244. rendered. The time taken, brightest red, green or blue component of an image
  245. pixel etc.
  246.  
  247.  
  248. Loading and saving
  249. ==================
  250.  
  251.    Mole files dragged onto the main window, or the Mole icon, are loaded as
  252. new molecules, and any existing molecule data is overwritten.
  253.    Mole files dragged onto the Editor will be loaded as fragments. If a
  254. fragment of the same name already exists it is overwritten with the new
  255. data, otherwise the new fragment is added to the end of the fragment list.
  256.    Double clicking on a Mole file will cause it to be loaded as a new
  257. molecule unless a molecule is already being edited, in which case it is
  258. loaded as a fragment.
  259.    When a new Atoms file is loaded atom types in the file with the same name
  260. as existing atom types replace the previous data, atom types with new names
  261. are added to the end of the atom types list.
  262.    When a Mole file is loaded as a fragment the bond and atom to join it via
  263. are set to the atom and bond that where selected when it was saved.
  264.    Note: fragments can be saved from the Editor into the main window to be
  265. edited, and molecules in the main window can be saved into the Editor as
  266. fragments.
  267.  
  268.  
  269. History
  270. =======
  271.  
  272. v0.00 - 0.41 (7-Feb-91)
  273.  
  274.    Crap, unfinished, Basic program that only allowed you to design planar
  275. molecules because I suddenly realised I knew nothing about vectors.
  276.  
  277.  
  278. v2.00 (28-Sep-92)
  279.  
  280.    Finally got around to updating the above.
  281.  
  282.  
  283. v2.01 (25-Oct-92)
  284.  
  285.    The following keyboard short cuts have been added...
  286.  
  287. cursor up/down     : rotate the molecule about its X axis
  288. cursor left/right  : rotate the molecule about its Y axis
  289. F1/F2              : rotate the molecule about its Z axis
  290.  
  291. shift + left/right : translate the molecule along the X axis
  292. shift + up/down    : translate the molecule along the Y axis
  293. shift + F1/F2      : translate the molecule along the Z axis
  294.  
  295. ctrl + up/down     : rotate about the screens X axis
  296. ctrl + left/right  : rotate about the screens Y axis
  297. ctrl + F1/F2       : rotate about the screens Z axis
  298.  
  299.  
  300. v2.02 (8-Nov-92)
  301.  
  302.    A couple of minor bugs have been fixed. It is now not possible to join
  303. atoms or fragments to a bond that is already occupied (!), and atoms with
  304. coordinates that are too large for the plotting routines are now clipped off
  305. rather than being plotted in unexpected places.
  306.  
  307.  
  308. v2.03 (14-Jan-93)
  309.  
  310.    A couple of other bugs have been fixed. In the rendering of cylinders the
  311. surface normals are now always calculated correctly, the colours used in the
  312. main window now never get out of sync with the current mode, and it is now
  313. possible to use Mole in hi-res modes.
  314.  
  315.  
  316. v2.04 (14-Feb-93)
  317.  
  318.    An option has been added to the display types menu to allow the Van der
  319. Waals surface of a molecule to be displayed, empty bonds can now be filled
  320. up with Hydrogen atoms and bonds can be broken using options in the editor
  321. menu.
  322.    A bug that caused the program to bomb out with no warning after viewing
  323. too many dialogue boxes after doing some rendering has been fixed.
  324.    The rendering algorithm has been altered, the output is unchanged but the
  325. routine now predicts which objects will be visible where, and so need only
  326. concentrate on rendering rather than trying to calculate what can be seen at
  327. each point. This at least doubles the speed of the rendering process, and
  328. will give even better performance increases with larger numbers of objects
  329. and higher resolutions. Shadows also need not be calculated, this also at
  330. least doubles the speed.
  331.    Unfortunately I haven't sorted out all the maths for predicting where
  332. cylinders will appear yet, so these are still rendered at the same speed as
  333. before. Although there is a sphere at the end of each cylinder when they are
  334. used to model bonds, so skeletal pictures will still be rendered faster than
  335. before.
  336.    It's a bit disheartening when you use something like MidasPlus on an IRIS
  337. and it renders a 1000 atom protein, at a resolution of 1280 × 1024 pixels,
  338. in about half a minute! The trouble with Mole's renderer is that it's all
  339. floating point maths at the moment, so it'll never be particularly fast
  340. until either you get a maths co-processor, or I convert it to fixed point.
  341.    By the way, if you have RISC OS 3.1 then the Shared C Library and the FP
  342. Emulator modules are in ROM, using RMFaster to move them into RAM gives an
  343. increase in rendering speed of about 10%.
  344.  
  345.  
  346. v2.05 (17-May-93)
  347.  
  348.    A minor change of order in the scaling/perspective routines allows much
  349. larger molecules to be displayed. This also showed up the fact that the Draw
  350. file transfering bug is still here for large files.
  351.    More optimization in the renderer, I've finally added the maths to
  352. predict where cylinders will appear, this gives enormous speed increases, I
  353. was using mono-skeletal Serotonin (25 atoms) to test the routine and the
  354. time taken to render it, at low resolution, was reduced from just over 3
  355. minutes to about 35 seconds (on an ARM3).
  356.    Also, precalculation of which objects can not possibly cast shadows on
  357. each other knocks about a third off the rendering speed. Again, at the
  358. moment, this only applies to spheres, cylinders may look nice but they are a
  359. right pain when it comes to trying to predict where they are.
  360.    The bug that caused the program to bomb out after rendering was still
  361. there for ball and stick models, this has now been fixed once and for all.
  362.  
  363.  
  364. Known problems
  365. ==============
  366.  
  367.    Mole sometimes has difficulty doing RAM transfers of large Draw files to
  368. my version of Draw (0.44), this seems to be due to Draw giving up receiving
  369. data after one or two buffer fills (though the need for more than one buffer
  370. fill is brought on by Mole's fairly inaccurate estimate of the length of
  371. large Draw files). The solution (if the problem occurs) is to save the Draw
  372. file to disc first, and then load it into Draw from there.
  373.    I've got RISC OS 3.1 now and the problem still occurs with the new
  374. version of Draw (0.88), but only for much larger molecules.
  375.  
  376.    If a Mole file is dragged onto the Mole icon or into the main Mole window
  377. it will overwrite any existing molecule that is being edited, without any
  378. warning, even if the original molecule has not been saved.
  379.  
  380.  
  381. Use and copying of this program
  382. ===============================
  383.  
  384.    Mole is a 'Freeware' program, ie you can freely use and copy it as long
  385. as all of the following files are copied (unaltered) with it:
  386.  
  387. !Mole.!Boot
  388.       !Help.!ReadMe
  389.             !Run
  390.             !RunImage
  391.             HelpText   (this file)
  392.       !Run
  393.       !RunImage
  394.       !Sprites
  395.       AtomTypes.
  396.       Docs.Config
  397.            FileTypes
  398.       Fragments.
  399.       Sprites
  400.       Templates
  401.  
  402.    Obviously, files may be added/deleted/altered to/from/in the 'AtomTypes'
  403. and 'Fragments' libraries, and the 'Config' file may be altered, to best
  404. suit your needs.
  405.  
  406.  
  407. Credits
  408. =======
  409.  
  410.    The coordinates for the C60 'Bucky Ball' (actually the vertices of a
  411. truncated icosahedron) came from an excellent desktop polyhedra drawing
  412. program called 'WimpPoly' by K.M. Crennell, via the 'Fortran Friends'
  413. ShareWare library. (Much as I oppose the use of Fortran!).
  414.  
  415.  
  416. Postamble
  417. =========
  418.  
  419.    For more information, about file formats etc, see files inside the 'Docs'
  420. directory in the !Mole application.
  421.  
  422.  
  423.    Any comments, suggestions, bugs or donations can be sent to:
  424.  
  425.    Simon Kilvington,
  426.    46 Mead Road,
  427.    Portishead,
  428.    Bristol,
  429.    BS20 8NY.
  430.  
  431.    or EMAIL to 'srk@uk.ac.southampton', although I will not be there around
  432. Christmas and Easter, during August, or after about 1995 (when my PhD will
  433. be finished, hopefully!).
  434.  
  435.    Donations will ensure you recieve copies of updates and related programs
  436. if/as they are written. Projects currently planned/under development include
  437. a program to convert SMILES strings to Mole files, and a molecular dynamics
  438. simulation that will produce movies of molecules flexing, it will also be
  439. able to minimise structures along the trajectory so giving the preferred
  440. conformations of Mole files, using Fourier transforms it should also be
  441. possible to extract bond vibration frequencies.
  442.    I have no idea when these will be finished as I don't have much time for
  443. programming at the moment (except my PhD stuff), but I see no fundamental
  444. reason why they should not get done eventually.
  445.  
  446.    Right, that's that done, I'm off for a smoke.
  447.    Student life, eh, it's all go!
  448.  
  449.