User Tools

Site Tools


exercises:2021_uzh_acpc2:installation

Differences

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

Link to this comparison view

Next revision
Previous revision
exercises:2021_uzh_acpc2:installation [2021/04/13 11:02] – external edit 127.0.0.1exercises:2021_uzh_acpc2:installation [2021/04/14 12:30] (current) – [Part II: Loading and running a program] Update VMD instructions mrossmannek
Line 8: Line 8:
  
 <code> <code>
-module avail+module avail
 </code> </code>
  
-while using+To list all modules which are currently loaded use:
  
 <code> <code>
-module list+module list
 </code> </code>
- 
-gives the list of loaded moules. 
  
 To load the CP2K module used in this course, use: To load the CP2K module used in this course, use:
  
 <code> <code>
-module load cp2k/6.1-gcc-7.3.1-d43qc6l+module load cp2k/8.1-intel-20.0.2-gimphmw
 </code> </code>
  
Line 28: Line 26:
  
  
-you can run cp2k from any directory. To do this enter+You can run cp2k from any directory. To do this enter
 <code> <code>
 cp2k.popt --help cp2k.popt --help
Line 36: Line 34:
  
 <code> <code>
- cp2k.sopt [-c|--check] [-e|--echo] [-h|--help] [--html-manual]+ cp2k.popt [-c|--check] [-e|--echo] [-h|--help]
            [-i] <input_file>            [-i] <input_file>
            [-mpi-mapping|--mpi-mapping] <method>            [-mpi-mapping|--mpi-mapping] <method>
            [-o] <output_file>            [-o] <output_file>
-           [-r|-run] [--xml]+           [-r|-run] [-s|--shell] [--xml]
  
  starts the CP2K program, see <https://www.cp2k.org/>  starts the CP2K program, see <https://www.cp2k.org/>
  
- The easiest way is cp2k.sopt <input_file>+ The easiest way is cp2k.popt <input_file>
  
  The following options can be used:  The following options can be used:
  
-  -i <input_file>   : provides an input file name, if it is the last +  -i <input_file>      : provides an input file name, if it is the last 
-                      argument, the -i flag is not needed +                         argument, the -i flag is not needed 
-  -o <output_file>  : provides an output file name [default: screen]+  -o <output_file>     : provides an output file name [default: screen]
  
  These switches skip the simulation, unless [-r|-run] is specified:  These switches skip the simulation, unless [-r|-run] is specified:
  
-  --check, -c       : performs a syntax check of the <input_file> +  --check, -c          : performs a syntax check of the <input_file> 
-  --echo, -e        echos the <input_file>, and make all defaults explicit +  --echo, -e           echoes the <input_file>, and make all defaults explicit 
-                      The input is also checked, but only a failure is reported +                         The input is also checked, but only a failure is reported 
-  --help, -h        : writes this message +  --help, -h           : writes this message 
-  --html-manual     : writes a HTML reference manual of the CP2K input +  --license            : prints the CP2K license 
-                      in the current directory. The file index.html is a good +  --mpi-mapping        : applies a given MPI reordering to CP2K 
-                      starting point for browsing +  --run, -r            : forces a CP2K run regardless of other specified flags 
-  --license         : prints the CP2K license +  --shell, -s          : start interactive shell mode 
-  --mpi-mapping     : applies a given MPI reordering to CP2K +  --version, -v        : prints the CP2K version and the revision number 
-  --run, -r         : forces a CP2K run regardless of other specified flags +  --xml                : dumps the whole CP2K input structure as a XML file 
-  --version, -v     : prints the CP2K version and the SVN revision number +                         xml2htm generates a HTML manual from this XML file 
-  --xml             : dumps the whole CP2K input structure as a XML file +  --set, -E name=value : set the initial value of a preprocessor value
-                      xml2htm generates a HTML manual from this XML file+
 </code> </code>
  
-Now, make a new directory, for instance called ''exercise0''. Download and extract the file {{ :exercises:2019_uzh_acpc2:argon.zip |argon.inp}} into this directory and run cp2k by typing+Now, make a new directory, for instance called ''exercise0''and change into it: 
 +<code> 
 +mkdir exercise0
  
-To download the file and extract the zip:+cd exercise0 
 +</code> 
 + 
 +Download and extract the file {{ :exercises:2019_uzh_acpc2:argon.zip |argon.inp}} into this directory:
 <code> <code>
 wget https://www.cp2k.org/_media/exercises:2019_uzh_acpc2:argon.zip wget https://www.cp2k.org/_media/exercises:2019_uzh_acpc2:argon.zip
Line 78: Line 80:
  
 unzip argon.zip unzip argon.zip
