User Tools

Site Tools


exercises:2016_summer_school:geometry_and_cell_optimization

Differences

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

Link to this comparison view

Next revision
Previous revision
Next revisionBoth sides next revision
exercises:2016_summer_school:geometry_and_cell_optimization [2016/08/22 21:12] – created ibethuneexercises:2016_summer_school:geometry_and_cell_optimization [2016/08/23 06:57] ibethune
Line 4: Line 4:
  
 <code> <code>
-#!/bin/bash +#!/bin/bash --login 
-#+#PBS -N cp2k 
 +#PBS -l select=1 
 +#PBS -l walltime=0:20:
 +#PBS -A y14 
 + 
 +cd $PBS_O_WORKDIR 
 +module load cp2k
  
 for ii in 2 4 6 8 10 12 for ii in 2 4 6 8 10 12
 do do
    sed -e "s/MY_SUPERCELL/${ii}/g" template.inp > input_${ii}.inp    sed -e "s/MY_SUPERCELL/${ii}/g" template.inp > input_${ii}.inp
-   cp2k.popt input_${ii}.inp > NaCl_supercell_${ii}.out+   aprun -n 2 cp2k.popt input_${ii}.inp > NaCl_supercell_${ii}.out
 done done
 </code> </code>
  
-where the template input is this geometry optimization using the classical forcefield FIST module of CP2K.+where the template input ''template.inp'' is this geometry optimization using the classical forcefield FIST module of CP2K.  You will also need to initial geometry file ''NaCl.pdb''.
  
 <code> <code>
Line 90: Line 96:
  
 How does the conjugate gradients optimizer compare to LBFGS in efficiency for this system? How does the conjugate gradients optimizer compare to LBFGS in efficiency for this system?
 +
 ====== Cell optimization of NaCl ====== ====== Cell optimization of NaCl ======
  
-For studying many properties of solid materials it is important that the lattice parameters used in a simulation are close to equilibrium for the model chemistry (Hamiltonian) used. Otherwise, large stresses can be present that complicate comparison to experiment. Successful cell optimization requires that the energy changes smoothly with cell volume - and for this the energy cutoff is the most important parameter. The input file template below can be used with driver script to examine how the energy volume curve of NaCl changes with the PW cutoff.+For studying many properties of solid materials it is important that the lattice parameters used in a simulation are close to equilibrium for the model chemistry (Hamiltonian) used. Otherwise, large stresses can be present that complicate comparison to experiment. Successful cell optimization requires that the energy changes smoothly with cell volume - and for this the energy cutoff is the most important parameter. The input file template below ''template.inp'' can be used with driver script to examine how the energy volume curve of NaCl changes with the PW cutoff.
  
 <code> <code>
Line 175: Line 182:
  
 <code> <code>
-#!/bin/bash +#!/bin/bash --login 
-#+#PBS -N cp2k 
 +#PBS -l select=1 
 +#PBS -l walltime=0:20:
 +#PBS -A y14 
 + 
 +cd $PBS_O_WORKDIR 
 +module load cp2k
  
 CUTOFF="280" CUTOFF="280"
Line 187: Line 200:
        
    #this line should changed to point to your cp2k executable    #this line should changed to point to your cp2k executable
-   mpirun -np 2 cp2k.popt input_${ii}.inp > NaCl_${CUTOFF}_${ii}.out+   aprun -2 cp2k.popt input_${ii}.inp > NaCl_${CUTOFF}_${ii}.out
 done done
  
Line 199: Line 212:
 and you can plot the results in your favourite graphing software. and you can plot the results in your favourite graphing software.
  
-What is happening here? Try changing the PW cutoff (defined in the driver script) and using the CELL_REF variable.+What is happening here? Try changing the PW cutoff (defined in the driver script) and using the ''CELL_REF'' variable.
  
-Copy the input template to a new file and change the RUN_TYPE to CELL_OPT. You'll also need to ask the code to calculate the stress tensor (in FORCE_EVAL section) ANALYTICALLY! Also define the CUTOFF and SCALING_FACTOR. Start the cell optimization from small cells (SCALING_FACTOR 0.85) or large cells (SCALING_FACTOR 1.10) - do you get the same results? +Copy the input template to a new file and change the ''RUN_TYPE'' to ''CELL_OPT''. You'll also need to ask the code to calculate the stress tensor (in ''FORCE_EVAL'' section) ''ANALYTICAL''ly! Also define the ''CUTOFF'' and ''SCALING_FACTOR''. Start the cell optimization from small cells (''SCALING_FACTOR 0.85'') or large cells (''SCALING_FACTOR 1.10'') - do you get the same results? 
  
-If you have access a machine with several cores (16 or so ideally) check whether increasing the supercell size (NREP variable) affects the results.+If you are running on ARCHER, use some larger parallel jobs to check whether increasing the supercell size (''NREP'' variable) affects the results.
exercises/2016_summer_school/geometry_and_cell_optimization.txt · Last modified: 2020/08/21 10:15 by 127.0.0.1