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 14:17] 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 =====
  
-===== Using the terminal =====+If you are running on a Mac OS X you need to install XCode and XQuartz. 
 + 
 +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. 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.
Line 74: Line 75:
  
  
-===== CP2K Installation on Windows =====+===== 0.2a CP2K Installation on Windows =====
  
-Visit [[http://sourceforge.net/projects/cp2k/files/|sourceforge CP2K project page]] and download any of ''cp2k-2.6.2.tar.bz2''.\\+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:\\ Unpack the compressed ''tar.bz2'' file by using the following command from within a Cygwin terminal:\\
 <code> <code>
Line 87: Line 88:
 Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Cygwin-i686-gfortran.sopt'' Change directory to ''cp2k-2.6.2/arch''. Once you are in this directory open a new file called ''Cygwin-i686-gfortran.sopt''
  
-An example CP2K ARCH file for a serial build of CP2K on Cygwin is as follows:\\+Copy the following lines and paste into the newly opened ''Cygwin-i686-gfortran.sopt'' file:\\
 <file> <file>
 CC       = cc CC       = cc
Line 113: Line 114:
 If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done. If you find ''cp2k.sopt'' in ''cp2k-2.6.2/exe'' directory, then compilation is successfully done.
  
-===== CP2K Installation on Mac OS X =====+===== 0.2b CP2K Installation on Mac OS X =====
  
-[[https://www.cp2k.org/howto:compile_on_mac | 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''.\\ 
-===== First CP2K simulation ===== +Unpack the compressed ''tar.bz2'' file by using the following command from the Apple terminal:\\ 
-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+<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. 
 + 
 +===== 0.3 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
  
-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 180: 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 194: 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.1523888234.txt.gz · Last modified: 2020/08/21 10:15 (external edit)