Sim2Oogl 1.0 in a Nutshell

[Portrait of a Programmer as a Young Man]

What is Sim2Oogl?

Sim2Oogl is a C programme that converts Tipsy, ZENO or P files into a format which is readable by the 3D visualisation tool Geomview. It was primarily written to aid work on the simulation of galaxy mergers, but it can be generally applied to any simulation which produces output of the types mentioned above.

How can it be executed?

Sim2Oogl can either be run from the command line with arguements passed to it, or it can be invoked through Geomview as an external module.

When running sim2oogl from the command line, the basic syntax is:

% sim2oogl input_filename input_file_type output_file_type
or explicitly:
% sim2oogl input_filename [SNAP|ZENO|P] [POS|VEL|PVEL|PVEC|ALL]
where:
input_filename is the name of the input file. sim2oogl currently recognises:
Zeno input files with a .dat extension
SNAP/Tipsy files with either a .data.gz, .data.Z or .data extension
P files with no extenstion
input_file_type is the type of input file. This can be P, ZENO or SNAP; note that these are case sensitive.
output_file_type is the form that the output files will take. There are several choices:
POS which produces position coordinates; the output can be found in filename_rootxyz.
VEL which produces velocity coordinates; the output can be found in filename_rootVxVyVz.
PVEL which produces the three observables X, Y and Vz, the radial velocity (in the Z direction); the output can be found in filename_rootxyVz.
PVEC which produces position coordinates with their velocity vectors superposed; the output can be found in filename_rootxyzVxVyVz.
ALL which produces all of the four above output files.
Once again, the output options are case sensitive.

When running Sim2Oogl as an external module in Geomview, you must first modify the ~/.geomview file with the following line:

(emodule-define "Sim2Oogl" "path_to_source_directory/Sim2Oogl") 
When you next invoke geomview, you will notice an additional external module - Sim2Oogl. Click on it and you will see the Sim2Oogl user interface open, as shown below. (Click
here for a screenshot).

The same basic options apply as when running from the command line. In this case, there are two lists: the lefthand list will give a listing of the directory. By clicking on an item in this list it will be moved to the right hand list.

If you wish to convert this item, ensuring that you have chosen the correct input file type and selected an appropriate output file type, simply double click on it with the left mouse button. This selects the file; you must then hit the run button on the bottom panel to proceed with the conversion.

If you wish to remove it from the right hand list, highlight it with a single click of the left mouse button then, making sure to hold down the shift key, single click again with the left mouse button.

Multiple files of different input filetypes and with different outtypes files can be converted in one fell swoop. Simply select each file to be converted in the right hand list with the appropriate filetype selected in the upper panel. When all the files have been selected, simply hit run and Sim2Oogl will sequentially convert each file that was selected.

It should be noted that at this stage, if Sim2Oogl encounters an error in the conversion process that it will exit.

How can the output be viewed?

The output is in a format which is readable by Geomview. For example, if you convert the snap file r201_000.data.Z and have chosen to view the output in terms of position coordinates, pos, the output file will be placed in the file r201_000xyz. If you are running Sim2Oogl as an external module, you can open this file for viewing by simply loading it through the Geomview Files panel. If you are running sim2oogl from the command line, then simply type:
 % geomview r201_000xyz
When you run Sim2Oogl as an external module, you must be in the directory in which the files you wish to convert are placed. The output files can also be found in the working directory.

Downloading Sim2Oogl

Sim2Oogl may be downloaded from here as a gzipped tarfile. The programme was written and compiled under redhat 6.0, but I do not anticipate any problems as regards compilation.

Sim2Oogl will create a directory called Sim2Oogl in which all the necessary files can be found. There will be a Makefile called SimBuild which can be edited to the users needs. To build, simply type:

% make -f SimBuild Sim
The tk user interface, Sim2Oogl, requires a little user modification; this basically entails setting the correct paths. Follow the comments to conduct the necessary changes. The directory listing should look something like this.

When Sim2Oogl has been unpacked and built, for convenience, modify your path to include the source directory containing sim2oogl and Sim2Oogl. It is important to edit your ~/.geomview file with the appropriate (emodule-define) otherwise Sim2Oogl will not appear as an external module. Also it is advisable to run sim2oogl in the directory in which the files to be converted are to found. This is not essential in the case of the command line programme, but at present it is a requirement for the external module.


Chris Power

Last updated 3rd September 1999

N-Body Simulations of the Antennae