C2110 UNIX and programming Lesson 4 / Module 1 -1C2110 UNIX and programming Petr Kulhanek kulhanek@chemi.muni.cz National Center for Biomolecular Research, Faculty of Science Masaryk University, Kamenice 5, CZ-62500 Brno PS / 2020 Distance form of teaching: Rev1 Lesson 4 / Module 1 C2110 UNIX and programming Lesson 4 / Module 1 -2Desktop Environment ➢ GNOME ➢ Standard Applications ➢ Command Line ➢ Scientific and Technical Applications C2110 UNIX and programming Lesson 4 / Module 1 -3GNOME - Standard Applications Search Main menu Firefox firefox Web browser LibreOffice libreoffice Text editor (Writer), spreadsheet (Calc) presentation (Impress) Gimp gimp raster graphics editor Inkscape inkscape vector graphics editor Okular okular PDF document viewer the name of the command that starts the application on the command line C2110 UNIX and programming Lesson 4 / Module 1 -4Customize Quick Access C2110 UNIX and programming Lesson 4 / Module 1 -5Exercise 1 1. Create a remote VNC session on a WOLF cluster (see separate presentation). Start the VNC server with the option --fullgui. 2. Run the program Gimp using the GNOME menu. In the program, draw a house with only one stroke. Fill the resulting triangles with different colors. 3. Run the program Inkscape. Draw the flag of the Czech Republic in the program. Try to estimate the fundamental difference between the programs Inkscape and Gimp. 4. Run the program LibreOffice. Display the sine function in the range 0 to 360˚ in the spreadsheet. C2110 UNIX and programming Lesson 4 / Module 1 -6- Terminals The command line is accessible directly from text terminals. In the X11 graphical environment, it is necessary to run a suitable application emulating a text terminal: ➢ gnome-terminal (Terminal) ➢ console (console) ➢ xterm (XTerm) xterm console simple, standard on all UNIX systems The default directory is: /home/username simple, yet highly configurable gnome terminal C2110 UNIX and programming Lesson 4 / Module 1 -7Command Line [kulhanek@wolf ~]$ username computer name current directory (~ means home directory /home/username) Prompt - type of user / prompt ($ regular user, # super user, other possible %, >) place for command The command is executed by pressing a key Enter. Copying text: Do not use Ctrl + C! To copy text from the terminal, just highlight the text, press the mouse wheel to paste it (mouse middle button). Autocomplete: by pressing the Tab key the command line interpreter tries to complete the spelled word. Command names, paths and file names are added (if one press does not cause anything, there are more options for completion, repeated press will display them). History: Use the up and down arrow keys to scroll through the list of commands you have already entered. Command from history can be reused or modified and the modified one used. The history is also accessible by command history. C2110 UNIX and programming Lesson 4 / Module 1 -8File Manager !!!! do not use !!!! Hard training, easy battle. During exercises, unless stated otherwise, use only the command line. Graphical interfaces are usually not available in supercomputer centers. OK File managers: GNOME: nautilus KDE: dolphin C2110 UNIX and programming Lesson 4 / Module 1 -9Scientific and Technical Applications Overview of available applications: $ module $ module versions vmd Overview of available module versions: Module activation: $ module add vmd Launch the application from the module vmd $ vmd Scientific and technical applications, which are installed in several versions (application version, compilation type, parallel version), are available in the form modules. Before using the application, the relevant module must be activated. $ module add vmd: 1.9.0 the version number is separated from the module name by a colon activates the default version of the module is entered on the command line, text is typed without $ sign module and application names do not have to be the same $ module help vmd Module documentation: C2110 UNIX and programming Lesson 4 / Module 1 -10Exercise 2 1. Open a terminal in the GNOME GUI on a WOLF cluster. Try gnome-terminal (Terminal), konsole (Konsole), xterm (Xterm). Choose one for further work. 2. Run the Inkscape program from the terminal. Type "inkscape“ into the terminal and press Enter. 3. What happens if you type "Inkscape“? 4. View all available modules. 5. What is the module vmd for? 6. With program vmd, open the file struktura.pdb (L2.M4.C2.U1). 7. What is the module Nemesis for? 8. Activate module "Nemesis“ and run the program nemesis. 9. In the program, model an acetic acid molecule and optimize its geometry. C2110 UNIX and programming Lesson 4 / Module 1 -11Exercise 3 1. Open a new terminal in the GNOME GUI on the WOLF cluster. 1. Print the contents of the variable PATH (echo $PATH). 2. Print directories in PATH on individual lines. 3. Is application Nemesis available in the terminal (type, which)? 4. Add a module Nemesis. 5. Write the contents of the variable PATH. 6. In which directory is the application Nemesis located?