User Tools

Site Tools


exercises:2018_uzh_acpc2:installation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
exercises:2018_uzh_acpc2:installation [2018/04/16 13:23] gtocciexercises:2018_uzh_acpc2:installation [2020/08/21 10:15] (current) – external edit 127.0.0.1
Line 11: Line 11:
 </note> </note>
  
- +===== 0.1a Installation of Cygwin on Windows =====
-===== Installation of XCode and XQuartz  on Mac OSX ===== +
- +
-You need to use an X11 serverDownload and install [[https://www.xquartz.org/|XQuartz]] unless you already have it on your machine. +
- +
-Also, you need to install XCode from the apple store or from the following link: [[https://developer.apple.com/xcode/|XCode]]. +
- +
-===== Installation of required software on Windows =====+
  
 If your machine is running windows you will need to install Cygwin. [[http://www.cygwin.com|Cygwin]] is a large collection of GNU and Open Source tools which provides functionality similar to a Linux distribution on Windows.\\ If your machine is running windows you will need to install Cygwin. [[http://www.cygwin.com|Cygwin]] is a large collection of GNU and Open Source tools which provides functionality similar to a Linux distribution on Windows.\\
Line 24: Line 17:
 For 32 bit Windows execute  [[http://cygwin.com/setup-x86.exe|setup_x86.exe]] and follow the rest of directions in the wizard. For 32 bit Windows execute  [[http://cygwin.com/setup-x86.exe|setup_x86.exe]] and follow the rest of directions in the wizard.
  
-For 64 bit Windows[[http://cygwin.com/setup-x86_64.exe|setup_x86_64.exe]] can be used.\\+For 64 bit Windows [[http://cygwin.com/setup-x86_64.exe|setup_x86_64.exe]] can be used.\\
  
 When installing Cygwin make sure you install the following additional packages:\\ When installing Cygwin make sure you install the following additional packages:\\
Line 41: Line 34:
 Please operate according to the wizard to finish the Cygwin installation.\\ Please operate according to the wizard to finish the Cygwin installation.\\
  
 +===== 0.1b Installation of XCode and XQuartz  on Mac OSX =====
  
-===== Software installation and using the terminal =====+If you are running on a Mac OS X you need to install XCode and XQuartz.
  
-Throughout this course you will need to use the terminal or command lineBelow there's a list of basic commands that you will need to useSpend some time to become familiar with them. If you are running windows, you first have to install and run Cygwin, whereas if you are running on a Mac OS X, open the apple terminal.+Download and install [[https://www.xquartz.org/|XQuartz]] unless you already have it on your machine.
  
 +Also, you need to install XCode from the apple store or from the following link: [[https://developer.apple.com/xcode/|XCode]].
 +
 +
 +===== 0.2 Using the terminal =====
 +
 +Throughout this course you will need to use the terminal or command line. Below there's a list of basic commands that you will need to use. Spend some time to become familiar with them. If you have a Mac open the Apple terminal, whereas if you are running Windows, start Cygwin.
  
-Let's start with a list of useful commands  that you need to use in the terminal environment -- just type them into the command line and confirm with ''RETURN''.+Let's start with a list of useful commands that you need to use in the terminal environment -- just type them into the command line and confirm with ''RETURN''.
 <code bash> <code bash>
 ls             # get list of files in the current directory ls             # get list of files in the current directory
Line 58: Line 58:
 </code> </code>
  
-Below you find a command that will open a file using a text editor called vim. You will need to edit input files throughout the course in order to run MD simulations with CP2K. You can use any text editor, vim is one of them. Other text editors, which may be simpler to use, are [[https://atom.io/|Atom]] (plus the [[https://atom.io/packages/line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://notepad-plus-plus.org/|Notepad++]]. +Below you find a command that will open a file using a text editor called vim. You will need to edit input files throughout the course in order to run MD simulations with CP2K. You can use any text editor, vim is one of them. Other text editors, which may be simpler to use, are [[https://atom.io/|Atom]] (plus the [[https://atom.io/packages/line-ending-selector-unix|line-ending-selector-unix]] plugin) or [[https://notepad-plus-plus.org/|Notepad++]].  
- + 
 +In this simple example, we will open a new file with ''vim'', write some text, save and close this file. On the terminal type:
  
 <code bash> <code bash>
Line 65: Line 66:
 </code> </code>
  
-If you are using vim go to insert mode by typing ''i'', then insert some text.+Type ''i'' to go to insert mode, then insert some text.
 Now go to normal mode by typing ''ESC''. In normal mode you can save and quit a file by typing '':wq''. Now go to normal mode by typing ''ESC''. In normal mode you can save and quit a file by typing '':wq''.
 Now copy ''myfile'' to the ''MD_course'' directory using the ''cp'' command. To do this type: Now copy ''myfile'' to the ''MD_course'' directory using the ''cp'' command. To do this type:
Line 74: Line 75:
  
  
-===== CP2K Installation on Windows =====+===== 0.2a CP2K Installation on Windows =====
  
-After having installed Cygwin, follow the steps 2 and 3 on the link below to compile CP2K on windowsWe suggest you to download and install the version 2.6.2 of cp2k.+Visit [[http://sourceforge.net/projects/cp2k/files/|sourceforge CP2K project page]] and download ''cp2k-2.6.2.tar.bz2''.\\ 
 +Unpack the compressed ''tar.bz2'' file by using the following command from within a Cygwin terminal:\\ 
 +<code> 
 +tar -xvf cp2k-2.6.2.tar.bz2 
 +</code>
  
-[[https://www.cp2k.org/howto:compile_on_windows_with_cygwin#cygwin_installation | Cygwin and CP2K installation on Windows ]]+After the code has been extracted you will find it in the directory ''cp2k-2.6.2''.
  
-If you find ''cp2k.sopt'' in ''cp2k-2.x.x/exe'' directory, then compilation is successfully done+In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use. 
 +Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Cygwin-i686-gfortran.sopt''
  
 +Copy the following lines and paste into the newly opened ''Cygwin-i686-gfortran.sopt'' file:\\
 +<file>
 +CC       = cc
 +CPP      = 
  
-===== CP2K Installation on Mac OS X =====+FC       gfortran 
 +LD       gfortran 
 + 
 +AR       ar -r 
 + 
 +CPPFLAGS  
 +DFLAGS   -D__GFORTRAN -D__FFTSG 
 +FCFLAGS  = -g -O2 -ffast-math -funroll-loops -ftree-vectorize -march=native -ffree-form $(DFLAGS)  
 +LDFLAGS  = $(FCFLAGS)  
 +LIBS     = -llapack -lblas 
 + 
 +OBJECTS_ARCHITECTURE = machine_gfortran.o 
 +</file> 
 +Save this file (again if you use vim type ''ESC'' and then ':wq').\\ 
 +Finally change directory to ''cp2k-2.6.2/makefiles''. Run the ''make'' command as follows in order to compile cp2k:\\ 
 +<code> 
 +make ARCH=Cygwin-i686-gfortran VERSION=sopt 
 +</code> 
 + 
 +If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done. 
 + 
 +===== 0.2b CP2K Installation on Mac OS X ===== 
 + 
 +Visit [[http://sourceforge.net/projects/cp2k/files/|sourceforge CP2K project page]] and download ''cp2k-2.6.2.tar.bz2''.\\ 
 +Unpack the compressed ''tar.bz2'' file by using the following command from the Apple terminal:\\ 
 +<code> 
 +tar -xvf cp2k-2.6.2.tar.bz2 
 +</code> 
 + 
 +After the code has been extracted you will find it in the directory ''cp2k-2.6.2''
 + 
 +In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use. 
 +Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Darwin-IntelMacintosh-gfortran.sopt'', copy and paste the following lines into this file. 
 + 
 +<file> 
 +CC       = gcc 
 +CPP      = 
 +FC       = gfortran 
 +LD       = gfortran 
 +AR       = ar -r 
 +RANLIB   = ranlib 
 +DFLAGS   = -D__NO_STATM_ACCESS -D__ACCELERATE 
 +FCFLAGS  = -O2 -ffast-math -funroll-loops \ 
 +           -ftree-vectorize -ffree-form $(DFLAGS) 
 +LDFLAGS  = $(FCFLAGS) 
 +LIBS     = -framework Accelerate 
 + 
 +</file> 
 +Save it as ''Darwin-IntelMacintosh-gfortran.sopt'' in the ''cp2k-2.6.2/arch'' directory alongside the other ARCH files.\\ 
 +Launch the Terminal and change the working directory to ''cp2k-2.6.2/makefiles''. Type make command as follows:\\ 
 +<code> 
 +make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt 
 +</code> 
 +It may take quite a while until a compilation is completed.  
 +  
 +If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done.
  
-[[https://www.cp2k.org/howto:compile_on_mac | CP2K installation on Mac OS X]] +===== 0.3 First CP2K simulation ===== 
-===== First CP2K simulation ===== +It is possible to run cp2k from any directory on your own machine by adding a line to your ''.bashrc'' file, without having to specify the location of the ''cp2k.sopt'' file
-It is possible to run cp2k from any directory your own machine by adding a line to your ''.bashrc'' file, without having to specify the location of the binary+
  
-To do this go to the directory where the binary is located and type ''pwd''. Copy the output of this command and edit the ''.bashrc'' file located on your home directory:+To do this change to the directory where the ''cp2k.sopt'' binary is located and type ''pwd''. Copy the output of this command and edit the ''.bashrc'' file located on your home directory:
 To edit the ''.bashrc'' file type To edit the ''.bashrc'' file type
 <code> <code>
Line 150: Line 214:
 You just ran a short Molecular Dynamics trajectory of liquid argon.  You just ran a short Molecular Dynamics trajectory of liquid argon. 
  
-===== Visualization with VMD =====+ 
 +===== 0.4 Visualization with VMD =====
  
 We will visualize this trajectory with VMD, a molecular visualization program. First of all, download and install VMD for your operating system as indicated [[http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD|here]]. We will visualize this trajectory with VMD, a molecular visualization program. First of all, download and install VMD for your operating system as indicated [[http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD|here]].
Line 164: Line 229:
  
 {{:exercises:2018_uzh_acpc2:argon_liq_first_sim.png?400 |}} {{:exercises:2018_uzh_acpc2:argon_liq_first_sim.png?400 |}}
 +
 +
 +===== 0.5 Plotting tools =====
 +
 +Throughout the course you will also need to plot some graphs. You can use any tool you like for that. ''gnuplot'' and ''Xmgrace'' are two programmes often used in Linux environments that are rather easy to use, but you can also use ''MS Office'', ''Numbers'', the plotting library of python ''Matplotlib'', etc. Take care to install any of these software on your machine as needed.
  
exercises/2018_uzh_acpc2/installation.1523885024.txt.gz · Last modified: 2020/08/21 10:15 (external edit)