1¾ written by Jim Vito Copyright (c) James Vito 1994 ***************************************************************************** This is a beta-version of this application..... I would appreciate any suggestions or criticism regarding the running of this program. Please let me know if any of the documentation is unclear. Jim Vito 378 E. Duane Ave. Sunnyvale, CA 94086 javito@netcom.com ********************************************************************************* If you have not installed the program yet... run install.com from the a: prompt. You can just copy the files to a directory of your choice if you like. I am experimenting with install routines..... so I have decided to include one. enough said..... ********************************************************************************* FILES CONTAINED: JMR.EXE - The main rendering executable file. BUCKY.COO DODECA.COO PAGODANE.COO DECAPRIS.COO ANATOXIN.COO - Various molecular coordinate data files. These files are the data files for five molecules. The format of these files is explained below. Thanks to Dr. R. Disch at Queens College for all of the included coordinate files. ATOMIC.DEF - A file containing the size and color values for the atoms. This is a text file which can be edited as to your liking. Any file name will do. ! Note: The file structure and ordering should not be changed. VALID.JJV - This file contains various other image rendering attributes that can be modified to your liking. (eg. light sources, ambient light, phong values, etc..) This will be explained below. ! Note: The file structure and ordering should not be changed. Why VALID.JJV ? No matter..... its up to you. Any file with any extension will be fine. JMR_X.BAT JMR_Y.BAT JMR_Z.BAT - A sample batch file that can be used to generate a series of targa images needed to make an .flc film file. Note how the /t file names are consecutive. This will enable DTA to sequence the image frames. This skeleton can be used to easily generate any film of your choice. ****************************************************************************************** ****************************************************************************************** DTA207.ZIP - Dave's Targa Animation Utility. This is an application created by David Mason. It can be used to create some interesting molecular animation files. I have included some batch routines for doing this. AAPLAYHI.ZIP WAAPLAY.ZIP - Autodesk Animation Utility. This program can be used to play the animation files created with DTA. AAPLAYHI for dos WAAPLAY for windows. NOTE !! -- THESE APPLICATIONS DO HAVE COPYRIGHTS. ONE SHOULD TREAT THESE AS TOTALLY SEPARATE PROGRAMS FROM JMR. ONE SHOULD READ THE DOC FILES AND GIVE CREDIT WHERE IT IS DUE.!! BOTH UTILITIES CAN BE FOUND ON I-NET archie -r animate These may not be included on i-net version of JMR. ****************************************************************************************** I have some Arj animations available for many molecules. Extract them with the multiple volume feature of Arj. ex. arj e arjvolume /v If you would like me to generate an animation file for a particular molecule... Send me the coordinate data file along with atomic and render files. ****************************************************************************************** This program requires a math coprocessor to run. HOW IT WORKS: (CONTROL FILES DESCRIBED) JMR uses a ray tracing algorithm to generate a 3-d image of a series of spheres defined in the coordinate input file. The nature of the image can be controlled through the changing of various attributes. The image attributes are kept in two different files, atomic.def valid.jjv ATOMIC.DEF Atomic.def holds the data for the different atoms to be rendered. The format is as follows: example.... H .4532 1 0 0 C 1.100 0 1 0 etc..... each line in the file contains a character for an atom. Only the atoms listed can be rendered in an image. H, C, N, O, P S. **definition of each line** H - Just a character to indicate the atom hydrogen .4532 - The atomic radius of the atom. The units should be in scale with the units used to describe the coordinates in the data file. 64 bits precision. 1 0 0 - The red green blue contribution for the color of the atom. These values should be between 0 - 1. 64 bits precision. NOTE:: The attribute numbers can be modified but the file structure and atoms included cannot ! DEFAULT: see default.def No time spent on this file. Probably will render a bad picture. Atomic.def is better and should be specified on the command line. VALID.JJV Render.jjv holds the data for the image rendering characteristics. A sample of this file is listed as follows: VIEWER 300 300 1000 AMBIENT .4950 .4950 .4950 LIGHT .490 1300 700 1200 1 1 1 LIGHT 0 -600 -300 1200 1 1 1 LIGHT 0 700 -500 1200 1 1 1 LIGHT 0 1800 0 1200 1 1 1 LIGHT 0 0 1300 1200 1 1 1 PHONG_KS .8 PHONG_N 10 BACKGROUND 0 0 0 OBJECT_DISTANCE 600 VIEWER 300 300 1000 - This defines the viewers x y z position. The x y center along with some +z position is generally appropriate. 64-bit floating point precision. If .jjv file is not specified, xy center 1000 units from the origin on the z-axis. The origin is defined at the lower left corner of the image. Send some mail if you need more coord system info. AMBIENT .4950 .4950 .4950 - This defines the ambient light on the atoms. The ambient light has red green and blue components. The above values code for white light with the intensity of .4950. A user can experiment with colors and intensity. This value defines the background light. This light will illuminate the atoms, but will not give any sort of point light source effect. 64-bit floating point precision. LIGHT .490 1300 700 1200 1 1 1 - This defines a light source intensity, position and color. These values can also be modified by the user. It is important to note that a light source has no radius and should not be defined in a position that can be viewed. Shading can be controlled through the modification of this parameter. There is a limit of 5 light sources which can be defined. NOTE: One should not omit any of these light sources. A zero for the intensity will turn off all contribution of the light source. All 64-bit floating point precision. PHONG_KS .8 - Phong specular reflection value. This will control how much light will be reflected from the atom surface. As of yet there is no implementation for the modification of the specular reflection for the atoms individually... 64-bit floating point precision. PHONG_N 10 - This is the Phong n-value. This parameter will control the size of the spot the light source leaves on the atom surface. One can change this 0-200 or so.... Play around and check out the results. 64-bit floating point precision. OBJECT_DISTANCE 600 - This value define the distance to translate the molecule into the screen. This value should be at least,.... greater than both the height and width. 64-bit floating point precision. This will be along the z-axis in the negative direction. Be sure that the full image is set into the screen. Floating point exceptions will occur otherwise. DEFAULT: see default.jjv No time spent on this file. Probably will render a bad picture. Valid.jjv is better and should be specified on the command line. COORDINATE DATA FILE FORMAT The coordinate data file contains all of the coordinates and atomic numbers of each of the atoms in the molecule. The format of the file is as follows: each line in the file will contain an atomic# followed by 3 coordinate values. The data file bucky.coo can be viewed to see how this looks. an example of a line for a carbon atom is as follows: 6 -1.0083373949 3.3257470212 -0.7326000000 The data file can contain up to 200 of these lines..limiting images to 200 atoms. All coordinates are in 64-bit floating point precision format. RENDERING AN IMAGE: Command Line Parameters: (order and case sensitivity not an issue) /ifilename - input filename. (no particular extension required) /tfilename - output filename. (please give a .tga extension) /h - image height. Default = 400 /w - image width. Default = 400 > All image scaling is done by the program > The full image will always be seen. > No matter the dimensions specified. /x - x rotational value. Integer. Default=0. /y - y rotational value. Integer. Default=0. /z - z rotational value. Integer. Default=0. All rotation is around the origin. /ffilename - atomic definition file to be used. (can be omitted..) If omitted will use default values specified in default.def. This file does not require a .def extension...but why not? see atomic.def for structure. /cfilename - image attribute filename. If omitted will use default values specified in default.jjv. see valid.jjv for structure. -- When an image is rendering you will see dots across the screen. -- each dots indicate a width scan line. -- you can then get run time approximations. -- at 80 dots/line an 800x800 image will go thru 10 lines of dots before -- completion. ********SOME COMMAND-LINE EXAMPLES***************** jmr /ibucky.coo /tbucky.tga /h400 /w400 Render a 400x400 image of coords in bucky.coo to bucky.tga using default attribute and atomic definitions. jmr /ibucky.coo /tbucky_two.tga /h300 /w400 /fbucky.def /cbucky.jjv Render a 300x400 image of coords in bucky.coo to bucky_two.tga using the atomic definitions in bucky.def and the render attributes in bucky.jjv. jmr /ibucky.coo /tbucky1.tga /h400 /w400 /x35 /z71 /cbucky.jjv Render a 400x400 image of coords in bucky.coo to bucky1.tga using the attributes in bucky.jjv and rotate 35 degrees around the x-axis and 71 degrees around the z-axis. see JMR_X.BAT to get an idea on how a series of targa images can be rendered to create, with DTA, a molecular rotation file which can be played with the Autodesk animator. NOTE: A full 72 frame series of 480x480 will require 50-60 MB of free HD space. Render time ..... 5-10 hours on 486DX2/66. Depends on coordinate file. about 5 minute render time per frame. ****************************************************************************** Feel free to distribute this file in its complete form. If you plan to use the output files in a presentation, journal, business or commercial purpose.... You must obtain a registered copy. $30 will get you a registered copy. Registered users will also get a discount on future revisions and upgrades of this package. If you find this program useful... or would like to see future improvement.. any Donations will be gladly appreciated. If you would like the application modified for a specific application please let me know. Send ideas,....checks, computer hardware, etc.. to the address specified above. Please Mail : Name Address Phone e-mail address. I can then notify you about any new revisions..fixes..etc. I am presently working on a full featured ball and stick illumination model. point exceptions will occur otherwise. DEFAULT: see default.jjv € each line in the file will contain an atomic# followed by 3  data file bucky.coo can be viewed to see how this looks. an example of a line for a carbon atom is as