Flair for FLUKA ***** **** ** ** ** ** ** ** ** ** ** ******* ** **** ** *** *** ** ** ** ** *** ** ** **** ** ** ** ** ** **** * ** ** ** ** ** *** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** *** ** ** ** ** * ** **** * ** * ** ** **** **** *** **** ** ** ** ** for FLUKA **** (c) 2006-xx www: http://www.fluka.org/flair email: Vasilis.Vlachoudis@cern.ch authors: Vasilis Vlachoudis ABOUT ~~~~~ /flair/ n [U,C] natural or instinctive ability to do something well to select or recognize what is best, more useful, etc. Oxford Advanced Dictionary flair is an advanced user friendly interface for FLUKA to facilitate the editing of FLUKA input files, execution of the code and visualization of the output files. It is based entirely on python and Tkinter. Flair provides the following functionality: 1. front-end interface for an easy and almost error free editing as well as validation of the input file during editing; 2. interactive geometry editor and debugger 3. debugging, compiling, running and monitoring of the status during a run; 4. back-end interface for post-processing of the output files and plot generation through an interface with gnuplot or 3D photo-realistic images with povray; 5. library of materials and geometrical objects, for easier editing, storing and sharing among other users and projects; 6. python API for manipulating the input files, post processing of the results and interfacing to gnuplot; The philosophy of flair interface was to work on an intermediate level. Not too high, that hides the inner functionality of FLUKA from the user, and not so low that the user is in constant need of the FLUKA manual to verify the options for each card. Flair works directly with the input file of FLUKA and is able to read/write all acceptable FLUKA input formats. In the input editor the user is working directly with the FLUKA cards using a small dialog for each card. The program displays the card information in an interpreted human readable way. The only exception is that the cards in flair are so called extended cards where each card is not composed only by 6 WHATs and 1 SDUM but rather they contains all related information in one unit (comments preceding the card, continuation cards, titles etc). REFERENCES ~~~~~~~~~~ - V.Vlachoudis "FLAIR: A Powerful But User Friendly Graphical Interface For FLUKA" Proc. Int. Conf. on Mathematics, Computational Methods & Reactor Physics (M&C 2009), Saratoga Springs, New York, 2009 URL: http://www.fluka.org/flair/Flair_MC2009.pdf Installation of flair ===================== Dependencies: ~~~~~~~~~~~~~ The Flair programs requires 1. The python interpreter http://www.python.org V2.4 or greater. 2. Tkinter, usually shipped together with the python interpreter In Fedora distributions it exists as a separate package. In this case install it with the command (as superuser) $ yum -y install tkinter In Debian/Ubuntu the package is under the name python-tk 3. Tcl/tk (http://www.tcl.tk) version V8.4 or greater 4. Development libraries to compile the geoviewer C++ 5. For plot creation: gnuplot version V4.0 or greater All the commands below require superuser permissions. RPM Installation: ~~~~~~~~~~~~~~~~~ The recommended way of installation the program on rpm systems is the following: Download the rpm package from FLUKA or flair web site and issue the command as super user or sudo: $ rpm -ivh flair-X-XX.noarch.rpm On distributions like Suse, Ubuntu etc. the package tkinter is called python-tk. Please verify that you have installed the required packages and then issue the command $ rpm -ivh --nodeps flair-X-XX.noarch.rpm Debian Installation: ~~~~~~~~~~~~~~~~~~~~ On debian based systems like Ubuntu, Debian, please use the .deb package. Perform the installation with the following command $ dpkg -i flair_X-XX_all.deb Tarball Installation: ~~~~~~~~~~~~~~~~~~~~~ Download from FLUKA or flair web site the latest version $ flair-X-XX.tgz and expand it in a temporary directory $ tar xzvf flair-X-XX.tgz or $ gunzip -c flair-X-XX.tgz | tar xvf - finally install the program with (superuser permissions are required to install in a system folder) To install to the default folder /usr/local/flair $ sudo make install install-bin install-mime Add the option DESTDIR=/any/folder to install to any folder of your choice SVN Installation: ~~~~~~~~~~~~~~~~~ You can always check out the latest development version of flair from the SVN server. Just be careful that since it is the development version, it could be unstable in some cases. Download from SVN Repository using Anonymous access: $ svn co http://svnweb.cern.ch/guest/flair/trunk/flair $ svn co http://svnweb.cern.ch/guest/flair/trunk/geoviewer or via the web interface http://svnweb.cern.ch/world/wsvn/flair/trunk/ Installation of flair-geoviewer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ flair-geoviewer is an addition to flair for editing, viewing and debugging FLUKA geometries. The geometry viewer being a C++ program requires building for the system to be installed. flair-geoviewer has minimum requirements on third party libraries, which they have to be installed for the compilation In the following instructions the prefix: rpm: refers to rpm based systems like Fedora, Redhat, SLC deb: refers debian based systems like Ubuntu, Debian,... 1. Install the c++/g++ compiler if not present rpm: $ yum install gcc-c++ deb: $ apt-get install gcc-c++ 2. Install the development libraries of tk, tcl, python and x11 Depending on the system they can have the name tk-devel or tk-dev or tk8.x-dev tcl-devel, tcl-dev or tcl8.x-dev with x being the appropriate release of tk python-devel or python-dev rpm: $ yum -y install tk-devel python-devel or $ yum -y install tk-dev python-dev deb: $ apt-get install tk-dev python-dev 3. Compile the program rpm: rpmbuild --rebuild flair-geoviewer-X.XX-X.src.rpm if the rpmbuild program is missing install the package $ yum -y install rpm-build In one of the last lines of the build it will display the location of the newly created rpm file. Install the rpm using the command (by appropriately substituting the location of the rpm) $ rpm -ivh ~/rpmbuild/RPMS/i368/flair-geoviewer-X.XX-X.i386.rpm On all other systems untar and compile the program manually: $ tar xzvf flair-geoviewer-X.XX-X.tgz $ cd flair-geoviewer $ make $ make install The default destination directory is /usr/local/flair If you want to install in a different directory $ make DESTDIR=/my/directory install Starting flair ~~~~~~~~~~~~~~ * Programs Menu - Click the flair icon from the programs menu. Flair is registered under the Science/Physics category Note: freedesktop decides where to place this category based on your linux distribution and window manager (gnome/kde...) Typical places: Applications Edutainment Edutainment / Science Scientific Other * File Window Manager (only via RPM or DEB installation): Flair makes an association of the following extensions: {img:project.gif} *.flair {img:input.gif} *.fluka, *.inp Double click the icon and the program will start * Console Type the command /usr/local/bin/flair It is recommended to place in your PATH the /usr/local/bin directory inside the .login, .profile or .bash_profile depending the shell you are using csh/tcsh: in the ~/.login add the line setenv path (/usr/local/bin) sh/ksh: in the .profile add the line export PATH=$PATH:/usr/local/bin bash: in the .bash_profile add the line export PATH=$PATH:/usr/local/bin Programs ~~~~~~~~ Flair will install the following programs located in the /usr/local/bin/ directory - flair flair program - fm FLUKA manual - pt Periodic Table - fless Fluka output viewer F1.6} Version Numbering Flair version numbering, has the form: flair-M.m-R M: Major version, this number is increased by one only when a major modification in the structure of the program takes place. During the initial phase of development is 0. m: Minor version, this number is increased by one every time an addition in the program's functionality is made. e.g. Adding new plotting forms, mechanism, databases etc. R: Patch level, this number is increased when bug fixes take place or minor changes in the functionality. e.g. Addition of extra fields in a form etc. The About Dialog of the program displays the Major and minor version as well the CVS release number, every time changes in the program are committed to the CVS server. The Update dialog of flair will ask the user to check on the web every 30 days (default) for a new flair version (M.m) and FLUKA release. Copyright and User License ~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright Vasilis.Vlachoudis@cern.ch for the European Organization for Nuclear Research (CERN) All rights not expressly granted under this license are reserved. Installation, use, reproduction, display of the software ("flair"), in source and binary forms, are permitted free of charge on a non-exclusive basis for internal scientific, non-commercial and non-weapon-related use by non-profit organizations only. For commercial use of the software, please contact the main author Vasilis.Vlachoudis@cern.ch for further information. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. DISCLAIMER ~~~~~~~~~~ THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT HOLDERS AND THE AUTHORS MAKE NO REPRESENTATION THAT THE SOFTWARE AND MODIFICATIONS THEREOF, WILL NOT INFRINGE ANY PATENT, COPYRIGHT, TRADE SECRET OR OTHER PROPRIETARY RIGHT. LIMITATION OF LIABILITY ~~~~~~~~~~~~~~~~~~~~~~~ THE COPYRIGHT HOLDERS AND THE AUTHORS SHALL HAVE NO LIABILITY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA OR PROFITS, OR BUSINESS INTERRUPTION, HOWEVER CAUSED AND ON ANY THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.