- 
 </code> </code>
  
 +Finally, you can run cp2K by typing:
 <code> <code>
 cp2k.popt -i argon.inp -o out_ex0.out cp2k.popt -i argon.inp -o out_ex0.out
 </code> </code>
  
-To run cp2k with MPI, for instance with 2 CPUone can use+To run cp2k with MPI, for instance with 2 CPUsyou can use:
 <code> <code>
 mpirun -n 2 cp2k.popt -i argon.inp -o out_ex0.out mpirun -n 2 cp2k.popt -i argon.inp -o out_ex0.out
 </code> </code>
  
-You just ran a short Molecular Dynamics trajectory of liquid argon. +You just ran a short Molecular Dynamics trajectory of liquid argon
 +Now, let's look at the results.
  
  
Line 99: Line 102:
  
  
-We need for visualization is [[http://www.ks.uiuc.edu/Research/vmd/|VMD]].+The software we need for visualization is [[http://www.ks.uiuc.edu/Research/vmd/|VMD]].
  
-Load the respective module (since there is only one version available, the shorthand ''vmd'' can be used when specifying the module to load) and start it using:+You can either use our provided installation on ''tcopt7'' if you followed the setup-instructions to use graphical programs from the server, or you have to install VMD on your local machine yourself.
  
 +=== Starting VMD on ''tcopt7'' ===
 +
 +Load the respective module:
 +<code>
 +module load vmd/1.9.3-gcc-7.5.0-pxvond2
 +</code>
 +
 +Pay **attention** to load the correct version of VMD (i.e. ''1.9.3'') because any other module may not work as expected.
 +
 +You can start ''VMD'' by typing:
 <code> <code>
-vmd+vmd
 </code> </code>
  
-Two new windows named ''VMD Main'' and ''VMD 1.9.... Display'' should open on your local machine while the server shows:+Two new windows named ''VMD Main'' and ''VMD 1.9.... Display'' should open on your local machine while the server shows:
  
 <code> <code>
-Info) VMD for LINUXAMD64, version 1.9.(December 292014+Info) VMD for LINUXAMD64, version 1.9.(November 302016
-Info) http://www.ks.uiuc.edu/Research/vmd/                          +Info) http://www.ks.uiuc.edu/Research/vmd/ 
-Info) Email questions and bug reports to vmd@ks.uiuc.edu            +Info) Email questions and bug reports to vmd@ks.uiuc.edu 
-Info) Please include this reference in published work using VMD:    +Info) Please include this reference in published work using VMD: 
-Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual   +Info)    Humphrey, W., Dalke, A. and Schulten, K., `VMD - Visual
 Info)    Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38. Info)    Molecular Dynamics', J. Molec. Graphics 1996, 14.1, 33-38.
 Info) ------------------------------------------------------------- Info) -------------------------------------------------------------
-Info) Multithreading available, 32 CPUs detected. +Info) Multithreading available, 48 CPUs detected. 
-Info) Free system memory: 256213MB (99%) +Info)   CPU features: SSE2 AVX AVX2 FMA 
-Warning) Detected a mismatch between CUDA runtime and GPU driver +Info) Free system memory: 214GB (85%)
-Warning) Check to make sure that GPU drivers are up to date.+
 Info) No CUDA accelerator devices available. Info) No CUDA accelerator devices available.
 Warning) Detected X11 'Composite' extension: if incorrect display occurs Warning) Detected X11 'Composite' extension: if incorrect display occurs
 Warning) try disabling this X server option.  Most OpenGL drivers Warning) try disabling this X server option.  Most OpenGL drivers
 Warning) disable stereoscopic display when 'Composite' is enabled. Warning) disable stereoscopic display when 'Composite' is enabled.
-libGL error: failed to load driver: swrast +Info) OpenGL renderer: llvmpipe (LLVM 11.0.1, 256 bits
-libGL error: Try again with LIBGL_DEBUG=verbose for more details. +Info)   Features: STENCIL MSAA(4) MDE CVA MTX NPOT PP PS GLSL(OVFS) 
-Info) OpenGL renderer: GeForce GTX 760 (192-bit)/PCIe/SSE2 +Info)   Full GLSL rendering mode is available. 
-Info)   Features: STENCIL MSAA(4) MDE MTX NPOT PP PS  +Info)   Textures: 2-D (16384x16384), 3-D (512x512x512), Multitexture (8)
-Info)   GLSL rendering mode is NOT available. +
-Info)   Textures: 2-D (16384x16384), 3-D (2048x2048x2048), Multitexture (4)+
 Info) Dynamically loaded 2 plugins in directory: Info) Dynamically loaded 2 plugins in directory:
-Info) /sw/build/generic/app/vmd/vmd-1.9.2/lib/vmd/plugins/LINUXAMD64/molfile+Info) /sw-ng/spack/opt/spack/linux-opensuse_leap15-sandybridge/gcc-7.5.0/vmd-1.9.3-pxvond2pthsd3gubsorb4sqfsj22av7w/lib64/plugins/LINUXAMD64/molfile
 vmd > vmd >
 </code> </code>
  
-If you only get the output on the server but not the 2 windows there is something wrong with your setup and you should check the lecture notes again. You can exit VMD by either closing the ''VMD Main'' or by giving the ''quit'' command at the ''vmd >'' prompt:+If you only get the output on the server but not the 2 windows there is something wrong with your setup and you should check the setup instructions again. 
 +You can exit VMD by either closing the ''VMD Main'' or by giving the ''quit'' command at the ''vmd >'' prompt:
  
 <code> <code>
Line 144: Line 155:
 <note tip>The module loading is **not** persistent. You have to reload the modules every time you log back in.</note> <note tip>The module loading is **not** persistent. You have to reload the modules every time you log back in.</note>
  
 +=== Installing VMD on your **local** machine ===
  
 +Simply download and install VMD for your operating system as indicated [[http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=VMD|here]].
  
 +If you are using MacOS Catalina and are experiencing issue, please download VMD from [[https://www.dropbox.com/s/700vi9kkpglf6m6/VMD%201.9.4a38.zip?dl=0|here]], instead.
  
-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]].The current official release doesn't support MacOS Catalina. For those who have Catalina OS, please download VMD [[https://www.dropbox.com/s/700vi9kkpglf6m6/VMD%201.9.4a38.zip?dl=0|here]]. 
  
 +=== Getting the input data ===
 +
 +Before you can try out VMD, we must get some data to visualize.
 +For now, we simply want to view all the Argon atoms from our previous simulation.
 +To do so, we need to extract their coordinates from the input file.
 +The easiest solution to this, is to copy them into an [[https://en.wikipedia.org/wiki/XYZ_file_format|XYZ coordinate file]]:
 +<code>
 +cp argon.inp argon.xyz
 +</code>
 +Now, you must remove everything but the atoms coordinates.
 +You should end up with 108 lines in your file, each containing the coordinate of a single Ar atom.
 +
 +To make this a fully functional ''XYZ'' file, you must change the top of the file to be the following:
 +  - The number of atoms on the first line
 +  - A blank line (or a comment)
 +  - The rest of the file
 +<code>
 +108
 +
 +Ar -8.53869012951987116 -15.5816257770688615 2.85663672298278293
 +...
 +</code>
 +
 +=== Using VMD ===
 +
 +Now, we are ready for our first visualization with VMD.
  
 Open VMD. From ''File -> New molecule...'' open the file with the ''.xyz'' extension. Go to ''Graphics -> Representations..'' and change the Drawing Method to VDW. On the VMD shell type the following commands to define the unit cell of the system and wrap the atoms back to their original unit cell. Open VMD. From ''File -> New molecule...'' open the file with the ''.xyz'' extension. Go to ''Graphics -> Representations..'' and change the Drawing Method to VDW. On the VMD shell type the following commands to define the unit cell of the system and wrap the atoms back to their original unit cell.
Line 156: Line 195:
 pbc wrap -all pbc wrap -all
 </code> </code>
 +
 +<note tip>''pbc'' stands for //periodic boundary conditions// and you can also find the box edge lengths in the input file under ''FORCE_EVAL/SUBSYS/CELL/ABC''</note>
 +
 +<note tip>
 +If you prefer to load the file and set the drawing methods via commands, you can do the following:
 +<code>
 +mol new argon.xyz
 +mol modstyle 0 0 vdw
 +</code>
 +The first commands loads the file ''argon.xyz''.
 +The second command assumes this is the first file you load (the first index ''0'') and that this file contains only a single molecule (the second index ''0'').
 +</note>
  
 A snapshot of the molecular dynamics trajectory should approximately look like this: A snapshot of the molecular dynamics trajectory should approximately look like this:
  
 {{:exercises:2018_uzh_acpc2:argon_liq_first_sim.png?400 |}} {{:exercises:2018_uzh_acpc2:argon_liq_first_sim.png?400 |}}
- 
- 
  
 =====  Plotting tools ===== =====  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 programs 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. 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 programs 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/2021_uzh_acpc2/installation.1618311776.txt.gz · Last modified: 2021/04/13 11:02 by 127.0.0.1