exercises:2018_uzh_acpc2:installation
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
exercises:2018_uzh_acpc2:installation [2018/04/16 13:23] – gtocci | exercises:2018_uzh_acpc2:installation [2018/04/16 15:18] – [0.3 First CP2K simulation] gtocci | ||
---|---|---|---|
Line 4: | Line 4: | ||
<note tip> | <note tip> | ||
- | First of all, you have to make sure that your Windows | + | First of all, you have to make sure that your Windows or Mac machine |
- | \\ | + | |
\\ | \\ | ||
If your machine is running a Mac OS X, you will need to install XQuartz and XCode. | If your machine is running a Mac OS X, you will need to install XQuartz and XCode. | ||
- | \\ | ||
\\ | \\ | ||
If instead it is running on Windows you will need to install Cygwin. | If instead it is running on Windows you will need to install Cygwin. | ||
</ | </ | ||
- | + | ===== 0.1a Installation of Cygwin | |
- | ===== Installation of XCode and XQuartz | + | |
- | + | ||
- | You need to use an X11 server. Download and install [[https:// | + | |
- | + | ||
- | Also, you need to install XCode from the apple store or from the following link: [[https:// | + | |
- | + | ||
- | ===== Installation of required software | + | |
If your machine is running windows you will need to install Cygwin. [[http:// | If your machine is running windows you will need to install Cygwin. [[http:// | ||
Line 26: | Line 17: | ||
For 32 bit Windows execute | For 32 bit Windows execute | ||
- | For 64 bit Windows[[http:// | + | For 64 bit Windows [[http:// |
When installing Cygwin make sure you install the following additional packages:\\ | When installing Cygwin make sure you install the following additional packages:\\ | ||
Line 43: | 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 | ||
- | ===== Software installation | + | 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 line. Below there' | + | Download and install [[https:// |
+ | Also, you need to install XCode from the apple store or from the following link: [[https:// | ||
+ | |||
+ | |||
+ | ===== 0.2 Using the terminal ===== | ||
+ | |||
+ | Throughout this course you will need to use the terminal or command line. Below there' | ||
- | Let's start with a list of useful commands | + | 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 '' |
<code bash> | <code bash> | ||
ls # get list of files in the current directory | ls # get list of files in the current directory | ||
Line 60: | Line 58: | ||
</ | </ | ||
- | 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:// | + | 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:// |
- | + | ||
+ | In this simple example, we will open a new file with '' | ||
<code bash> | <code bash> | ||
Line 67: | Line 66: | ||
</ | </ | ||
- | If you are using vim go to insert mode by typing | + | Type '' |
Now go to normal mode by typing '' | Now go to normal mode by typing '' | ||
Now copy '' | Now copy '' | ||
Line 76: | 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 windows. We suggest you to download and install | + | Visit [[http:// |
+ | Unpack | ||
+ | < | ||
+ | tar -xvf cp2k-2.6.2.tar.bz2 | ||
+ | </ | ||
- | [[https:// | + | After the code has been extracted you will find it in the directory '' |
- | If you find '' | + | In order to compile |
+ | Change directory to '' | ||
+ | Copy the following lines and paste into the newly opened '' | ||
+ | < | ||
+ | CC = cc | ||
+ | CPP = | ||
- | ===== CP2K Installation on Mac OS X ===== | + | FC = gfortran |
+ | LD = gfortran | ||
+ | |||
+ | AR = ar -r | ||
+ | |||
+ | CPPFLAGS | ||
+ | DFLAGS | ||
+ | FCFLAGS | ||
+ | LDFLAGS | ||
+ | LIBS = -llapack -lblas | ||
+ | |||
+ | OBJECTS_ARCHITECTURE = machine_gfortran.o | ||
+ | </ | ||
+ | Save this file (again if you use vim type '' | ||
+ | Finally change directory to '' | ||
+ | < | ||
+ | make ARCH=Cygwin-i686-gfortran VERSION=sopt | ||
+ | </ | ||
+ | |||
+ | If you find '' | ||
+ | |||
+ | ===== 0.2b CP2K Installation on Mac OS X ===== | ||
+ | |||
+ | Visit [[http:// | ||
+ | Unpack the compressed '' | ||
+ | < | ||
+ | tar -xvf cp2k-2.6.2.tar.bz2 | ||
+ | </ | ||
+ | |||
+ | After the code has been extracted you will find it in the directory '' | ||
+ | |||
+ | In order to compile cp2k one has to specify an arch file to indicate which compilers and libraries to use. | ||
+ | Change directory to '' | ||
+ | |||
+ | < | ||
+ | CC = gcc | ||
+ | CPP = | ||
+ | FC = gfortran | ||
+ | LD = gfortran | ||
+ | AR = ar -r | ||
+ | RANLIB | ||
+ | DFLAGS | ||
+ | FCFLAGS | ||
+ | | ||
+ | LDFLAGS | ||
+ | LIBS = -framework Accelerate | ||
+ | |||
+ | </ | ||
+ | Save it as '' | ||
+ | Launch the Terminal and change the working directory to '' | ||
+ | < | ||
+ | make ARCH=Darwin-IntelMacintosh-gfortran VERSION=sopt | ||
+ | </ | ||
+ | It may take quite a while until a compilation is completed. | ||
+ | |||
+ | If you find '' | ||
- | [[https:// | + | ===== 0.3 First CP2K simulation ===== |
- | ===== First CP2K simulation ===== | + | It is possible to run cp2k from any directory |
- | It is possible to run cp2k from any directory your own machine by adding a line to your '' | + | |
- | To do this go to the directory where the binary is located and type '' | + | To do this change |
To edit the '' | To edit the '' | ||
< | < | ||
Line 152: | 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:// | 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:// | ||
Line 166: | Line 229: | ||
{{: | {{: | ||
+ | |||
+ | |||
+ | ===== 0.5 Plotting tools ===== | ||
+ | |||
+ | Throughout the course you will also need to plot some graphs. You can use any tool you like for that. '' | ||
exercises/2018_uzh_acpc2/installation.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1