Presentation is loading. Please wait.

Presentation is loading. Please wait.

Understanding the Basics of Computational Informatics 2014. Summer School, Hungary, Szeged Methos L. Müller.

Similar presentations


Presentation on theme: "Understanding the Basics of Computational Informatics 2014. Summer School, Hungary, Szeged Methos L. Müller."— Presentation transcript:

1 Understanding the Basics of Computational Informatics 2014. Summer School, Hungary, Szeged Methos L. Müller

2 2 Department of Chemical Informatics Summer School Szeged, 2014. May 13. Table of contents Introduction to the Linux environment Login to the cluster Basic commands Upload the input files Submit a GAUSSIAN job to the cluster Getting back the result Downloading the outputs Scripts for collecting data

3 3 Department of Chemical Informatics Introduction to the Linux environment Unix is a multitasking, multi-user computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs. Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. Linus Torvalds developed the first Linux operating system at October 5, 1991. Linus Torvalds Summer School Szeged, 2014. May 13.

4 4 Department of Chemical Informatics Introduction to the Linux environment Famous linux distros: Summer School Szeged, 2014. May 13.

5 5 Department of Chemical Informatics Introduction to the Linux environment We are using Ubuntu on the cluster. Summer School Szeged, 2014. May 13.

6 6 Department of Chemical Informatics Login to the cluster The IP address of the cluster: 160.114.81.18 Login to the cluster: ssh username@160.114.81.18 For example: ssh mullerl@160.114.81.18 Summer School Szeged, 2014. May 13.

7 7 Department of Chemical Informatics Basic commands man ­ shows all information about the command ­­help ­ shows the available options for that command mkdir – make directories Usage: mkdir [OPTION] DIRECTORY... ls – list directory contents Usage: ls [OPTION]... [FILE]... ls *.txt – prints all text files cd – changes directories Usage: cd [DIRECTORY] pwd – print name of current working directory Summer School Szeged, 2014. May 13.

8 8 Department of Chemical Informatics Basic commands cp – copy files and directories Usage: cp [OPTION]... SOURCE DEST mv – move (rename) files Usage: mv [OPTION]... SOURCE DEST mc – Midnight Commander (File manager mcedit – The Midnight Commander’s file editor top – display top CPU processes Summer School Szeged, 2014. May 13.

9 9 Department of Chemical Informatics Basic commands rm ­ remove files Usage: rm [OPTION]... FILE... find – search for files in a directory hierarchy Usage: find [OPTION] [path] [pattern] history – prints recently used commands Usage: history cat – concatenate files and print on the standard output Usage: cat [OPTION] [FILE]... awk ­ pattern scanning and processing language Summer School Szeged, 2014. May 13.

10 10 Department of Chemical Informatics Basic commands qhost Summer School Szeged, 2014. May 13.

11 11 Department of Chemical Informatics Basic commands qstat qdel job_id – Delete a job qdel –u username – Delete all job Summer School Szeged, 2014. May 13.

12 12 Department of Chemical Informatics Upload the input file Summer School Szeged, 2014. May 13.

13 13 Department of Chemical Informatics Upload the input file Summer School Szeged, 2014. May 13.

14 14 Department of Chemical Informatics Submit a GAUSSIAN job to the cluster Usage: subg09.sh clusterName procNum queue inpFileName clusterName - the name of the cluster you want your job to run on. It MUST be one of: jgypk, niifszeged or niifpecs! procNum - number of processors you want GAUSSIAN09 to run on. This parameter is depending on the cluster. queue - it must be "short" (8 hours), "normal" (24 hours), long (72 hours) or "neverend" (no limits). Don't use the quotes(")! Just one of the words: short, normal, long, or neverend! subg09.sh subg09.sh jgypk 8 neverend g09 input_file.com Summer School Szeged, 2014. May 13.

15 15 Department of Chemical Informatics Submit a GAUSSIAN job to the cluster application - the GAUSSIAN09 related application's name. It can be one of: g09 inpFileName - input filename for GAUSSIAN09, it MUST end with either.com or.inp extension The input file must NOT contain any NProc, NProcShared or Rwf statement! Checkpoint files are handled automatically. subg09.sh jgypk 8 neverend g09 input_file.com Summer School Szeged, 2014. May 13.

16 16 Department of Chemical Informatics Getting back the result Input file The result Report file about the calculation Report file about the scratch Summer School Szeged, 2014. May 13.

17 17 Department of Chemical Informatics Downloading the outputs Summer School Szeged, 2014. May 13.

18 18 Department of Chemical Informatics Scripts for collecting data Find and print all of the values in a file. Content of the collect.sh file: #!/bin/bash # collecting the data awk '/Maximum Force/ {print}' filename.log Run the script: bash collect.sh Summer School Szeged, 2014. May 13.

19 19 Department of Chemical Informatics Scripts for collecting data Use variables in the command Content of the variable.sh file: #!/bin/bash variable=10 echo $variable Run the script: bash variable.sh Summer School Szeged, 2014. May 13.

20 20 Department of Chemical Informatics Scripts for collecting data for loop syntax: for { variable name } in { list } do execute one for each item in the list until the list is not finished (And repeat all statement between do and done) done for i in 1 2 3 4 5 do echo "Welcome $i times" done for i in {1..5} do echo "Welcome $i times" done Summer School Szeged, 2014. May 13.

21 21 Department of Chemical Informatics Scripts for collecting data List all of the.out files in the folder #!/bin/bash # the file extension what we want to use InPutExt=out for InPutName in `ls -1 *.$InPutExt` do # print the name of the files with the extension echo $InPutName done exit Summer School Szeged, 2014. May 13.

22 22 Department of Chemical Informatics Scripts for collecting data Run a commands from a variable #!/bin/bash # the file extension what we want to use InPutExt=out for InPutName in `ls -1 *.$InPutExt` do result=`awk '/NSTEP/ {print $3}' $InPutName` echo $result done exit Summer School Szeged, 2014. May 13.

23 23 Department of Chemical Informatics Thank you for your kind attention! Summer School Szeged, 2014. May 13.


Download ppt "Understanding the Basics of Computational Informatics 2014. Summer School, Hungary, Szeged Methos L. Müller."

Similar presentations


Ads by Google