1%
2% $Id$
3%
4\label{sec:pspw}
5
6\newcounter{algcounter}[chapter]
7\def\thealgcounter{\thechapter.\arabic{algcounter}}
8\newenvironment{algorithm}[1]
9               { \refstepcounter{algcounter}
10                \begin{center}
11                  {\bf Algorithm} \thealgcounter: #1
12                \end{center}
13               \begin{center}\begin{enumerate} \begin{em}}
14               {\end{em}\end{enumerate}\end{center}}
15
16
17The NWChem plane-wave (NWPW) module uses pseudopotentials and
18plane-wave basis sets to perform Density Functional Theory
19calculations.  This module complements the capabilities of the more
20traditional Gaussian function based approaches by having an accuracy at least as good
21for many applications, yet is still fast enough to treat systems containing hundreds of
22atoms.  Another significant advantage is its ability to simulate
23dynamics on a ground state potential surface directly at run-time
24using the Car-Parrinello algorithm.  This method's efficiency and
25accuracy make it a desirable first principles method of simulation in
26the study of complex molecular, liquid, and solid state systems.
27Applications for this first principles method include the calculation
28of free energies, search for global minima, explicit simulation of
29solvated molecules, and simulations of complex vibrational modes that
30cannot be described within the harmonic  approximation.
31
32The NWPW module is a collection of three modules.
33\begin{itemize}
34   \item PSPW - (PSeudopotential Plane-Wave) A gamma point code for
35     calculating molecules, liquids, crystals, and  surfaces.
36   \item Band - A band structure code for calculating
37     crystals and surfaces with small band gaps (e.g. semi-conductors
38     and metals).
39   \item PAW - a (gamma point) projector augmented plane-wave code
40     for calculating molecules, crystals, and surfaces
41\end{itemize}
42The PSPW, Band, and PAW modules can be used to compute the energy and  optimize the
43geometry.  Both the PSPW and Band modules can also be used to find saddle points, and
44compute numerical second derivatives.  In addition the PSPW module can also be used
45to perform Car-Parrinello molecular  dynamics.
46
47Section \ref{sec:pspw_tasks} describes the tasks contained within the
48PSPW module, section \ref{sec:band_tasks} describes the tasks
49contained within the Band module, section \ref{sec:paw_tasks} describes
50the tasks contained within the PAW module, and section \ref{sec:psp_library}
51describes the pseudopotential library included with NWChem.  The
52datafiles used by the PSPW module are described in section
53\ref{sec:pspw_data}.  Car-Parrinello output data files are described
54in section \ref{sec:pspw_cp_data}, and the minimization and
55Car-Parrinello algorithms are described in
56% sections \ref{sec:pspw_Minimize}-\ref{sec:pspw_Car-Parrinello}.
57section \ref{sec:pspw_Car-Parrinello}.
58Examples of how
59to setup and run a PSPW geometry optimization, a Car-Parrinello
60simulation, a band structure minimization, and a PAW geometry
61optimization are presented in sections \ref{sec:pspw_sd}, \ref{sec:pspw_cp}, and
62\ref{sec:band_tutorial1}, and \ref{sec:paw_tutorial}.
63Finally in section \ref{sec:pspw_limits} the capabilities and limitations of the NWPW module are  discussed.
64
65If you are a first time user of this module it is recommended that you skip the next five sections and proceed directly to the tutorials in sections
66\ref{sec:pspw_sd}-\ref{sec:paw_tutorial}.
67
68\section{PSPW Tasks}
69\label{sec:pspw_tasks}
70
71All input to the PSPW Tasks is contained within the compound PSPW block,
72\begin{verbatim}
73PSPW
74   ...
75END
76\end{verbatim}
77
78To perform an actual calculation a TASK PSPW directive is used
79(Section \ref{sec:task}).
80\begin{verbatim}
81  TASK PSPW
82\end{verbatim}
83In addition to the directives listed in Section \ref{sec:task}, i.e.
84\begin{verbatim}
85TASK pspw energy
86TASK pspw gradient
87TASK pspw optimize
88TASK pspw saddle
89TASK pspw freqencies
90TASK pspw vib
91\end{verbatim}
92there are additional directives that are specific to the PSPW module, which are:
93\begin{verbatim}
94TASK PSPW [Car-Parrinello             ||
95           pspw_dplot                 ||
96           wannier                    ||
97           psp_generator              ||
98           steepest_descent           ||
99           psp_formatter              ||
100           wavefunction_initializer   ||
101           v_wavefunction_initializer ||
102           wavefunction_expander       ]
103\end{verbatim}
104
105
106Once a user has specified a geometry, the PSPW module can be invoked
107with no input  directives (defaults invoked throughout).  However, the
108user will probably always specify the  simulation cell used in the
109computation, since the default simulation cell is not well suited for
110most systems.  There are sub-directives which allow for customized
111application; those currently provided as options for the PSPW module are:
112\begin{verbatim}
113PSPW
114  CELL_NAME <string cell_name default 'cell_default'>
115  INPUT_WAVEFUNCTION_FILENAME  <string input_wavefunctions  default input_movecs>
116  OUTPUT_WAVEFUNCTION_FILENAME <string output_wavefunctions default input_movecs>
117  FAKE_MASS <real fake_mass default 400000.0>
118  TIME_STEP <real time_step default 5.8>
119  LOOP <integer inner_iteration outer_iteration default 10 100>
120  TOLERANCES <real tole tolc default 1.0e-7 1.0e-7>
121  CUTOFF              <real cutoff>
122  ENERGY_CUTOFF       <real ecut default (see input description)>
123  WAVEFUNCTION_CUTOFF <real wcut default (see input description)>
124  EWALD_NCUT <integer ncut default 1>]
125  EWALD_RCUT <real rcut default (see input description)>
126  XC (Vosko || LDA || PBE96 || revPBE || HF || PBE0 || revPBE0 ||
127     LDA-SIC    || LDA-SIC/2    ||  LDA-0.4SIC    || LDA-SIC/4    || LDA-0.2SIC ||
128     PBE96-SIC  || PBE96-SIC/2  ||  PBE96-0.4SIC  || PBE96-SIC/4  || PBE96-0.2SIC ||
129     revPBE-SIC || revPBE-SIC/2 ||  revPBE-0.4SIC || revPBE-SIC/4 || revPBE-0.2SIC ||
130     default Vosko)
131  DFT||ODFT||RESTRICTED||UNRESTRICTED
132  MULT <integer mult default 1>
133  MULLIKEN
134  EFIELD
135  ALLOW_TRANSLATION
136  CG
137  LMBFGS
138  SCF [Anderson|| simple || Broyden]
139      [CG || RMM-DIIS]
140      [density || potential]
141      [ALPHA real alpha default 0.25]
142      [ITERATIONS integer inner_iterations default 5]
143      [OUTER_ITERATIONS integer outer_iterations default 0]
144
145  SIMULATION_CELL            ... (see input description) END
146  DPLOT                      ... (see input description) END
147  WANNIER                    ... (see input description) END
148  CAR-PARRINELLO             ... (see input description) END
149  PSP_GENERATOR              ... (see input description) END
150  WAVEFUNCTION_INITIALIZER   ... (see input description) END
151  V_WAVEFUNCTION_INITIATIZER ... (see input description) END
152  WAVEFUNCTION_EXPANDER      ... (see input description) END
153  STEEPEST_DESCENT           ... (see input description) END
154
155  MAPPING <integer mapping default 1>
156
157  ROTATION (ON || OFF)
158  TRANSLATION (ON || OFF)
159
160END
161\end{verbatim}
162
163The following list describes the keywords contained in the PSPW input block.
164\begin{itemize}
165        \item $<$cell\_name$>$ - name of
166              the simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
167        \item $<$input\_wavefunctions$>$ - name of the
168              file containing one-electron orbitals
169        \item $<$output\_wavefunctions$>$ - name of the
170              file that will contain the one-electron orbitals at the
171              end of the run.
172        \item $<$fake\_mass$>$ - value for the electronic
173              fake mass ($\mu$). This parameter is not presently used in a
174              conjugate gradient simulation
175        \item $<$time\_step$>$ - value for the time step ($\Delta t$).  This
176              parameter is not presently used in a conjugate gradient simulation.
177        \item $<$inner\_iteration$>$ - number of iterations between the
178              printing out of energies and tolerances
179        \item $<$outer\_iteration$>$ - number of outer iterations
180        \item $<$tole$>$ - value for the energy tolerance.
181        \item $<$tolc$>$ - value for the one-electron orbital tolerance.
182        \item $<$cutoff$>$ - value for the cutoff energy used to define the wavefunction.  In addition
183                             using the CUTOFF keyword automatically sets the cutoff energy for the density
184                             to be twice the wavefunction cutoff.
185        \item $<$ecut$>$ - value for the cutoff energy used
186                           to define the density. Default is set
187                           to be the maximum value that will fit
188                           within the simulation\_cell $<$cell\_name$>$.
189        \item $<$wcut$>$ - value for the cutoff energy used
190                           to define the one-electron orbitals.
191                           Default is set to be the maximum value that
192                           will fit within the simulation\_cell $<$cell\_name$>$.
193        \item $<$ncut$>$ - value for the number of unit cells
194                          to sum over (in each direction) for the real space
195                          part of the Ewald summation. Note Ewald summation
196                          is only used if the simulation\_cell is periodic.
197        \item $<$rcut$>$ - value for the cutoff radius used
198                          in the Ewald summation. Note Ewald summation
199                          is only used if the simulation\_cell is periodic. \\
200                           Default set to be
201                          $\frac{MIN(\left| \vec{a_i} \right|)}{\pi}, i=1,2,3$.
202        \item (Vosko $||$ PBE96 $||$ revPBE $||$ ...) - Choose between Vosko et al's LDA
203                               parameterization or the orginal and revised Perdew, Burke,
204                               and Ernzerhof GGA functional.  In addition, several hybrid options.
205        \item MULT - optional keyword which if specified allows the user to define the spin multiplicity
206                     of the system
207        \item MULLIKEN - optional keyword which if specified
208                         causes a Mulliken analysis to be performed at
209                         the end of the simulation.
210        \item ALLOW\_TRANSLATION - By default the the center of mass forces are projected out of the
211                                  computed forces. This optional keyword if specified allows the
212                                  center of mass forces to not be zero.
213        \item CG - optional keyword which sets the minimizer to 1
214        \item LMBFGS - optional keyword which sets the minimizer to 2
215        \item SCF - optional keyword which sets the minimizer to be a band by band minimizer.  Several
216                    options are available for setting the density or potential mixing, and the type of
217                    Kohn-Sham minimizer.
218        \item SIMULATION\_CELL (see section \ref{sec:pspw_cell})
219        \item DPLOT (see section \ref{sec:pspw_dplot})
220        \item WANNIER (see section \ref{sec:pspw_wannier})
221        \item CAR-PARRINELLO(see section \ref{sec:pspw_CP})
222        \item PSP\_GENERATOR (see section \ref{sec:pspw_psp_generator})
223        \item WAVEFUNCTION\_INITIALIZER (see section \ref{sec:pspw_wavefunction_initializer})
224        \item V\_WAVEFUNCTION\_INITIALIZER (see section \ref{sec:pspw_v_wavefunction_initializer})
225        \item WAVEFUNCTION\_EXPANDER (see section \ref{sec:pspw_wavefunction_expander}).
226        \item STEEPEST\_DESCENT (see section \ref{sec:pspw_steepest_descent})
227
228        \item $<$mapping$>$ - for a value of 1 slab FFT is used, for a value of 2 a 2d-hilbert FFT is used.
229\end{itemize}
230
231A prototype limited memory BFGS (LMBFGS) minimizer can be used to minimize the energy.  To
232use this new optimizer the following SET directive needs to be specified:
233\begin{verbatim}
234set nwpw:mimimizer 1  # Default - Grassman conjugate gradient minimizer is used to minimize the energy.
235set nwpw:mimimizer 2  # Grassman LMBFGS minimimzer is used to minimize the energy.
236set nwpw:minimizer 4  # Stiefel conjugate gradient minimizer is used to minimize the energy.
237set nwpw:minimizer 5  # Band-by-band minimizer is used to minimize the energy.
238\end{verbatim}
239Limited testing suggests that the Grassman LMBFGS minimizer is about twice as fast as
240the conjugate gradient minimizer.  However, there are several known cases
241where this optimizer fails, so it is currently not a default option, and
242should be used with caution.
243
244In addition the following SET directives can be specified:
245\begin{verbatim}
246set nwpw:lcao_skip .false. # Default - initial wavefunctions generated using an LCAO guess.
247set nwpw:lcao_skip .true.  # Initial wavefunctions generated using a random plane-wave guess.
248
249set nwpw:lcao_print .false. # Default - Ouput not produced during the generation of the LCAO guess.
250set nwpw:lcao_print .true.  # Output produced during the generation of the LCAO guess.
251
252set nwpw:lcao_iterations 2  #specifies the number of LCAO iterations
253\end{verbatim}
254
255
256\subsection{Simulation Cell}
257\label{sec:pspw_cell}
258The  simulation cell parameters
259are entered by  defining a simulation\_cell sub-block within the PSPW
260block.  Listed below is the format of a simulation\_cell sub-block.
261\begin{verbatim}
262PSPW
263...
264   SIMULATION_CELL
265      CELL_NAME <string name default 'cell_default'>
266      BOUNDARY_CONDITIONS (periodic || aperiodic default periodic)
267      LATTICE_VECTORS
268        <real a1.x a1.y a1.z default 20.0  0.0  0.0>
269        <real a2.x a2.y a2.z default  0.0 20.0  0.0>
270        <real a3.x a3.y a3.z default  0.0  0.0 20.0>
271      NGRID <integer na1 na2 na3 default 32 32 32>
272   END
273...
274END
275\end{verbatim}
276Basically, the user needs to enter the dimensions, gridding and boundary
277conditions of the simulation cell.  The following list describes the
278input in detail.
279\begin{itemize}
280        \item $<$name$>$ - user-supplied name for the simulation block.
281        \item periodic - keyword specifying that the simulation cell
282                         has periodic boundary conditions.
283        \item aperiodic - keyword specifying that the simulation cell
284                          has free-space boundary conditions.
285        \item $<$a1.x a1.y a1.z$>$ - user-supplied values for the first
286                                   lattice vector
287        \item $<$a2.x a2.y a2.z$>$ - user-supplied values for the second
288                                   lattice vector
289        \item $<$a3.x a3.y a3.z$>$ - user-supplied values for the third
290                                   lattice vector
291        \item $<$na1 na2 na3$>$ - user-supplied values for discretization
292                                along lattice vector directions.
293\end{itemize}
294
295Alternatively, instead of explicitly entering lattice vectors, users can
296enter the unit cell using the standard cell parameters, a, b, c, $\alpha$,
297$\beta$, and $\gamma$, by using the LATTICE block.  The format for input
298is as follows:
299\begin{verbatim}
300PSPW
301...
302   SIMULATION_CELL
303      ...
304      LATTICE
305        [lat_a <real a default 20.0>]
306        [lat_b <real b default 20.0>]
307        [lat_c <real c default 20.0>]
308        [alpha <real alpha default 90.0>]
309        [beta  <real beta  default 90.0>]
310        [gamma <real gamma default 90.0>]
311      END
312      ...
313   END
314...
315END
316\end{verbatim}
317
318
319The user can also enter the lattice vectors of standard unit cells using the
320keywords SC, FCC, BCC, for simple cubic, face-centered cubic, and body-centered cubic
321respectively.  Listed below is an example of the format of this type of input.
322\begin{verbatim}
323PSPW
324...
325   SIMULATION_CELL
326      SC 20.0
327      ....
328   END
329...
330END
331\end{verbatim}
332
333Finally, the lattice vectors from the unit cell can also be defined using
334the fractional coordinate input in the GEOMETRY input (see section \ref{sec:latticeparam}).
335Listed below is an example of the format of this type of input for an 8 atom silicon carbide unit cell.
336\begin{verbatim}
337geometry units au
338  system crystal
339    lat_a 8.277d0
340    lat_b 8.277d0
341    lat_c 8.277d0
342    alpha 90.0d0
343    beta  90.0d0
344    gamma 90.0d0
345  end
346Si    -0.50000d0  -0.50000d0  -0.50000d0
347Si     0.00000d0   0.00000d0  -0.50000d0
348Si     0.00000d0  -0.50000d0   0.00000d0
349Si    -0.50000d0   0.00000d0   0.00000d0
350C     -0.25000d0  -0.25000d0  -0.25000d0
351C      0.25000d0   0.25000d0  -0.25000d0
352C      0.25000d0  -0.25000d0   0.25000d0
353C     -0.25000d0   0.25000d0   0.25000d0
354end
355\end{verbatim}
356
357
358
359\subsection{\tt Unit Cell Optimization}
360\label{sec:pspw_cell_optimization}
361
362The PSPW module using the DRIVER geometry optimizer can optimize a crystal unit cell.
363Currently this type of optimization works only if the geometry is specified in fractional
364coordinates.  The following SET directive is used to tell the DRIVER geometry optimizer to
365optimize the crystal unit cell in addition to the geometry.
366\begin{verbatim}
367set includestress .true.
368\end{verbatim}
369
370\normalsize
371\subsection{\tt DPLOT}
372\label{sec:pspw_dplot}
373The pspw dplot task is used to generate plots of various types of electron
374densities (or orbitals) of a molecule.  The electron density is calculated on the
375specified set of grid points from a PSPW calculation.  The output file
376generated is in the Gaussian Cube format.
377Input to the DPLOT task is contained
378within the DPLOT sub-block.
379\begin{verbatim}
380PSPW
381  ...
382  DPLOT
383     ...
384  END
385  ...
386END
387\end{verbatim}
388To run a DPLOT calculation the following directive
389is used:
390\begin{verbatim}
391TASK PSPW PSPW_DPLOT
392\end{verbatim}
393Listed below is the format of a DPLOT sub-block.
394\begin{verbatim}
395PSPW
396...
397   DPLOT
398     VECTORS <string input_wavefunctions  default input_movecs>
399     DENSITY [total||difference||alpha||beta||laplacian||potential default total] <string density_name no default>
400     ELF [restricted|alpha|beta] <string elf_name no default>
401     ORBITAL <integer orbital_number no default> <string orbital_name no default>
402
403
404     [LIMITXYZ [units <string Units default angstroms>]
405     <real X_From> <real X_To> <integer No_Of_Spacings_X>
406     <real Y_From> <real Y_To> <integer No_Of_Spacings_Y>
407     <real Z_From> <real Z_To> <integer No_Of_Spacings_Z>]
408
409   END
410
411...
412END
413\end{verbatim}
414
415The following list describes the input for the DPLOT
416sub-block.
417
418\begin{verbatim}
419     VECTORS <string input_wavefunctions  default input_movecs>
420\end{verbatim}
421 This sub-directive specifies the name of the molecular orbital file. If the second file is optionally given the density is computed as the difference between the corresponding electron densities. The vector files have to match.
422
423\begin{verbatim}
424     DENSITY [total||difference||alpha||beta||laplacian||potential default total] <string density_name no default>
425\end{verbatim}
426This sub-directive specifies, what kind of density is to be plotted. The known names for total, difference, alpha, beta, laplacian, and potential.
427
428\begin{verbatim}
429     ELF [restricted|alpha|beta] <string elf_name no default>
430\end{verbatim}
431This sub-directive specifies that an electron localization function (ELF) is to be plotted.
432
433\begin{verbatim}
434     ORBITAL <integer orbital_number no default> <string orbital_name no default>
435\end{verbatim}
436This sub-directive specifies the molecular orbital number that is to be plotted.
437
438\begin{verbatim}
439     LIMITXYZ [units <string Units default angstroms>]
440     <real X_From> <real X_To> <integer No_Of_Spacings_X>
441     <real Y_From> <real Y_To> <integer No_Of_Spacings_Y>
442     <real Z_From> <real Z_To> <integer No_Of_Spacings_Z>
443\end{verbatim}
444By default the grid spacing and the limits of the cell to be plotted are defined by the input wavefunctions.  Alternatively the user can use the LIMITXYZ sub-directive to specify other limits.   The grid is generated using No\_Of\_Spacings + 1 points along each direction. The known names for Units are angstroms, au and bohr.
445
446
447
448\subsection{\tt Wannier}
449\label{sec:pspw_wannier}
450The pspw wannier task is generate maximally localized (Wannier) molecular orbitals.  The
451algorithm proposed by Silvestrelli et al is use to generate the Wannier orbitals.  The
452current version of this code works only for cubic cells.
453
454
455Input to the Wannier task is contained within the Wannier sub-block.
456\begin{verbatim}
457PSPW
458  ...
459  Wannier
460     ...
461  END
462  ...
463END
464\end{verbatim}
465To run a Wannier calculation the following directive
466is used:
467\begin{verbatim}
468TASK PSPW Wannier
469\end{verbatim}
470Listed below is the format of a Wannier sub-block.
471\begin{verbatim}
472PSPW
473...
474   Wannier
475     OLD_WAVEFUNCTION_FILENAME <string input_wavefunctions  default input_movecs>
476     NEW_WAVEFUNCTION_FILENAME <string output_wavefunctions default input_movecs>
477   END
478...
479END
480\end{verbatim}
481The following list describes the input for the Wannier
482sub-block.
483\begin{itemize}
484        \item $<$input\_wavefunctions$>$ - name of pspw wavefunction file.
485        \item $<$output\_wavefunctions$>$ - name of pspw wavefunction file that
486              will contain the Wannier orbitals.
487\end{itemize}
488
489
490
491\subsection{\tt Self-Interaction Corrections}
492\label{sec:pspw_SIC}
493
494The SET directive is used to specify the molecular orbitals
495contribute to the self-interaction-correction (SIC) term.
496\begin{verbatim}
497set pspw:SIC_orbitals  <integer list_of_molecular_orbital_numbers>
498\end{verbatim}
499This defines only the molecular orbitals in the list as SIC active.  All
500other molecular orbitals will not contribute to the SIC term.
501
502For example the following directive specifies that the molecular orbitals numbered
5031,5,6,7,8, and 15 are SIC active.
504\begin{verbatim}
505set pspw:SIC_orbitals  1 5:8 15
506\end{verbatim}
507or equivalently
508\begin{verbatim}
509set pspw:SIC_orbitals  1 5 6 7 8 15
510\end{verbatim}
511
512The following directive turns on self-consistent SIC.
513\begin{verbatim}
514set pspw:SIC_relax      .false.  # Default - Perturbative SIC calculation
515set pspw:SIC_relax      .true.   # Self-consistent SIC calculation
516\end{verbatim}
517
518Two types of solvers can be used and they are specified using the following
519SET directive
520\begin{verbatim}
521set pspw:SIC_solver_type 1  # Default - cutoff coulomb kernel
522set pspw:SIC_solver_type 2  # Free-space boundary condition kernel
523\end{verbatim}
524The parameters for the cutoff coulomb kernel are defined by the following
525SET directives:
526\begin{verbatim}
527set pspw:SIC_screening_radius <real rcut>
528set pspw:SIC_screening_power  <real rpower>
529\end{verbatim}
530
531
532
533\subsection{\tt Point Charge Analysis}
534\label{sec:pspw_point_charge_analysis}
535
536The MULLIKEN option can be used to generate derived atomic point charges
537from a plane-wave density.  This analysis is based on a strategy suggested in the work of
538P.E. Blochl, J. Chem. Phys. vol. 103, page 7422 (1995).  In this strategy
539the low-frequency components a plane-wave density are fit to a linear
540combination of atom centered Gaussian functions.
541
542The following SET directives are used to define the fitting.
543\begin{verbatim}
544set pspw_APC:Gc <real Gc_cutoff>  # specifies the maximum frequency component of the density to be used in the fitting in units of au.
545
546set pspw_APC:nga <integer number_gauss> # specifies the the number of Gaussian functions per
547atom.
548
549set pspw_APC:gamma <real gamma_list> # specifies the decay lengths of each atom centered Gaussian.
550\end{verbatim}
551
552We suggest using the following parameters.
553\begin{verbatim}
554set pspw_APC:Gc 2.5
555set pspw_APC:nga 3
556set pspw_APC:gamma 0.6 0.9 1.35
557\end{verbatim}
558
559
560\subsection{\tt Car-Parrinello}
561\label{sec:pspw_CP}
562The Car-Parrinello task is used to perform ab initio molecular dynamics
563using the scheme developed by Car and Parrinello.  In this unified ab
564initio molecular dynamics scheme the motion of the ion cores is coupled to
565a fictitious motion for the Kohn-Sham orbitals of density functional
566theory.  Constant energy or constant temperature simulations can be
567performed.  A detailed description of this method
568is described in section \ref{sec:pspw_Car-Parrinello}.
569
570Input to the Car-Parrinello simulation is contained within the
571Car-Parrinello sub-block.
572\begin{verbatim}
573PSPW
574  ...
575  Car-Parrinello
576     ...
577  END
578  ...
579END
580\end{verbatim}
581To run a Car-Parrinello calculation the following directive is used:
582\begin{verbatim}
583TASK PSPW Car-Parrinello
584\end{verbatim}
585The Car-Parrinello sub-block contains a great deal
586of input, including pointers to data, as well as
587parameter input.  Listed below is the format of a Car-Parrinello sub-block.
588\begin{verbatim}
589PSPW
590...
591   Car-Parrinello
592      CELL_NAME <string cell_name default 'cell_default'>
593      INPUT_WAVEFUNCTION_FILENAME    <string input_wavefunctions    default input_movecs>
594      OUTPUT_WAVEFUNCTION_FILENAME   <string output_wavefunctions   default input_movecs>
595      INPUT_V_WAVEFUNCTION_FILENAME  <string input_v_wavefunctions  default input_vmovecs>
596      OUTPUT_V_WAVEFUNCTION_FILENAME <string output_v_wavefunctions default input_vmovecs>
597      FAKE_MASS <real fake_mass default default 1000.0>
598      TIME_STEP <real time_step default 5.0>
599      LOOP <integer inner_iteration outer_iteration default 10 1>
600      SCALING <real scale_c scale_r default 1.0 1.0>
601      ENERGY_CUTOFF       <real ecut default (see input description)>
602      WAVEFUNCTION_CUTOFF <real wcut default (see input description)>
603      EWALD_NCUT <integer ncut default 1>
604      EWALD_RCUT <real rcut    default (see input description)>
605      XC (Vosko || LDA || PBE96 || revPBE || HF || PBE0 || revPBE0 ||
606          LDA-SIC    || LDA-SIC/2    ||  LDA-0.4SIC    || LDA-SIC/4    || LDA-0.2SIC ||
607          PBE96-SIC  || PBE96-SIC/2  ||  PBE96-0.4SIC  || PBE96-SIC/4  || PBE96-0.2SIC ||
608          revPBE-SIC || revPBE-SIC/2 ||  revPBE-0.4SIC || revPBE-SIC/4 || revPBE-0.2SIC ||
609          default Vosko)
610      [Nose-Hoover <real Period_electron Temperature_electrion Period_ion Temperature_ion
611                          default 100.0 298.15 100.0 298.15>]
612      [SA_decay <real sa_scale_c sa_scale_r default 1.0 1.0>]
613      XYZ_FILENAME <string xyz_filename default XYZ>
614      EMOTION_FILENAME <string emotion_filename default EMOTION>
615      HMOTION_FILENAME <string hmotion_filename default HMOTION>
616      OMOTION_FILENAME <string omotion_filename default OMOTION>
617      EIGMOTION_FILENAME <string eigmotion_filename default EIGMOTION>
618      ION_MOTION_FILENAME <string ion_motion_filename default MOTION>
619
620   END
621...
622
623END
624\end{verbatim}
625The following list describes the input for the Car-Parrinello
626sub-block.
627\begin{itemize}
628        \item $<$cell\_name$>$ - name of the
629              the simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
630        \item $<$input\_wavefunctions$>$ - name of the
631              file containing one-electron orbitals
632        \item $<$output\_wavefunctions$>$ - name of the
633              file that will contain the one-electron orbitals at the
634              end of the run.
635        \item $<$input\_v\_wavefunctions$>$ - name of the file
636              containing one-electron orbital velocities.
637        \item $<$output\_v\_wavefunctions$>$ - name of the
638              file that will contain the one-electron orbital velocities
639              at the end of the run.
640        \item $<$fake\_mass$>$ - value for the electronic
641              fake mass ($\mu$).
642        \item $<$time\_step$>$ - value for the Verlet integration
643               time step ($\Delta t$).
644        \item $<$inner\_iteration$>$ - number of iterations between the
645              printing out of energies.
646        \item $<$outer\_iteration$>$ - number of outer iterations
647        \item $<$scale\_c$>$ - value for the initial velocity
648                              scaling of the one-electron orbital velocities.
649        \item $<$scale\_r$>$ - value for the initial velocity
650                              scaling of the ion velocities.
651        \item $<$ecut$>$ - value for the cutoff energy used
652                           to define the density.  Default is set
653                           to be the maximum value that will fit
654                           within the simulation\_cell $<$cell\_name$>$.
655        \item $<$wcut$>$ - value for the cutoff energy used
656                           to define the one-electron orbitals.  Default is set
657                           to be the maximum value that will fit
658                           within the simulation\_cell $<$cell\_name$>$.
659        \item $<$ncut$>$ - value for the number of unit cells
660                          to sum over (in each direction) for the real space
661                          part of the Ewald summation. Note Ewald summation
662                          is only used if the simulation\_cell is periodic.
663        \item $<$rcut$>$ - value for the cutoff radius used
664                          in the Ewald summation.  Note Ewald summation
665                          is only used if the simulation\_cell is periodic. \\
666                          Default set to be
667                          $\frac{MIN(\left| \vec{a_i} \right|)}{\pi}, i=1,2,3$.
668        \item (Vosko $||$ PBE96 $||$ revPBE $||$ ...) - Choose between Vosko et al's LDA
669                               parameterization or the orginal and revised Perdew, Burke,
670                               and Ernzerhof GGA functional.  In addition, several hybrid options.
671        \item Nose-Hoover - optional subblock which if specified
672                         causes the simulation to perform Nose-Hoover dynamics.
673                         If this subblock is not specified the
674                         simulation performs constant energy dynamics.
675                         See section \ref{sec:pspw_nose} for a description of the parameters.
676                         \begin{itemize}
677                             \item $<$Period\_electron$>$ $\equiv$ $P_{electron}$
678                                    - estimated period for fictitious electron thermostat.
679                             \item $<$Temperature\_electron$>$ $\equiv$ $T_{electron}$
680                                    - temperature for fictitious electron motion
681                             \item $<$Period\_ion$>$ $\equiv$ $P_{ion}$
682                                    - estimated period for ionic thermostat
683                             \item $<$Temperature\_ion$>$ $\equiv$ $T_{ion}$
684                                    - temperature for ion motion
685                         \end{itemize}
686        \item SA\_decay - optional subblock which if specified
687                         causes the simulation to run a simulated annealing simulation.
688                         For simulated annealing to work the Nose-Hoover subblock needs
689                         to be specified.  The initial temperature are taken from the
690                         Nose-Hoover subblock.
691                         See section \ref{sec:pspw_nose} for a description of the parameters.
692                         \begin{itemize}
693                             \item $<$sa\_scale\_c$>$ $\equiv$ $\tau_{electron}$
694                                    - decay rate in atomic units for electronic temperature.
695                             \item $<$sa\_scale\_r$>$ $\equiv$ $\tau_{ionic}$
696                                    - decay rate in atomic units for the ionic temperature.
697                         \end{itemize}
698
699        \item $<$xyz\_filename$>$ - name of the XYZ motion file
700                                generated
701        \item $<$emotion\_filename$>$ - name of the emotion motion file.
702                                See section \ref{sec:pspw_cp_data} for a
703                                description of the datafile.
704        \item $<$hmotion\_filename$>$ - name of the hmotion motion file.
705                                See section \ref{sec:pspw_cp_data} for a
706                                description of the datafile.
707        \item $<$eigmotion\_filename$>$ - name of the eigmotion motion file.
708                                See section \ref{sec:pspw_cp_data} for a
709                                description of the datafile.
710       \item $<$ion\_motion\_filename$>$ - name of the ion\_motion motion file.
711                                See section \ref{sec:pspw_cp_data} for a
712                                description of the datafile.
713       \item MULLIKEN - optional keyword which if specified causes an omotion motion file to be created.
714        \item $<$omotion\_filename$>$ - name of the omotion motion file.
715                                See section \ref{sec:pspw_cp_data} for a
716                                description of the datafile.
717\end{itemize}
718
719When a DPLOT sub-block is specified the following SET directive can be used
720to output dplot data during a Car-Parrinello simulation:
721\begin{verbatim}
722set pspw_dplot:iteration_list <integer list_of_iteration_numbers>
723\end{verbatim}
724The Gaussian cube files specified in the DPLOT sub-block are appended
725with the specified iteration number.
726
727For example, the following directive specifies that at the
7283,10,11,12,13,14,15, and 50 iterations Gaussian cube files are to be produced.
729
730\begin{verbatim}
731set pspw_dplot:iteration_list 3,10:15,50
732\end{verbatim}
733
734\subsection{\tt Adding Geometry Constraints To A Car-Parrinello Simulation}
735\label{sec:pspw_CP_constraint}
736The Car-Parrinello module allows users to freeze the cartesian coordinates
737in a simulation (Note - the Car-Parrinello code recognizes Cartesian
738constraints, but it does not recognize internal coordinate constraints).
739The \verb+SET+ directive (Section \ref{sec:activeatoms}) is used to freeze
740atoms, by specifying a directive of the form:
741\begin{verbatim}
742  set geometry:actlist <integer list_of_center_numbers>
743\end{verbatim}
744This defines only the centers in the list as active.  All other
745centers will have zero force assigned to them, and will remain frozen
746at their starting coordinates during a Car-Parrinello simulation.
747
748For example, the following directive specifies that atoms numbered 1,
7495, 6, 7, 8, and 15 are active and all other atoms are frozen:
750\begin{verbatim}
751  set geometry:actlist 1 5:8 15
752\end{verbatim}
753or equivalently,
754\begin{verbatim}
755  set geometry:actlist 1 5 6 7 8 15
756\end{verbatim}
757
758If this option is not specified by entering a \verb+SET+ directive,
759the default behavior in the code is to treat all atoms as active.  To
760revert to this default behavior after the option to define frozen
761atoms has been invoked, the \verb+UNSET+ directive must be used (since
762the database is persistent, see Section \ref{sec:persist}).  The form
763of the \verb+UNSET+ directive is as follows:
764\begin{verbatim}
765  unset geometry:actlist
766\end{verbatim}
767
768
769In addition, the Car-Parrinello module allows users to freeze bond
770lengths via a Shake algorithm.  The following \verb+SET+ directive
771shows how to do this.
772\begin{verbatim}
773  set nwpw:shake_constraint "2 6 L 6.9334"
774\end{verbatim}
775This input fixes the bond length between atoms 2 and 6 to be
7766.9334 bohrs.  Note that this input only recognizes bohrs.
777
778When using constraints it is usually necessary to turn off
779center of mass shifting. This can be done by the following \verb+SET+ directive.
780\begin{verbatim}
781  set nwpw:com_shift .false.
782\end{verbatim}
783
784\subsection{\tt QM/MM}
785\label{sec:pspw_qmmm}
786A preliminary QM/MM capability that can run Car-Parrinello molecular dynamics  has been integrated
787into the PSPW module.  Currently, the input is  not very robust but it is straightforward.  The first
788step to run a QM/MM simulations is to define the MM atoms in the geometry block.  The MM atoms must be
789at the end of the geometry and a carat, " \^\ ", must be appended to the end of the atom name, e.g.
790\begin{verbatim}
791geometry units angstrom nocenter noautosym noautoz print xyz
792C       -0.000283    0.000106    0.000047
793Cl      -0.868403    1.549888    0.254229
794Cl       0.834043   -0.474413    1.517103
795Cl      -1.175480   -1.275747   -0.460606
796Cl       1.209940    0.200235   -1.310743
797
798O^       0.3226E+01 -0.4419E+01 -0.5952E+01
799H^       0.3193E+01 -0.4836E+01 -0.5043E+01
800H^       0.4167E+01 -0.4428E+01 -0.6289E+01
801O^       0.5318E+01 -0.3334E+01 -0.1220E+01
802H^       0.4978E+01 -0.3040E+01 -0.2113E+01
803H^       0.5654E+01 -0.2540E+01 -0.7127E+00
804end
805\end{verbatim}
806Next the pseudopotentials have be defined for the every type of MM atom contained in the geometry blocks.  The
807following local pseudopotential suggested by Laio, VandeVondele and Rothlisberger can be automatically generated.
808\begin{eqnarray}
809V(\vec{r}) = -Z_{ion}\frac{{r_c}^{n_{\sigma}} - r^{n_{\sigma}}}{-sign(Z_{ion})*{r_c}^{n_{\sigma}+1}-r^{n_{\sigma}+1}}
810\end{eqnarray}
811The following input To define this pseudopo the O\^\ MM atom using the following input
812\begin{verbatim}
813NWPW
814   QMMM
815     mm_psp O^ -0.8476 4 0.70
816   END
817END
818\end{verbatim}
819defines the local pseudopotential for the O\^\  MM atom , where $Z_{ion}=-0.8476$, $n_{\sigma}=4$, and $r_c=0.7$.
820The following input can be used to define the local pseudopotentials for all the MM atoms in the geometry
821block defined above
822\begin{verbatim}
823NWPW
824   QMMM
825     mm_psp O^ -0.8476 4 0.70
826     mm_psp H^  0.4238 4 0.40
827   END
828END
829\end{verbatim}
830Next the Lenard-Jones potentials for the QM and MM atoms need to be defined.  This is done as as follows
831\begin{verbatim}
832NWPW
833   QMMM
834      lj_ion_parameters C  3.41000000d0 0.10d0
835      lj_ion_parameters Cl 3.45000000d0 0.16d0
836      lj_ion_parameters O^ 3.16555789d0 0.15539425d0
837   END
838END
839\end{verbatim}
840Note that the Lenard-Jones potential is not defined for the MM H atoms in this example.
841The final step is to define the MM fragments in the simulation.  MM fragments are a set of
842atoms in which bonds and angle harmonic potentials are defined, or alternatively shake constraints are defined.
843The following input defines the fragments for the two water molecules in the above geometry,
844\begin{verbatim}
845NWPW
846   QMMM
847      fragment spc
848         size 3                  #size of fragment
849         index_start 6:9:3       #atom index list that defines the start of
850                                 # the fragments (start:final:stride)
851
852         bond_spring 1 2    0.467307856 1.889726878  #bond i j    Kspring r0
853         bond_spring 1 3    0.467307856 1.889726878  #bond i j    Kspring r0
854         angle_spring 2 1 3 0.07293966  1.910611932  #angle i j k Kspring theta0
855      end
856   END
857END
858\end{verbatim}
859The fragments can be defined using shake constraints as
860\begin{verbatim}
861NWPW
862   QMMM
863      fragment spc
864         size 3                  #size of fragment
865         index_start 6:9:3       #atom index list that defines the start of
866                                 # the fragments (start:final:stride)
867
868         shake units angstroms 1 2 3 cyclic 1.0 1.632993125 1.0
869      end
870   END
871END
872\end{verbatim}
873Alternatively, each water could be defined independently as follows.
874\begin{verbatim}
875NWPW
876   QMMM
877      fragment spc1
878         size 3                  #size of fragment
879         index_start 6           #atom index list that defines the start of
880                                 #the fragments
881
882         bond_spring 1 2    0.467307856 1.889726878  #bond i j    Kspring r0
883         bond_spring 1 3    0.467307856 1.889726878  #bond i j    Kspring r0
884         angle_spring 2 1 3 0.07293966  1.910611932  #angle i j k Kspring theta0
885      end
886      fragment spc2
887         size 3                 #size of fragment
888         index_start 9          #atom index list that defines the start of
889                                #the fragments
890         shake units angstroms 1 2 3 cyclic 1.0 1.632993125 1.0
891      end
892   END
893END
894\end{verbatim}
895
896
897\subsection{\tt PSP\_GENERATOR}
898\label{sec:pspw_psp_generator}
899A one-dimensional pseudopotential code has been integrated into NWChem.
900This code allows the user to modify and develop pseudopotentials.  Currently,
901only the Hamann and Troullier-Martins norm-conserving pseudopotentials can be
902generated.  In future releases, the pseudopotential library (section \ref{sec:psp_library})
903will be more complete, so that the user will not have explicitly generate
904pseudopotentials using this module.
905
906Input to the PSP\_GENERATOR task is contained within the
907PSP\_GENERATOR  sub-block.
908\begin{verbatim}
909PSPW
910  ...
911  PSP_GENERATOR
912     ...
913  END
914  ...
915END
916\end{verbatim}
917To run a PSP\_GENERATOR calculation the following directive
918is used:
919\begin{verbatim}
920TASK PSPW PSP_GENERATOR
921\end{verbatim}
922Listed below is the format of a PSP\_GENERATOR sub-block.
923\begin{verbatim}
924PSPW
925...
926   PSP_GENERATOR
927      PSEUDOPOTENTIAL_FILENAME: <string psp_name>
928      ELEMENT: <string element>
929      CHARGE: <real charge>
930      MASS_NUMBER: <real mass_number>
931      ATOMIC_FILLING: <integer ncore nvalence>
932      ( (1||2||...) (s||p||d||f||...) <real filling> \
933         ...)
934
935      [CUTOFF: <integer lmax>
936         ( (s||p||d||f||g) <real rcut>\
937         ...)
938      ]
939      PSEUDOPOTENTIAL_TYPE: (TROULLIER-MARTINS || HAMANN default HAMANN)
940      SOLVER_TYPE: (PAULI || SCRHODINGER default PAULI)
941      EXCHANGE_TYPE: (dirac || PBE96 default DIRAC)
942      CORRELATION_TYPE: (VOSKO || PBE96 default VOSKO)
943      [SEMICORE_RADIUS: <real rcore>]
944
945   end
946...
947END
948\end{verbatim}
949The following list describes the input for the PSP\_GENERATOR
950sub-block.
951\begin{itemize}
952
953        \item $<$psp\_name$>$ - name that points to a.
954        \item $<$element$>$ - Atomic symbol.
955        \item $<$charge$>$ - charge of the atom
956        \item $<$mass$>$ - mass number for the atom
957        \item $<$ncore$>$ - number of core states
958        \item $<$nvalence$>$ - number of valence states.
959        \item ATOMIC\_FILLING:.....(see below)
960        \item $<$filling$>$ - occupation of atomic state
961        \item CUTOFF:....(see below)
962        \item $<$rcore$>$ - value for the semicore radius (see below)
963\end{itemize}
964
965
966\subsubsection{\tt ATOMIC\_FILLING Block}
967This required block is used to define the reference atom which is used
968to define the pseudopotential. After the ATOMIC\_FILLING: $<$ncore$>$
969$<$nvalence$>$ line, the core states are listed (one per line), and
970then the valence states are listed (one per line).
971Each state contains two integer and a value.  The first integer
972specifies the radial quantum number, $n$,
973The second integer specifies the angular momentum quantum number, $l$,
974and the third value specifies the occupation of the state.
975
976For example to define a pseudopotential
977for the Neon atom in the $1s^2 2s^2 2p^6$ state
978could have the block
979\begin{verbatim}
980ATOMIC_FILLING: 1 2
981        1  s  2.0   #core state    - 1s^2
982        2  s  2.0   #valence state - 2s^2
983        2  p  6.0   #valence state - 2p^6
984\end{verbatim}
985for a pseudopotential with a $2s$ and $2p$ valence electrons
986or the block
987\begin{verbatim}
988ATOMIC_FILLING: 3 0
989        1  s  2.0    #core state
990        2  s  2.0    #core state
991        2  p  6.0    #core state
992\end{verbatim}
993could be used for a pseudopotential with no valence electrons.
994
995
996\subsubsection{{\tt CUTOFF} Block}
997This optional block specifies the cutoff distances used
998to match the all-electron atom to the pseudopotential atom.  For
999Hamann pseudopotentials $r_{cut}(l)$ defines the distance
1000where the all-electron potential is matched to the pseudopotential, and
1001for Troullier-Martins pseudopotentials $r_{cut}(l)$ defines the distance
1002where the all-electron orbital is matched to the pseudowavefunctions.
1003Thus the definition of the radii depends on the type of pseudopotential.
1004The cutoff radii used in Hamann pseudopotentials will be smaller than
1005the cutoff radii used in Troullier-Martins pseudopotentials.
1006
1007For example to define a softened Hamann pseudopotential for
1008Carbon would be
1009\begin{verbatim}
1010ATOMIC_FILLING: 1 2
1011  1  s  2.0
1012  2  s  2.0
1013  2  p  2.0
1014CUTOFF: 2
1015  s  0.8
1016  p  0.85
1017  d  0.85
1018\end{verbatim}
1019while a similarly softened Troullier-Marting pseudopotential
1020for Carbon would be
1021\begin{verbatim}
1022ATOMIC_FILLING: 1 2
1023  1  s  2.0
1024  2  s  2.0
1025  2  p  2.0
1026CUTOFF: 2
1027  s  1.200
1028  p  1.275
1029  d  1.275
1030\end{verbatim}
1031
1032
1033\subsubsection{{\tt SEMICORE\_RADIUS} Option}
1034Specifying the SEMICORE\_RADIUS option turns on the semicore correction approximation proposed
1035by Louie et al (S.G. Louie, S. Froyen, and M.L. Cohen, Phys. Rev. B, \textbf{26}, 1738, (1982)).
1036This approximation is known to dramatically improve results for systems containing
1037alkali and transition metal atoms.
1038
1039The implementation in the PSPW module defines the semi-core density, $\rho_{semicore}$ in terms of
1040the core density, $\rho_{core}$, by using the sixth-order polynomial
1041\begin{eqnarray}
1042\rho_{semicore}(r) = \left\{ \begin{array}{ll}
1043                              \rho_{core} & \mbox{if $r \geq r_{semicore}$} \\
1044                              c_0 + c_3 r^3 + c_4 r^4 + c_5 r^5 + c_6 r^6 &  \mbox{if $r < r_{semicore}$}
1045                            \end{array}
1046                     \right.
1047\end{eqnarray}
1048This expansion was suggested by Fuchs and Scheffler
1049(M. Fuchs, and M. Scheffler, Comp. Phys. Comm.,\textbf{119},67 (1999)),
1050and is better behaved for taking derivatives (i.e. calculating ionic forces) than the expansion suggested
1051by Louie et al.
1052
1053
1054
1055
1056\subsection{\tt WAVEFUNCTION\_INITIALIZER}
1057\label{sec:pspw_wavefunction_initializer}
1058The functionality of this task is now performed automatically. For backward
1059compatibility, we provide a description of the input to this task.
1060
1061The wavefunction\_initializer task is used to generate an initial wavefunction
1062datafile.
1063Input to the WAVEFUNCTION\_INITIALIZER task is contained
1064within the WAVEFUNCTION\_INITIALIZER sub-block.
1065\begin{verbatim}
1066PSPW
1067  ...
1068  WAVEFUNCTION_INITIALIZER
1069     ...
1070  END
1071  ...
1072END
1073\end{verbatim}
1074To run a WAVEFUNCTION\_INITIALIZER calculation the following directive
1075is used:
1076\begin{verbatim}
1077TASK PSPW WAVEFUNCTION_INITIALIZER
1078\end{verbatim}
1079Listed below is the format of a WAVEFUNCTION\_INITIALIZER sub-block.
1080\begin{verbatim}
1081PSPW
1082...
1083   WAVEFUNCTION_INITIALIZER
1084     CELL_NAME: <string cell_name>
1085     WAVEFUNCTION_FILENAME: <string wavefunction_name default input_movecs>
1086     (RESTRICTED||UNRESTRICTED)
1087     if (RESTRICTED)
1088        RESTRICTED_ELECTRONS: <integer restricted electrons>
1089     if (UNRESTRICTED)
1090        UP_ELECTRONS: <integer up_electrons>
1091        DOWN_ELECTRONS: <integer down_electrons>
1092   END
1093...
1094END
1095\end{verbatim}
1096The following list describes the input for the WAVEFUNCTION\_INITIALIZER
1097sub-block.
1098\begin{itemize}
1099        \item $<$cell\_name$>$ - name of
1100                the simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
1101        \item $<$wavefunction\_name$>$ - name that will point
1102              to a wavefunction file.
1103        \item RESTRICTED - keyword specifying that the calculation is restricted.
1104        \item UNRESTRICTED - keyword specifying that the calculation is unrestricted.
1105
1106        \item $<$restricted\_electrons$>$ - number of restricted electrons.
1107               Not used if an UNRESTRICTED calculation.
1108         \item $<$up\_electrons$>$ - number of spin-up electrons.
1109               Not used if a RESTRICTED calculation.
1110        \item $<$down\_electrons$>$ - number of spin-down electrons.
1111              Not used if a RESTRICTED calculation.
1112\end{itemize}
1113
1114\subsubsection{Old Style Input (version 3.3) to {\tt WAVEFUNCTION\_INITIALIZER}}
1115
1116For backward compatibility, the input to the WAVEFUNCTION\_INITIALIZER
1117sub-block can also be of the form
1118\begin{verbatim}
1119PSPW
1120...
1121   WAVEFUNCTION_INITIALIZER
1122     CELL_NAME: <string cell_name>
1123     WAVEFUNCTION_FILENAME: <string wavefunction_name default input_movecs>
1124     (RESTRICTED||UNRESTRICTED)
1125
1126     [UP_FILLING: <integer up_filling>
1127        [0 0 0   0]
1128        {<integer kx ky kz> (-2||-1||1||2)}]
1129     [DOWN_FILLING: <integer down_filling>
1130        [0 0 0   0]
1131        {<integer kx ky kz> (-2||-1||1||2)}]
1132   END
1133...
1134END
1135\end{verbatim}
1136where
1137\begin{itemize}
1138        \item $<$cell\_name$>$ - name of the
1139                simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
1140        \item $<$wavefunction\_name$>$ - name that will point
1141              to a wavefunction file.
1142        \item RESTRICTED - keyword specifying that the calculation is restricted.
1143        \item UNRESTRICTED - keyword specifying that the calculation is unrestricted.
1144        \item $<$up\_filling$>$ - number of restricted molecular orbitals if
1145              RESTRICTED and number of spin-up molecular orbitals if
1146              UNRESTRICTED.
1147        \item $<$down\_filling$>$ - number of spin-down molecular orbitals if
1148              UNRESTRICTED.  Not used if a RESTRICTED calculation.
1149        \item $<$kx ky kz$>$ - specifies which planewave is to be filled.
1150\end{itemize}
1151
1152The values for the planewave $(-2||-1||1||2)$ are used to represent whether
1153the specified planewave is a cosine or a sine function, in addition
1154random noise can be added to these base functions. That is $+1$
1155represents a cosine function, and $-1$ represents a sine function.
1156The $+2$ and $-2$ values are used to represent a cosine function with
1157random components added and a sine function with random components
1158added respectively.
1159
1160
1161\subsection{\tt V\_WAVEFUNCTION\_INITIALIZER}
1162\label{sec:pspw_v_wavefunction_initializer}
1163The functionality of this task is now performed automatically. For backward
1164compatibility, we provide a description of the input to this task.
1165
1166The v\_wavefunction\_initializer task is used to generate an initial velocity
1167wavefunction datafile.
1168Input to the V\_WAVEFUNCTION\_INITIALIZER task is contained
1169within the V\_WAVEFUNCTION\_INITIALIZER sub-block.
1170\begin{verbatim}
1171PSPW
1172  ...
1173  V_WAVEFUNCTION_INITIALIZER
1174     ...
1175  END
1176  ...
1177END
1178\end{verbatim}
1179To run a V\_WAVEFUNCTION\_INITIALIZER calculation the following directive
1180is used:
1181\begin{verbatim}
1182TASK PSPW WAVEFUNCTION_INITIALIZER
1183\end{verbatim}
1184Listed below is the format of a V\_WAVEFUNCTION\_INITIALIZER sub-block.
1185\begin{verbatim}
1186PSPW
1187...
1188   V_WAVEFUNCTION_INITIALIZER
1189     V_WAVEFUNCTION_FILENAME: <string v_wavefunction_name default input_vmovecs>
1190     CELL_NAME: <string cell_name>
1191     (RESTRICTED||UNRESTRICTED)
1192     UP_FILLING: <integer up_filling>
1193     DOWN_FILLING: <integer down_filling>
1194   END
1195...
1196END
1197\end{verbatim}
1198The following list describes the input for the V\_WAVEFUNCTION\_INITIALIZER
1199sub-block.
1200\begin{itemize}
1201        \item $<$cell\_name$>$ - name of the
1202                simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
1203        \item $<$wavefunction\_name$>$ - name that will point
1204              to a velocity wavefunction file.
1205        \item RESTRICTED - keyword specifying that the calculation is restricted.
1206        \item UNRESTRICTED - keyword specifying that the calculation is unrestricted.
1207        \item $<$up\_filling$>$ - number of restricted velocity molecular
1208              orbitals if RESTRICTED and number of spin-up velocity molecular
1209              orbitals if UNRESTRICTED.
1210        \item $<$down\_filling$>$ - number of spin-down velocity molecular
1211              orbitals if UNRESTRICTED.  Not used if a RESTRICTED calculation.
1212\end{itemize}
1213
1214
1215
1216\subsection{\tt WAVEFUNCTION\_EXPANDER}
1217\label{sec:pspw_wavefunction_expander}
1218The functionality of this task is now performed automatically. For backward
1219compatibility, we provide a description of the input to this task.
1220
1221The wavefunction\_expander task is used to convert a new wavefunction
1222file that spans a larger grid space from an old wavefunction file.
1223Input to the WAVEFUNCTION\_EXPANDER task is contained
1224within the WAVEFUNCTION\_EXPANDER sub-block.
1225\begin{verbatim}
1226PSPW
1227  ...
1228  WAVEFUNCTION_EXPANDER
1229     ...
1230  END
1231  ...
1232END
1233\end{verbatim}
1234To run a WAVEFUNCTION\_EXPANDER calculation the following directive
1235is used:
1236\begin{verbatim}
1237TASK PSPW WAVEFUNCTION_EXPANDER
1238\end{verbatim}
1239Listed below is the format of a WAVEFUNCTION\_EXPANDER sub-block.
1240\begin{verbatim}
1241PSPW
1242...
1243   WAVEFUNCTION_EXPANDER
1244     OLD_WAVEFUNCTION_FILENAME: <string old_wavefunction_name default input_movecs>
1245     NEW_WAVEFUNCTION_FILENAME: <string new_wavefunction_name default input_movecs>
1246     NEW_NGRID: <integer na1 na2 na3>
1247
1248   END
1249...
1250END
1251\end{verbatim}
1252The following list describes the input for the WAVEFUNCTION\_EXPANDER
1253sub-block.
1254\begin{itemize}
1255        \item $<$old\_wavefunction\_name$>$ - name of the
1256              wavefunction file.
1257        \item $<$new\_wavefunction\_name$>$ - name that will
1258              point to a wavefunction file.
1259        \item $<$na1 na2 na3$>$ - number of grid points in each dimension
1260              for the new wavefunction file.
1261\end{itemize}
1262
1263\subsection{\tt STEEPEST\_DESCENT}
1264\label{sec:pspw_steepest_descent}
1265The functionality of this task is now performed automatically by the PSPW minimizer.
1266For backward compatibility, we provide a description of the input to this task.
1267
1268The steepest\_descent task is used to optimize the one-electron orbitals
1269with respect to the total energy.  In addition it can also be used to optimize
1270geometries.   This method is meant to be used for coarse optimization of
1271the one-electron orbitals.
1272% ref does not exist
1273%  A detailed description of the this method
1274%is described in section \ref{sec:pspw_sd2}
1275
1276Input to the steepest\_descent simulation is contained
1277within the steepest\_descent sub-block.
1278\begin{verbatim}
1279PSPW
1280  ...
1281  STEEPEST_DESCENT
1282     ...
1283  END
1284  ...
1285END
1286\end{verbatim}
1287To run a steepest\_descent calculation the following directive is used:
1288\begin{verbatim}
1289TASK PSPW steepest_descent
1290\end{verbatim}
1291The steepest\_descent sub-block contains a great deal
1292of input, including pointers to data, as well as
1293parameter input.  Listed below is the format of a STEEPEST\_DESCENT sub-block.
1294\begin{verbatim}
1295PSPW
1296...
1297   STEEPEST_DESCENT
1298      CELL_NAME <string cell_name>
1299      [GEOMETRY_OPTIMIZE]
1300      INPUT_WAVEFUNCTION_FILENAME  <string input_wavefunctions  default input_movecs>
1301      OUTPUT_WAVEFUNCTION_FILENAME <string output_wavefunctions default input_movecs>
1302      FAKE_MASS <real fake_mass default 400000.0>
1303      TIME_STEP <real time_step default 5.8>
1304      LOOP <integer inner_iteration outer_iteration default 10 1>
1305      TOLERANCES <real tole tolc tolr default 1.0d-9 1.0d-9 1.0d-4>
1306      ENERGY_CUTOFF       <real ecut default (see input desciption)>
1307      WAVEFUNCTION_CUTOFF <real wcut default (see input description)>
1308      EWALD_NCUT <integer ncut default 1>
1309      EWALD_RCUT <real rcut default (see input description)>
1310      XC (Vosko || LDA || PBE96 || revPBE || HF || PBE0 || revPBE0 ||
1311          LDA-SIC    || LDA-SIC/2    ||  LDA-0.4SIC    || LDA-SIC/4    || LDA-0.2SIC ||
1312          PBE96-SIC  || PBE96-SIC/2  ||  PBE96-0.4SIC  || PBE96-SIC/4  || PBE96-0.2SIC ||
1313          revPBE-SIC || revPBE-SIC/2 ||  revPBE-0.4SIC || revPBE-SIC/4 || revPBE-0.2SIC ||
1314          default Vosko)
1315      [MULLIKEN]
1316
1317   END
1318...
1319
1320END
1321\end{verbatim}
1322The following list describes the input for the STEEPEST\_DESCENT
1323sub-block.
1324\begin{itemize}
1325        \item $<$cell\_name$>$ - name of
1326              the simulation\_cell named $<$cell\_name$>$. See section \ref{sec:pspw_cell}.
1327        \item GEOMETRY\_OPTIMIZE - optional keyword which if specified
1328              turns on geometry optimization.
1329        \item $<$input\_wavefunctions$>$ - name of the
1330              file containing one-electron orbitals
1331        \item $<$output\_wavefunctions$>$ - name of the
1332              file tha will contain the one-electron orbitals at the
1333              end of the run.
1334        \item $<$fake\_mass$>$ - value for the electronic
1335              fake mass ($\mu$).
1336        \item $<$time\_step$>$ - value for the time step ($\Delta t$).
1337        \item $<$inner\_iteration$>$ - number of iterations between the
1338              printing out of energies and tolerances
1339        \item $<$outer\_iteration$>$ - number of outer iterations
1340        \item $<$tole$>$ - value for the energy tolerance.
1341        \item $<$tolc$>$ - value for the one-electron orbital tolerance.
1342        \item $<$tolr$>$ - value for the ion position tolerance.
1343        \item $<$ecut$>$ - value for the cutoff energy used
1344                           to define the density.  Default is set
1345                           to be the maximum value that will fit
1346                           within the simulation\_cell $<$cell\_name$>$.
1347        \item $<$wcut$>$ - value for the cutoff energy used
1348                           to define the one-electron orbitals. Default is set
1349                           to be the maximum value that will fit
1350                           within the simulation\_cell $<$cell\_name$>$.
1351        \item $<$ncut$>$ - value for the number of unit cells
1352                          to sum over (in each direction) for the real space
1353                          part of the Ewald summation.  Note Ewald summation
1354                          is only used if the simulation\_cell is periodic.
1355        \item $<$rcut$>$ - value for the cutoff radius used
1356                          in the Ewald summation.  Note Ewald summation
1357                          is only used if the simulation\_cell is periodic. \\
1358                          Default set to be
1359                          $\frac{MIN(\left| \vec{a_i} \right|)}{\pi}, i=1,2,3$.
1360        \item (Vosko $||$ PBE96 $||$ revPBE $||$ ...) - Choose between Vosko et al's LDA
1361                               parameterization or the orginal and revised Perdew, Burke,
1362                               and Ernzerhof GGA functional.  In addition, several hybrid options.
1363        \item MULLIKEN - optional keyword which if specified
1364                         causes a Mulliken analysis to be performed at
1365                         the end of the simulation.
1366\end{itemize}
1367
1368
1369
1370
1371
1372\section{Band Tasks}
1373\label{sec:band_tasks}
1374
1375All input to the Band Tasks is contained within the compound NWPW block,
1376\begin{verbatim}
1377NWPW
1378   ...
1379END
1380\end{verbatim}
1381
1382To perform an actual calculation a TASK Band directive is used (Section \ref{sec:task}).
1383\begin{verbatim}
1384  TASK Band
1385\end{verbatim}
1386
1387Once a user has specified a geometry, the Band module can be invoked with no input directives (defaults invoked throughout).  There are sub-directives which allow for customized application; those currently provided as options for the Band module are:
1388\begin{verbatim}
1389NWPW
1390  CELL_NAME <string cell_name default 'cell_default'>
1391  ZONE_NAME <string zone_name default 'zone_default'>
1392  INPUT_WAVEFUNCTION_FILENAME  <string input_wavefunctions  default input_movecs>
1393  OUTPUT_WAVEFUNCTION_FILENAME <string output_wavefunctions default input_movecs>
1394  FAKE_MASS <real fake_mass default 400000.0>
1395  TIME_STEP <real time_step default 5.8>
1396  LOOP <integer inner_iteration outer_iteration default 10 100>
1397  TOLERANCES <real tole tolc default 1.0e-7 1.0e-7>
1398  CUTOFF              <real cutoff>
1399  ENERGY_CUTOFF       <real ecut default (see input description)>
1400  WAVEFUNCTION_CUTOFF <real wcut default (see input description)>
1401  EWALD_NCUT <integer ncut default 1>]
1402  EWALD_RCUT <real rcut default (see input description)>
1403  XC (Vosko || PBE96  || revPBE default Vosko)
1404  DFT||ODFT||RESTRICTED||UNRESTRICTED
1405  MULT <integer mult default 1>
1406  CG
1407  LMBFGS
1408  SCF [Anderson|| simple || Broyden]
1409      [CG || RMM-DIIS]
1410      [density || potential]
1411      [ALPHA real alpha default 0.25]
1412      [ITERATIONS integer inner_iterations default 5]
1413      [OUTER_ITERATIONS integer outer_iterations default 0]
1414
1415
1416  SIMULATION_CELL ... (see input description) END
1417  BRILLOUIN_ZONE  ... (see input description) END
1418  MONKHORST-PACK <real n1 n2 n3 default 1 1 1>
1419
1420  BAND_DPLOT    ... (see input description) END
1421
1422  MAPPING <integer mapping default 1>
1423  SMEAR <sigma default 0.001> [TEMPERATURE <temperature>] [FERMI || GAUSSIAN default FERMI]
1424                              [ORBITALS <integer orbitals default 4>]
1425
1426END
1427\end{verbatim}
1428The following list describes these keywords.
1429\begin{itemize}
1430        \item $<$cell\_name$>$ - name of
1431              the simulation\_cell named $<$cell\_name$>$.  See section \ref{sec:pspw_cell}.
1432        \item $<$input\_wavefunctions$>$ - name of the
1433              file containing one-electron orbitals
1434        \item $<$output\_wavefunctions$>$ - name that will
1435              point to file containing the one-electron orbitals at the
1436              end of the run.
1437        \item $<$fake\_mass$>$ - value for the electronic
1438              fake mass ($\mu$). This parameter is not presently used in a
1439              conjugate gradient simulation
1440        \item $<$time\_step$>$ - value for the time step ($\Delta t$).  This
1441              parameter is not presently used in a conjugate gradient simulation.
1442        \item $<$inner\_iteration$>$ - number of iterations between the
1443              printing out of energies and tolerances
1444        \item $<$outer\_iteration$>$ - number of outer iterations
1445        \item $<$tole$>$ - value for the energy tolerance.
1446        \item $<$tolc$>$ - value for the one-electron orbital tolerance.
1447        \item $<$cutoff$>$ - value for the cutoff energy used to define the wavefunction.  In addition
1448                             using the CUTOFF keyword automatically sets the cutoff energy for the density
1449                             to be twice the wavefunction cutoff.
1450        \item $<$ecut$>$ - value for the cutoff energy used
1451                           to define the density. Default is set
1452                           to be the maximum value that will fit
1453                            within the simulation\_cell $<$cell\_name$>$.
1454        \item $<$wcut$>$ - value for the cutoff energy used
1455                           to define the one-electron orbitals.
1456                           Default is set to be the maximum value that
1457                           will fix within the simulation\_cell $<$cell\_name$>$.
1458        \item $<$ncut$>$ - value for the number of unit cells
1459                          to sum over (in each direction) for the real space
1460                          part of the Ewald summation. Note Ewald summation
1461                          is only used if the simulation\_cell is periodic.
1462        \item $<$rcut$>$ - value for the cutoff radius used
1463                          in the Ewald summation. Note Ewald summation
1464                          is only used if the simulation\_cell is periodic. \\
1465                           Default set to be
1466                          $\frac{MIN(\left| \vec{a_i} \right|)}{\pi}, i=1,2,3$.
1467        \item (Vosko $||$ PBE96 $||$ revPBE) - Choose between Vosko et al's LDA
1468                               parameterization or the orginal and revised Perdew, Burke,
1469                               and Ernzerhof GGA functional.
1470        \item SIMULATION\_CELL (see section \ref{sec:pspw_cell})
1471        \item BRILLOUIN\_ZONE  (see section \ref{sec:band_brillouin_zone})
1472        \item MONKHORST-PACK - Alternatively, the MONKHORST-PACK keyword can be used
1473                               to enter a MONKHORST-PACK sampling of the Brillouin zone.
1474        \item $<$smear$>$ - value for smearing broadending
1475        \item $<$temperature$>$ - same as smear but in units of K.
1476        \item CG - optional keyword which sets the minimizer to 1
1477        \item LMBFGS - optional keyword which sets the minimizer to 2
1478        \item SCF - optional keyword which sets the minimizer to be a band by band minimizer.  Several
1479                    options are available for setting the density or potential mixing, and the type of
1480                    Kohn-Sham minimizer.
1481\end{itemize}
1482
1483
1484\subsection{Brillouin Zone}
1485\label{sec:band_brillouin_zone}
1486To supply the special points of the Brillouin zone,
1487the user defines a brillouin\_zone sub-block within the NWPW
1488block.  Listed below is the format of a brillouin\_zone sub-block.
1489\begin{verbatim}
1490NWPW
1491...
1492   BRILLOUIN_ZONE
1493      ZONE_NAME <string name default 'zone_default'>
1494      (KVECTOR <real k1 k2 k3 no default> <real weight default (see input description)>
1495       ...)
1496   END
1497...
1498END
1499\end{verbatim}
1500The user enters the special points and weights of the
1501Brillouin zone.  The following list describes the input in detail.
1502\begin{itemize}
1503        \item $<$name$>$ - user-supplied name for the simulation block.
1504        \item $<$k1 k2 k3$>$ - user-supplied values for a special point in the
1505                               Brillouin zone.
1506        \item $<$weight$>$ - user-supplied weight.  Default is to set the weight
1507                         so that the sum of all the weights for the entered
1508                         special points adds up to unity.
1509\end{itemize}
1510
1511
1512\normalsize
1513\subsection{\tt BAND\_DPLOT}
1514\label{sec:pspw_dplot}
1515The BAND BAND\_DPLOT task is used to generate plots of various types of electron
1516densities (or orbitals) of a crystal.  The electron density is calculated on the
1517specified set of grid points from a Band calculation.  The output file
1518generated is in the Gaussian Cube format.
1519Input to the BAND\_DPLOT task is contained
1520within the BAND\_DPLOT sub-block.
1521\begin{verbatim}
1522NWPW
1523  ...
1524  BAND_DPLOT
1525     ...
1526  END
1527  ...
1528END
1529\end{verbatim}
1530To run a BAND\_DPLOT calculation the following directive
1531is used:
1532\begin{verbatim}
1533TASK BAND BAND_DPLOT
1534\end{verbatim}
1535Listed below is the format of a BAND\_DPLOT sub-block.
1536\begin{verbatim}
1537NWPW
1538...
1539   BAND_DPLOT
1540     VECTORS <string input_wavefunctions  default input_movecs>
1541     DENSITY [total||difference||alpha||beta||laplacian||potential default total] <string density_name no default>
1542     ELF [restricted|alpha|beta] <string elf_name no default>
1543     ORBITAL (density || real || complex default density) <integer orbital_number no default> <integer brillion_number default 1> <string orbital_name no default>
1544
1545
1546     [LIMITXYZ [units <string Units default angstroms>]
1547     <real X_From> <real X_To> <integer No_Of_Spacings_X>
1548     <real Y_From> <real Y_To> <integer No_Of_Spacings_Y>
1549     <real Z_From> <real Z_To> <integer No_Of_Spacings_Z>]
1550
1551   END
1552
1553...
1554END
1555\end{verbatim}
1556
1557The following list describes the input for the BAND\_DPLOT
1558sub-block.
1559
1560\begin{verbatim}
1561     VECTORS <string input_wavefunctions  default input_movecs>
1562\end{verbatim}
1563 This sub-directive specifies the name of the molecular orbital file. If the second file is optionally given the density is computed as the difference between the corresponding electron densities. The vector files have to match.
1564
1565\begin{verbatim}
1566     DENSITY [total||difference||alpha||beta||laplacian||potential default total] <string density_name no default>
1567\end{verbatim}
1568This sub-directive specifies, what kind of density is to be plotted. The known names for total, difference, alpha, beta, laplacian, and potential.
1569
1570\begin{verbatim}
1571     ELF [restricted|alpha|beta] <string elf_name no default>
1572\end{verbatim}
1573This sub-directive specifies that an electron localization function (ELF) is to be plotted.
1574
1575\begin{verbatim}
1576     ORBITAL (density || real || complex default density) <integer orbital_number no default> \
1577             <integer brillion_number default 1> <string orbital_name no default>
1578\end{verbatim}
1579This sub-directive specifies the molecular orbital number that is to be plotted.
1580
1581\begin{verbatim}
1582     LIMITXYZ [units <string Units default angstroms>]
1583     <real X_From> <real X_To> <integer No_Of_Spacings_X>
1584     <real Y_From> <real Y_To> <integer No_Of_Spacings_Y>
1585     <real Z_From> <real Z_To> <integer No_Of_Spacings_Z>
1586\end{verbatim}
1587By default the grid spacing and the limits of the cell to be plotted are defined by the input wavefunctions.  Alternatively the user can use the LIMITXYZ sub-directive to specify other limits.  The grid is generated using No\_Of\_Spacings + 1 points along each direction. The known names for Units are angstroms, au and bohr.
1588
1589\subsection{SMEAR - Fractional Occupation of the Molecular Orbitals}
1590\label{sec:band_smear}
1591The smear keyword to turn on fractional occupation of the molecular orbitals
1592\begin{verbatim}
1593  SMEAR <sigma default 0.001> [TEMPERATURE <temperature>] [FERMI || GAUSSIAN default FERMI]
1594                              [ORBITALS <integer orbitals default 4>]
1595\end{verbatim}
1596Both Fermi-Dirac (FERMI) and Gaussian broadening functions are available.  The ORBITALS keyword is used to change
1597the number of virtual orbitals to be used in the calculation.  Note to use this option the user must currently use the
1598SCF minimizer.  The following SCF option is recommended for running fractional occupation
1599\begin{verbatim}
1600  SCF Anderson
1601\end{verbatim}
1602
1603
1604\section{PAW Tasks}
1605\label{sec:paw_tasks}
1606
1607
1608All input to the PAW Tasks is contained within the compound NWPW block,
1609\begin{verbatim}
1610NWPW
1611   ...
1612END
1613\end{verbatim}
1614
1615
1616To perform an actual calculation a TASK PAW directive is used
1617(Section \ref{sec:task}).
1618\begin{verbatim}
1619  TASK PAW
1620\end{verbatim}
1621In addition to the directives listed in Section \ref{sec:task}, i.e.
1622\begin{verbatim}
1623TASK paw energy
1624TASK paw gradient
1625TASK paw optimize
1626TASK paw saddle
1627TASK paw freqencies
1628TASK paw vib
1629\end{verbatim}
1630there are additional directives that are specific to the PSPW module, which are:
1631\begin{verbatim}
1632TASK PAW [Car-Parrinello             ||
1633          steepest_descent            ]
1634\end{verbatim}
1635
1636
1637Once a user has specified a geometry, the PAW module can be invoked with no input directives (defaults invoked throughout).  There are sub-directives which allow for customized application; those currently provided as options for the PAW module are:
1638\begin{verbatim}
1639NWPW
1640  CELL_NAME <string cell_name default 'cell_default'>
1641  [GEOMETRY_OPTIMIZE]
1642  INPUT_WAVEFUNCTION_FILENAME  <string input_wavefunctions  default input_movecs>
1643  OUTPUT_WAVEFUNCTION_FILENAME <string output_wavefunctions default input_movecs>
1644  FAKE_MASS <real fake_mass default 400000.0>
1645  TIME_STEP <real time_step default 5.8>
1646  LOOP <integer inner_iteration outer_iteration default 10 100>
1647  TOLERANCES <real tole tolc default 1.0e-7 1.0e-7>
1648  CUTOFF              <real cutoff>
1649  ENERGY_CUTOFF       <real ecut default (see input description)>
1650  WAVEFUNCTION_CUTOFF <real wcut default (see input description)>
1651  EWALD_NCUT <integer ncut default 1>]
1652  EWALD_RCUT <real rcut default (see input description)>
1653  XC (Vosko || PBE96 || revPBE  default Vosko)
1654  DFT||ODFT||RESTRICTED||UNRESTRICTED
1655  MULT <integer mult default 1>
1656  INTEGRATE_MULT_L <integer imult default 1>
1657
1658  SIMULATION_CELL ... (see input description) END
1659  CAR-PARRINELLO  ... (see input description) END
1660
1661  MAPPING <integer mapping default 1>
1662END
1663
1664
1665END
1666\end{verbatim}
1667The following list describes these keywords.
1668\begin{itemize}
1669        \item $<$cell\_name$>$ - name of the
1670              the simulation\_cell named $<$cell\_name$>$. The
1671              current version of PAW only accepts periodic unit cells.
1672              See section \ref{sec:pspw_cell}.
1673        \item GEOMETRY\_OPTIMIZE - optional keyword which if specified
1674              turns on geometry optimization.
1675        \item $<$input\_wavefunctions$>$ - name of the
1676              file containing one-electron orbitals
1677        \item $<$output\_wavefunctions$>$ - name of the
1678              file that will contain the one-electron orbitals at the
1679              end of the run.
1680        \item $<$fake\_mass$>$ - value for the electronic
1681              fake mass ($\mu$). This parameter is not presently used in a
1682              conjugate gradient simulation
1683        \item $<$time\_step$>$ - value for the time step ($\Delta t$).  This
1684              parameter is not presently used in a conjugate gradient simulation.
1685        \item $<$inner\_iteration$>$ - number of iterations between the
1686              printing out of energies and tolerances
1687        \item $<$outer\_iteration$>$ - number of outer iterations
1688        \item $<$tole$>$ - value for the energy tolerance.
1689        \item $<$tolc$>$ - value for the one-electron orbital tolerance.
1690        \item $<$cutoff$>$ - value for the cutoff energy used to define the wavefunction.  In addition
1691                             using the CUTOFF keyword automatically sets the cutoff energy for the density
1692                             to be twice the wavefunction cutoff.
1693        \item $<$ecut$>$ - value for the cutoff energy used
1694                           to define the density. Default is set
1695                           to be the maximum value that will fit
1696                            within the simulation\_cell $<$cell\_name$>$.
1697        \item $<$wcut$>$ - value for the cutoff energy used
1698                           to define the one-electron orbitals.
1699                           Default is set to be the maximum value that
1700                           will fix within the simulation\_cell $<$cell\_name$>$.
1701        \item $<$ncut$>$ - value for the number of unit cells
1702                          to sum over (in each direction) for the real space
1703                          part of the smooth compensation summation.
1704        \item $<$rcut$>$ - value for the cutoff radius used
1705                          in the smooth compensation summation. \\
1706                           Default set to be
1707                          $\frac{MIN(\left| \vec{a_i} \right|)}{\pi}, i=1,2,3$.
1708        \item (Vosko $||$ PBE96 $||$ revPBE) - Choose between Vosko et al's LDA
1709                               parameterization or the orginal and revised Perdew, Burke,
1710                               and Ernzerhof GGA functional.
1711        \item MULT - optional keyword which if specified allows the user to define the spin multiplicity
1712                     of the system
1713        \item INTEGRATE\_MULT\_L - optional keyword which if specified allows the user to define the
1714                                   angular XC integration of the augmented region
1715        \item SIMULATION\_CELL (see section \ref{sec:pspw_cell})
1716        \item CAR-PARRINELLO(see section \ref{sec:pspw_CP})
1717
1718
1719        \item $<$mapping$>$ - for a value of 1 slab FFT is used, for a value of 2 a 2d-hilbert FFT is used.
1720\end{itemize}
1721
1722
1723\section{Pseudopotential and PAW basis Libraries}
1724\label{sec:psp_library}
1725
1726A library of pseudopotentials used by PSPW and BAND is currently available  in the
1727directory \\
1728\verb+ $NWCHEM_TOP/src/nwpw/libraryps/pspw_default+
1729
1730The elements listed in the following table are present:
1731
1732\begin{verbatim}
1733  H                                                  He
1734 -------                              ------------------
1735  Li Be                               B  C  N  O  F  Ne
1736 -------                             -------------------
1737  Na Mg                               Al Si P  S  Cl Ar
1738 -------------------------------------------------------
1739  K  Ca Sc Ti V  Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
1740 -------------------------------------------------------
1741  Rb Sr Y  Zr Nb Mo Tc Ru Rh Pd Ag Cd In Sn Sb Te I  Xe
1742 -------------------------------------------------------
1743  Cs Ba La Hf Ta W  Re Os Ir Pt Au Hg Tl Pb Bi Po At Rn
1744 -------------------------------------------------------
1745  Fr Ra .
1746 -----------------
1747
1748          ------------------------------------------
1749           .  .  .  .  .  .  Gd .  .  .  .  .  .  .
1750          ------------------------------------------
1751           .  .  U  .  Pu .  .  .  .  .  .  .  .  .
1752          ------------------------------------------
1753
1754\end{verbatim}
1755The pseudopotential libraries are continually being tested
1756and added.   Also,  the PSPW program can read in pseudopotentials
1757in CPI and TETER format generated with pseudopotential generation
1758programs such as the OPIUM package of Rappe et al.
1759The user can request additional pseudopotentials from
1760Eric J. Bylaska at (Eric.Bylaska@pnl.gov).
1761
1762Similarly, a library of PAW basis used by PAW is currently available in the
1763directory \\
1764\verb+ $NWCHEM_TOP/src/nwpw/libraryps/paw_default+
1765
1766\begin{verbatim}
1767  H                                                  He
1768 -------                              -----------------
1769  Li Be                               B  C  N  O  F  Ne
1770 -------                             ------------------
1771  Na Mg                               Al Si P  S  Cl Ar
1772 ------------------------------------------------------
1773  K  Ca Sc Ti V  Cr Mn Fe Co Ni Cu Zn Ga Ge As Se Br Kr
1774 ------------------------------------------------------
1775  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
1776 ------------------------------------------------------
1777  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
1778 ------------------------------------------------------
1779  .  .  .
1780 -----------------
1781
1782
1783          ------------------------------------------
1784           .  .  .  .  .  .  .  .  .  .  .  .  .  .
1785          ------------------------------------------
1786           .  .  .  .  .  .  .  .  .  .  .  .  .  .
1787          ------------------------------------------
1788
1789\end{verbatim}
1790
1791
1792Currently there are not very many elements available for PAW.  However,
1793the user can request additional basis sets from Eric J. Bylaska at (Eric.Bylaska@pnl.gov).
1794
1795A preliminary implementation of the HGH pseudopotentials (Hartwigsen, Goedecker, and Hutter)
1796has been implemented into the PSPW module.  To access
1797the pseudopotentials the pseudopotentials input block is used.  For
1798example, to redirect the code to use HGH pseudopotentials for carbon
1799and hydrogen, the following input would be used.
1800\begin{verbatim}
1801nwpw
1802   ...
1803   pseudopotentials
1804    C  library  HGH_LDA
1805    H  library  HGH_LDA
1806   end
1807   ...
1808end
1809\end{verbatim}
1810The implementation of HGH pseudopotentials is rather limited in this release.
1811HGH pseudopotentials cannot be used to optimize unit cells, and they
1812do not work with the MULLIKEN option.  They also have not yet been implemented
1813into the BAND structure code.
1814
1815To read in pseudopotentials in CPI format the following input would be used.
1816\begin{verbatim}
1817nwpw
1818   ...
1819   pseudopotentials
1820    C  CPI  c.cpi
1821    H  CPI  h.cpi
1822   end
1823   ...
1824end
1825\end{verbatim}
1826In order for the program to recognize the CPI format the CPI files, e.g. c.cpi
1827have to be prepended with the ``$<$CPI$>$'' keyword.
1828
1829To read in pseudopotentials in TETER format the following input would be used.
1830\begin{verbatim}
1831nwpw
1832   ...
1833   pseudopotentials
1834    C  TETER  c.teter
1835    H  TETER  h.teter
1836   end
1837   ...
1838end
1839\end{verbatim}
1840In order for the program to recognize the TETER format the TETER files, e.g. c.teter
1841have to be prepended with the ``$<$TETER$>$'' keyword.
1842
1843
1844If you wish to redirect the code to a different directory other than
1845the default one,
1846you need to set the environmental variable
1847{\tt NWCHEM\_NWPW\_LIBRARY}
1848to the new location of the \verb+libraryps+ directory.
1849
1850
1851
1852\section{NWPW RTDB Entries and DataFiles}
1853\label{sec:pspw_data}
1854Input to the PSPW and Band modules are contained in both the RTDB and datafiles.
1855The RTDB is used to store input that the user will need to directly specify.
1856Input of this kind includes ion positions, ion velocities, and simulation cell
1857parameters.  The datafiles are used to store input, such the one-electron
1858orbitals, one-electron orbital velocities, formatted pseudopotentials,
1859and one-dimensional pseudopotentials, that the user will in most cases
1860run a program to generate.
1861
1862\subsection{Ion Positions}
1863The positions of the ions are stored in the default geometry structure
1864in the RTDB and must be specified  using the GEOMETRY directive.
1865
1866\subsection{Ion Velocities}
1867The velocities of the ions are stored in the default geometry structure
1868in the RTDB, and must be specified using the GEOMETRY directive.
1869
1870
1871
1872\subsection{Wavefunction Datafile}
1873The one-electron orbitals are stored in a wavefunction datafile.  This
1874is a binary file and cannot be directly edited.  This datafile is used
1875by steepest\_descent and Car-Parrinello tasks and can be generated
1876using the wavefunction\_initializer or wavefunction\_expander tasks.
1877
1878\subsection{Velocity Wavefunction Datafile}
1879The one-electron orbital velocities are stored in a velocity wavefunction
1880datafile.  This is a binary file and cannot be directly edited.  This datafile
1881is used by the Car-Parrinello task and can be generated
1882using the v\_wavefunction\_initializer task.
1883
1884\subsection{Formatted Pseudopotential Datafile}
1885The pseudopotentials in Kleinman-Bylander form expanded on a simulation
1886cell (3d grid) are stored in a formatted pseudopotential datafile.
1887This is a binary file and cannot be directly edited.
1888This datafile
1889is used by steepest\_descent and Car-Parrinello tasks and can be generated
1890using the pseudopotential\_formatter task.
1891
1892\subsection{One-Dimensional Pseudopotential Datafile}
1893The one-dimensional pseudopotentials are stored in a one-dimensional
1894pseudopotential file.  This is an ASCII file and can be directly edited with
1895a text editor.  However, the user will usually use the psp\_generator
1896task to generate this datafile.
1897
1898The data stored in the one-dimensional pseudopotential file is
1899\begin{verbatim}
1900   character*2 element       :: element name
1901   integer     charge        :: valence charge of ion
1902   real        mass          :: mass of ion
1903   integer     lmax          :: maximum angular component
1904   real        rcut(lmax)    :: cutoff radii used to define pseudopotentials
1905   integer     nr            :: number of points in the radial grid
1906   real        dr            :: linear spacing of the radial grid
1907   real        r(nr)         :: one-dimensional radial grid
1908   real        Vpsp(nr,lmax) :: one-dimensional pseudopotentials
1909   real        psi(nr,lmax)  :: one-dimensional pseudowavefunctions
1910   real        r_semicore        :: semicore radius
1911   real        rho_semicore(nr)  :: semicore density
1912\end{verbatim}
1913and the format of it is:
1914\begin{verbatim}
1915[line 1:     ] element
1916[line 2:     ] charge mass lmax
1917[line 3:     ] (rcut(l), l=1,lmax)
1918[line 4:     ] nr dr
1919[line 5:     ]    r(1)  (Vpsp(1,l),  l=1,lmax)
1920[line 6:     ] ....
1921[line nr+4:  ] r(nr) (Vpsp(nr,l), l=1,lmax)
1922[line nr+5:  ] r(1)  (psi(1,l), l=1,lmax)
1923[line nr+6:  ] ....
1924[line 2*nr+4:] r(nr) (psi(nr,l), l=1,lmax)
1925[line 2*nr+5:] r_semicore
1926if (r_semicore read) then
1927[line 2*nr+6:] r(1)  rho_semicore(1)
1928[line 2*nr+7:] ....
1929[line 3*nr+5:] r(nr) rho_semicore(nr)
1930end if
1931\end{verbatim}
1932
1933
1934
1935\subsection{PSPW Car-Parrinello Output Datafiles}
1936\label{sec:pspw_cp_data}
1937
1938\subsubsection{XYZ motion file}
1939Data file that stores ion positions and velocities as
1940a function of time in XYZ format.
1941
1942\begin{verbatim}
1943[line 1:          ]  n_ion
1944[line 2:          ]
1945do ii=1,n_ion
1946[line 2+ii:       ] atom_name(ii), x(ii),y(ii),z(ii),vx(ii),vy(ii),vz(ii)
1947end do
1948[line n_ion+3     ] n_nion
1949
1950do ii=1,n_ion
1951[line n_ion+3+ii: ] atom_name(ii), x(ii),y(ii),z(ii), vx(ii),vy(ii),vz(ii)
1952end do
1953[line 2*n_ion+4:  ]  ....
1954\end{verbatim}
1955
1956
1957\subsubsection{ION\_MOTION motion file}
1958Datafile that stores ion positions and velocities
1959as a function of time
1960
1961\begin{verbatim}
1962[line 1:          ]  it_out, n_ion, omega
1963[line 2:          ]  time
1964do ii=1,n_ion
1965[line 2+ii:       ] x(ii),y(ii),z(ii), vx(ii),vy(ii),vz(ii)
1966end do
1967[line n_ion+3     ] time
1968do
1969do ii=1,n_ion
1970[line n_ion+3+ii: ] x(ii),y(ii),z(ii), vx(ii),vy(ii),vz(ii)
1971end do
1972[line 2*n_ion+4:  ]  ....
1973\end{verbatim}
1974
1975\subsubsection{EMOTION motion file}
1976Datafile that store energies as a function of time
1977\begin{verbatim}
1978[line 1:          ]  time, E1,E2,E3,E4,E5,E6,E7,E8, (E9,E10, if Nose-Hoover)
1979[line 2:          ] ...
1980\end{verbatim}
1981
1982
1983\subsubsection{HMOTION motion file}
1984Datafile that stores the rotation matrix
1985as a function of time.
1986
1987\begin{verbatim}
1988[line 1:          ] time
1989[line 2:          ] ms,ne(ms),ne(ms)
1990do i=1,ne(ms)
1991[line 2+i:        ] (hml(i,j), j=1,ne(ms)
1992end do
1993[line 3+ne(ms):   ] time
1994[line 4+ne(ms):   ] ....
1995\end{verbatim}
1996
1997
1998\subsubsection{EIGMOTION motion file}
1999Datafile that stores the eigenvalues for the one-electron
2000orbitals as a function of time.
2001
2002\begin{verbatim}
2003[line 1:          ]  time, (eig(i), i=1,number_orbitals)
2004[line 2:          ] ...
2005\end{verbatim}
2006
2007
2008\subsubsection{OMOTION motion file}
2009Datafile that stores a reduced representation of the
2010one-electron orbitals.  To be used with a molecular
2011orbital viewer that will be ported to NWChem
2012in the near future.
2013
2014
2015
2016\section{Car-Parrinello Scheme for Ab Initio Molecular Dynamics}
2017\label{sec:pspw_Car-Parrinello}
2018
2019Car and Parrinello developed a unified scheme for doing {\it ab initio}
2020molecular dynamics by combining the motion of the ion cores and a fictitious
2021motion for the Kohn-Sham orbitals of density-functional theory
2022(R. Car and M. Parrinello, Phys. Rev. Lett. \textbf{55}, 2471, (1985)).
2023At the heart of this method they introduced a fictitious kinetic energy
2024functional for the Kohn-Sham orbitals.
2025
2026\begin{eqnarray}
2027\label{appendix:b1}
2028KE(\{\psi_{i,\sigma}(\vec{r})\}) &=& \sum_{i,\sigma}^{occ}
2029                                      \int d\vec{r}\ \mu \left|
2030                                      \dot{\psi}_{i,\sigma}(\vec{r}) \right|^2
2031\end{eqnarray}
2032
2033\noindent
2034Given this kinetic energy the constrained equations of motion are found
2035by taking the first variation of the auxiliary Lagrangian.
2036\begin{eqnarray}
2037\label{appendix:b2}
2038L &=& \sum_{i,\sigma}^{occ} \int d\vec{r}\ \mu \left|
2039     \dot{\psi}_{i,\sigma}(\vec{r}) \right|^2
2040     + \frac 12 \sum_I M_I \left| \dot{\vec{R}}_I \right|^2
2041- E\left[ \left\{ \psi_{i,\sigma}(\vec{r})\right\},\left\{\vec{R}_I \right\} \right]
2042\nonumber \\
2043&&+\sum_{ij,\sigma} \Lambda_{ij,\sigma} \left( \int d\vec{r}\
2044\psi_{i,\sigma}^{*}(\vec{r}) \psi_{j,\sigma}(\vec{r}) - \delta_{ij,\sigma}
2045\right)
2046\end{eqnarray}
2047
2048\noindent
2049Which generates a dynamics for the wavefunctions $\psi_{i,\sigma}(\vec{r})$ and
2050atoms positions $\vec{R}_I$ through the constrained equations of motion:
2051
2052\begin{eqnarray}
2053\mu \ddot{\psi}_{i,\sigma}(\vec{r},t) &=& -\frac{\delta E}{\delta \psi_{i,\sigma }^{*}
2054\left( \vec{r},t \right) } + \sum\limits_j \Lambda_{ij,\sigma}
2055\psi_{j,\sigma} \left( \vec{r},t \right)
2056\label{eq:b3}
2057\end{eqnarray}
2058\begin{eqnarray}
2059M_I \ddot{\vec{R}}_I &=& -\frac{\partial E}{\partial \vec{R}_I}
2060\label{eq:b4}
2061\end{eqnarray}
2062
2063\noindent
2064where $\mu$ is the fictitious mass for the electronic degrees of freedom and
2065$M_I$ are the ionic masses.
2066The adjustable parameter $\mu$ is used to
2067describe the relative rate at which the wavefunctions change with time.
2068$\Lambda_{ij,\sigma}$ are the
2069Lagrangian multipliers for the orthonormalization of the single-particle
2070orbitals $\psi_{i,\sigma}(\vec{r})$.
2071They are defined by the orthonormalization constraint conditions
2072and can be rigorously found.
2073However, the equations of motion for the Lagrange multipliers
2074depend on the specific algorithm used to integrate
2075Eqs.~\ref{eq:b3}-\ref{eq:b4}.
2076
2077For this method to give ionic motions that are physically meaningful
2078the kinetic energy of the Kohn-Sham orbitals must be relatively
2079small when compared to the kinetic energy of the ions.
2080There are two ways where this criterion can fail.
2081First, the numerical integrations for the Car-Parrinello equations of motion
2082can often lead to large relative values of the kinetic energy of
2083the Kohn-Sham orbitals relative to the kinetic energy of the ions.
2084This kind of failure is easily fixed by requiring a more accurate
2085numerical integration, i.e. use a smaller time step for the numerical
2086integration.
2087Second, during the motion of the system a the ions can be in locations where
2088there is an Kohn-Sham orbital level crossing, i.e. the density-functional
2089energy can have two states that are nearly degenerate.  This kind
2090of failure often occurs in the study of chemical reactions.
2091This kind of failure is not easily fixed and requires the use
2092of a more sophisticated density-functional energy that accounts
2093for low-lying excited electronic states.
2094
2095
2096\subsection{Verlet Algorithm for Integration}
2097%\subsection{Verlet Algorithm for Integrating Eqs. \ref{eq:b3} - \ref{eq:b4} }
2098
2099Eqs.~\ref{eq:b3}-\ref{eq:b4} integrated using the Verlet algorithm
2100results in
2101
2102\begin{eqnarray}
2103\psi_{i,\sigma}^{t+ \Delta t}
2104                   &\leftarrow&
2105                    2 \psi_{i,\sigma}^{t} - \psi_{i,\sigma}^{t-\Delta t}
2106                      + \frac{(\Delta t)^2}{\mu}
2107                        \left[
2108                           \frac{\delta E}{\delta \psi_{i,\sigma}^{*}}
2109                            + \sum_{j} \psi_{j,\sigma} \Lambda_{ji,\sigma}
2110                        \right]_{t}
2111\label{eq:b6}
2112\end{eqnarray}
2113\begin{eqnarray}
2114\vec{R}_I^{t+\Delta t} &\leftarrow&
2115                    2 \vec{R}_I^{t} - \vec{R}_I^{t-\Delta t}
2116                    + \frac{(\Delta t)^2}{M_I}
2117                       \frac{\partial E}{\partial \vec{R}_I}
2118\label{eq:b7}
2119\end{eqnarray}
2120
2121In this molecular dynamic procedure we have to know variational derivative
2122$\frac{\delta E}{\delta \psi_{i,\sigma}^{*}}$ and the matrix
2123$\Lambda_{ij,\sigma}$.
2124The variational derivative $\frac{\delta E}{\delta \psi_{i,\sigma}^{*}}$
2125can be analytically found and is
2126\begin{eqnarray}
2127\frac{\delta E}{\delta \psi_{i,\sigma}^{*}}
2128      &=&  -\frac{1}{2} \nabla^2
2129            \psi_{i,\sigma}(\vec{r}) \nonumber \\
2130      &+& \int d\vec{r^{\prime}}
2131           W_{ext}(\vec{r},\vec{r^{\prime}})
2132          \psi_{i,\sigma}(\vec{r^{\prime}}) \nonumber \\
2133      &+& \int d\vec{r^{\prime}}
2134                    \frac{n(\vec{r^{\prime}})}{|\vec{r}-\vec{r^{\prime}}|}
2135          \psi_{i,\sigma}(\vec{r}) \nonumber \\
2136      &+& \mu_{xc}^{\sigma}(\vec{r})
2137          \psi_{i,\sigma}(\vec{r}) \nonumber \\
2138& \equiv & \hat{H} \psi_{i,\sigma}
2139\label{eq:b8}
2140\end{eqnarray}
2141
2142\noindent
2143To find the matrix $\Lambda_{ij,\sigma}$ we impose the orthonormality
2144constraint on $\psi_{i,\sigma}^{t+\Delta t}$ to obtain a
2145matrix Riccatti equation, and then Riccatti equation is solved by an iterative
2146solution
2147% ref does not exist
2148%(see section ~\ref{sec:pspw_sd2}).
2149
2150
2151\subsection{Constant Temperature Simulations: Nose-Hoover Thermostats}
2152\label{sec:pspw_nose}
2153
2154Nose-Hoover Thermostats for the electrons and ions can also be added to the
2155Car-Parrinello simulation.  In this type of simulation thermostats variables $x_e$ and $x_R$
2156are added to the simulation by adding the auxiliary energy functionals to the total energy.
2157\begin{eqnarray}
2158ION\_THERMOSTAT(x_R)      &=&  \frac{1}{2} Q_R \dot{x_R} + E_{R0}x_R \\
2159ELECTRON\_THERMOSTAT(x_e) &=&  \frac{1}{2} Q_e \dot{x_e} + E_{e0}x_e
2160\end{eqnarray}
2161
2162In these equations, the average kinetic energy for the ions is
2163\begin{eqnarray}
2164E_{R0} = \frac{1}{2} f k_B T
2165\end{eqnarray}
2166where $f$ is the number of atomic degrees of freedom, $k_B$ is
2167Boltzmann's constant, and T is the desired temperature.  Defining
2168the average fictitious kinetic energy of the electrons is not as straightforward.
2169Bl\"{o}chl and Parrinello
2170(P.E. Bl\"{o}chl and M. Parrinello, Phys. Rev. B, \textbf{45}, 9413, (1992))
2171have suggested the following formula for determining
2172the average fictitious kinetic energy
2173\begin{eqnarray}
2174E_{e0} = 4 k_B T \frac{\mu}{M} \sum_i <\psi_i|-\frac{1}{2} \nabla^2 |\psi_i>
2175\end{eqnarray}
2176where $\mu$ is the fictitious electronic mass, $M$ is average mass of one atom,
2177and $\sum_i <\psi_i|-\frac{1}{2} \nabla^2 |\psi_i>$ is the kinetic energy of the
2178electrons.
2179
2180Bl\"{o}chl and Parrinello suggested that the choice of mass parameters,
2181$Q_e$, and $Q_R$ should be made such that the period of oscillating thermostats
2182should be chosen larger than the typical time scale for the dynamical events of
2183interest but shorter than the simulation time.
2184\begin{eqnarray}
2185P_{ion} &=& 2\pi \sqrt{\frac{Q_R}{4E_{R0}}}\\
2186P_{electron} &=& 2\pi \sqrt{\frac{Q_e}{4E_{e0}}}
2187\end{eqnarray}
2188where $P_{ion}$ and $P_{electron}$ are the periods of oscillation for the ionic and fictitious
2189electronic thermostats.
2190
2191
2192In simulated annealing simulations the electronic and ionic Temperatures are scaled
2193according to an exponential cooling schedule,
2194\begin{eqnarray}
2195T_e(t) = T_e^0 \exp^{-\frac{t}{\tau_e}}\\
2196T_{ionic}(t) = T_{ionic}^0 \exp^{-\frac{t}{\tau_{ionic}}}
2197\end{eqnarray}
2198where $T_e^0$ and $T_{ionic}^0$ are the initial temperatures, and $\tau_e$ and $\tau_{ionic}$
2199are the cooling rates in atomic units.
2200
2201
2202
2203\section{PSPW Tutorial 1: Minimizing the geometry for a C$_2$ molecule}
2204\label{sec:pspw_sd}
2205
2206In this section we show how use the PSPW module to optimize the geometry
2207for a C$_2$ molecule at the PBE96 levels.
2208
2209In the following example we show the input needed to optimize the geometry
2210for a C$_2$ molecule at the LDA level.  In this example, default pseudopotentials
2211from the pseudopotential library are used for C, the boundary condition is free-space,
2212the exchange correlation functional is PBE96, The boundary condition is free-space, and
2213the simulation cell cell is aperiodic and cubic with a side length of 10.0 Angstroms and has
221440 grid points in each direction (cutoff energy is 44 Ry).
2215\begin{verbatim}
2216
2217start c2_pspw_pbe96
2218title "C2 restricted singlet dimer optimization - PBE96/44Ry"
2219
2220geometry
2221C    -0.62 0.0 0.0
2222C     0.62 0.0 0.0
2223end
2224
2225pspw
2226   simulation_cell units angstroms
2227      boundary_conditions aperiodic
2228      SC 10.0
2229      ngrid 40 40 40
2230   end
2231   xc pbe96
2232end
2233set nwpw:minimizer 2
2234task pspw optimize
2235\end{verbatim}
2236
2237
2238
2239\normalsize
2240\section{PSPW Tutorial 2: Running a Car-Parrinello Simulation}
2241\label{sec:pspw_cp}
2242\normalsize
2243
2244In this section we show how use the PSPW module to perform a Car-Parrinello
2245molecular dynamic simulation for a C$_2$ molecule at the LDA level.
2246Before running a PSPW Car-Parrinello  simulation the system should be
2247on the Born-Oppenheimer surface, i.e. the one-electron orbitals should be minimized
2248with respect to the total energy (i.e. task pspw energy).  The input needed
2249is basically the same as for optimizing the geometry of a C$_2$ molecule at the LDA level,
2250except that and additional Car-Parrinello sub-block is added.
2251
2252In the following example we show the input needed to run a Car-Parrinello simulation
2253for a C$_2$ molecule at the LDA level.  In this example, default pseudopotentials
2254from the pseudopotential library are used for C, the boundary condition is free-space,
2255the exchange correlation functional is LDA, The boundary condition is free-space, and
2256the simulation cell cell is aperiodic and cubic with a side length of 10.0 Angstroms and has
225740 grid points in each direction (cutoff energy is 44 Ry).  The time step and fake mass
2258for the Car-Parrinello run are specified to be 5.0 au and 600.0 au, respectively.
2259
2260\begin{verbatim}
2261
2262start c2_pspw_lda_md
2263title "C2 restricted singlet dimer, LDA/44Ry - constant energy Car-Parrinello simulation"
2264
2265geometry
2266C    -0.62 0.0 0.0
2267C     0.62 0.0 0.0
2268end
2269
2270pspw
2271   simulation_cell units angstroms
2272      boundary_conditions aperiodic
2273      lattice
2274        lat_a 10.00d0
2275        lat_b 10.00d0
2276        lat_c 10.00d0
2277      end
2278      ngrid 40 40 40
2279   end
2280   Car-Parrinello
2281     fake_mass 600.0
2282     time_step 5.0
2283     loop 10 10
2284   end
2285end
2286set nwpw:minimizer 2
2287task pspw energy
2288task pspw Car-Parrinello
2289\end{verbatim}
2290
2291
2292\normalsize
2293\section{PSPW Tutorial 3: optimizing a unit cell and geometry for Silicon-Carbide}
2294\label{sec:pspw_unitcell_optimization}
2295
2296The following example demonstrates how to uses the PSPW module to optimize the unit cell
2297and geometry for a silicon-carbide crystal.
2298
2299\begin{verbatim}
2300title "SiC 8 atom cubic cell - geometry and unit cell optimization"
2301
2302start SiC
2303
2304#**** Enter the geometry using fractional coordinates ****
2305geometry units au center noautosym noautoz print
2306  system crystal
2307    lat_a 8.277d0
2308    lat_b 8.277d0
2309    lat_c 8.277d0
2310    alpha 90.0d0
2311    beta  90.0d0
2312    gamma 90.0d0
2313  end
2314Si    -0.50000d0  -0.50000d0  -0.50000d0
2315Si     0.00000d0   0.00000d0  -0.50000d0
2316Si     0.00000d0  -0.50000d0   0.00000d0
2317Si    -0.50000d0   0.00000d0   0.00000d0
2318C     -0.25000d0  -0.25000d0  -0.25000d0
2319C      0.25000d0   0.25000d0  -0.25000d0
2320C      0.25000d0  -0.25000d0   0.25000d0
2321C     -0.25000d0   0.25000d0   0.25000d0
2322end
2323
2324#***** setup the nwpw gamma point code ****
2325nwpw
2326   simulation_cell
2327     ngrid 16 16 16
2328   end
2329   ewald_ncut 8
2330end
2331set nwpw:minimizer 2
2332set nwpw:psi_nolattice .true.  # turns of unit cell checking for wavefunctions
2333
2334driver
2335  clear
2336  maxiter 40
2337end
2338set includestress .true.    # this option tells driver to optimize the unit cell
2339
2340task pspw optimize
2341
2342\end{verbatim}
2343
2344\normalsize
2345\section{PSPW Tutorial 4: QM/MM simulation for CCl$_4$ + 64H$_2$O}
2346\label{sec:pspw_qmmm_simulation}
2347
2348In this section we show how use the PSPW module to perform a Car-Parrinello
2349QM/MM simulation for a CCl$_4$ molecule in a box of 64 H$_2$O.
2350Before running a PSPW Car-Parrinello  simulation the system should be
2351on the Born-Oppenheimer surface, i.e. the one-electron orbitals should be minimized
2352with respect to the total energy (i.e. task pspw energy).
2353
2354In the following example we show the input needed to run a Car-Parrinello
2355QM/MM simulation for a CCl$_4$ molecule in a box of 64 H$_2$O.
2356In this example, default pseudopotentials from the pseudopotential library are used
2357for C, Cl, O\^\ and H\^\, exchange correlation functional is PBE96, The boundary condition is periodic, and
2358with a side length of 23.577 Bohrs and has a cutoff energy is 50 Ry).  The time step and fake mass
2359for the Car-Parrinello run are specified to be 5.0 au and 600.0 au, respectively.
2360\normalsize
2361\begin{verbatim}
2362title "CCl4 + water64 QM/MM simulation- 195 atom cell"
2363
2364memory 1500 mb
2365start CCl4-water64
2366
2367#scratch_dir   ./perm
2368#permanent_dir ./perm
2369\end{verbatim}
2370\tiny
2371\begin{verbatim}
2372geometry nocenter noautoz noautosym
2373C        0.7804E-02 -0.2897E-02  0.1420E-02 -0.2910E-07 -0.1055E-07 -0.2001E-07
2374Cl      -0.8603E+00  0.1547E+01  0.2556E+00 -0.2910E-07 -0.1055E-07 -0.2001E-07
2375Cl       0.8421E+00 -0.4774E+00  0.1518E+01 -0.2910E-07 -0.1055E-07 -0.2001E-07
2376Cl      -0.1167E+01 -0.1279E+01 -0.4592E+00 -0.2910E-07 -0.1055E-07 -0.2001E-07
2377Cl       0.1218E+01  0.1972E+00 -0.1309E+01 -0.2910E-07 -0.1055E-07 -0.2001E-07
2378
2379O^       0.1545E+01 -0.3640E+01 -0.2558E+01  0.1675E-03 -0.2134E-03  0.2608E-03
2380H^       0.6377E+00 -0.4054E+01 -0.2486E+01 -0.8467E-05 -0.6710E-04 -0.1101E-02
2381H^       0.1860E+01 -0.3690E+01 -0.3506E+01  0.9734E-03  0.1042E-02  0.4566E-03
2382O^      -0.6138E+01 -0.4627E+01 -0.1181E+01 -0.1477E-03 -0.1616E-03 -0.1670E-03
2383H^      -0.7068E+01 -0.4458E+01 -0.8549E+00 -0.6948E-03 -0.5435E-03 -0.1521E-02
2384H^      -0.5628E+01 -0.5133E+01 -0.4858E+00 -0.8855E-03  0.2768E-03  0.6961E-03
2385O^       0.3808E+01  0.2935E+01  0.2147E+01 -0.6374E-04  0.1081E-03 -0.3184E-04
2386H^       0.4187E+01  0.2253E+01  0.2772E+01  0.5832E-03  0.5155E-03  0.2134E-04
2387H^       0.4511E+01  0.3612E+01  0.1926E+01 -0.4943E-03  0.3230E-03 -0.7034E-03
2388O^      -0.6210E+00 -0.5260E+01 -0.2842E+01  0.1727E-03  0.9623E-04  0.8184E-04
2389H^      -0.2750E+00 -0.5523E+01 -0.3742E+01  0.1119E-03  0.7072E-03 -0.1203E-03
2390H^      -0.7042E+00 -0.6073E+01 -0.2266E+01 -0.6331E-03 -0.4150E-03 -0.7442E-03
2391O^       0.2760E+01  0.2730E+01 -0.4774E+01 -0.1327E-03  0.3354E-03 -0.1366E-03
2392H^       0.3676E+01  0.2570E+01 -0.5142E+01 -0.5941E-04  0.5145E-03 -0.3057E-04
2393H^       0.2828E+01  0.2989E+01 -0.3811E+01 -0.2370E-03  0.1001E-02 -0.3029E-03
2394O^      -0.2387E+01  0.5716E+01  0.3965E+01 -0.6296E-04 -0.1405E-04 -0.2853E-04
2395H^      -0.1694E+01  0.5121E+01  0.3558E+01  0.5787E-04 -0.5014E-03  0.9024E-03
2396H^      -0.1939E+01  0.6465E+01  0.4453E+01 -0.2046E-03  0.6948E-04 -0.2150E-04
2397O^      -0.3456E+01  0.5123E+01 -0.2154E+01 -0.3714E-04 -0.1948E-03  0.4699E-05
2398H^      -0.3043E+01  0.4342E+01 -0.2622E+01 -0.1119E-05 -0.3220E-03  0.2734E-03
2399H^      -0.3693E+01  0.5826E+01 -0.2825E+01 -0.2085E-03 -0.4813E-03 -0.2351E-03
2400O^       0.5940E+00  0.1399E+01  0.3463E+01 -0.1288E-03 -0.9776E-04 -0.1409E-03
2401H^       0.1245E+01  0.1913E+01  0.2904E+01 -0.3790E-03 -0.4010E-03 -0.6948E-03
2402H^      -0.3201E+00  0.1790E+01  0.3355E+01 -0.1070E-03  0.6148E-04  0.3431E-03
2403O^       0.4845E+01  0.4936E+01  0.4088E+01  0.2876E-03 -0.2625E-03 -0.7661E-04
2404H^       0.4098E+01  0.5168E+01  0.3465E+01 -0.1301E-03 -0.5756E-04  0.4909E-03
2405H^       0.4740E+01  0.3991E+01  0.4397E+01  0.1202E-02 -0.7660E-03 -0.1345E-02
2406O^      -0.7209E+00  0.4285E+01  0.1237E+01 -0.1519E-03  0.6569E-04  0.1096E-03
2407H^       0.1958E-01  0.4499E+01  0.6000E+00 -0.5731E-04 -0.2919E-03  0.9929E-04
2408H^      -0.1597E+01  0.4541E+01  0.8281E+00 -0.1117E-03 -0.3977E-03 -0.2666E-03
2409O^       0.3836E+01  0.2390E-01 -0.6670E+00  0.2697E-04 -0.6474E-05 -0.4852E-03
2410H^       0.4335E+01 -0.5028E+00  0.2166E-01 -0.1127E-02  0.1144E-02  0.1230E-02
2411H^       0.2962E+01 -0.4225E+00 -0.8598E+00 -0.1721E-03  0.3171E-03 -0.3321E-03
2412O^      -0.7034E+00 -0.2120E+01 -0.3538E+01  0.1292E-03 -0.1072E-03 -0.1333E-03
2413H^      -0.7567E+00 -0.3086E+01 -0.3284E+01  0.5037E-03 -0.2660E-03 -0.6455E-03
2414H^       0.2369E+00 -0.1894E+01 -0.3793E+01  0.2452E-03  0.6329E-03  0.9344E-03
2415O^       0.1465E+01 -0.4009E+01  0.4737E+01  0.3828E-03 -0.5067E-04  0.2649E-03
2416H^       0.4923E+00 -0.3944E+01  0.4958E+01  0.3572E-03  0.1205E-02 -0.2187E-03
2417H^       0.1582E+01 -0.4544E+01  0.3901E+01  0.1254E-03 -0.4486E-03  0.4761E-03
2418O^      -0.3224E+01 -0.3091E+00  0.1701E+01 -0.2499E-03 -0.2643E-03 -0.1442E-03
2419H^      -0.2950E+01 -0.9626E+00  0.9949E+00 -0.4237E-03 -0.8809E-04 -0.3749E-03
2420H^      -0.3005E+01  0.6188E+00  0.1398E+01 -0.6682E-03 -0.1587E-03 -0.1246E-03
2421O^       0.5321E+01  0.3728E+01 -0.5992E+01  0.1243E-03  0.1407E-03  0.3011E-04
2422H^       0.5383E+01  0.3541E+01 -0.5012E+01  0.2175E-03 -0.4499E-04  0.4888E-05
2423H^       0.5850E+01  0.3045E+01 -0.6496E+01 -0.1043E-03  0.1021E-03 -0.1441E-03
2424O^      -0.3365E+01 -0.2780E+01  0.3200E+01  0.2012E-03 -0.1310E-03 -0.1047E-04
2425H^      -0.4036E+01 -0.2193E+01  0.3653E+01 -0.5141E-03 -0.4867E-03 -0.6379E-03
2426H^      -0.3029E+01 -0.2327E+01  0.2375E+01  0.8564E-03  0.1057E-03  0.3940E-03
2427O^      -0.6115E+01  0.4096E+01 -0.1385E+01 -0.2067E-03 -0.2544E-03  0.9568E-04
2428H^      -0.6740E+01  0.3315E+01 -0.1402E+01 -0.7231E-04 -0.3492E-03 -0.2122E-03
2429H^      -0.5445E+01  0.4002E+01 -0.2121E+01 -0.1573E-03  0.1356E-03  0.9095E-04
2430O^      -0.1742E+01  0.5855E+01 -0.5125E+01 -0.4122E-03 -0.4759E-04 -0.3874E-04
2431H^      -0.1849E+01  0.6848E+01 -0.5063E+01  0.6007E-03  0.8115E-04 -0.2854E-03
2432H^      -0.9641E+00  0.5640E+01 -0.5716E+01 -0.3814E-03 -0.9778E-03  0.3468E-03
2433O^       0.3739E+01  0.4907E+01 -0.2428E+00 -0.1192E-05 -0.2368E-03  0.6724E-04
2434H^       0.3792E+01  0.3995E+01  0.1643E+00 -0.1132E-02 -0.3235E-03  0.1695E-04
2435H^       0.4347E+01  0.4954E+01 -0.1035E+01 -0.9395E-03 -0.1354E-02 -0.7298E-03
2436O^       0.2987E+00 -0.5628E+01 -0.8431E-01 -0.1166E-03  0.1187E-03 -0.7732E-04
2437H^       0.1276E+01 -0.5804E+01  0.3260E-01 -0.1801E-03  0.3589E-04  0.3022E-03
2438H^       0.5558E-01 -0.4777E+01  0.3824E+00 -0.2238E-03  0.1517E-03 -0.1903E-03
2439O^       0.1671E+01 -0.3048E+00 -0.4287E+01 -0.8597E-04  0.3502E-04  0.1369E-03
2440H^       0.2286E+01 -0.1088E+01 -0.4380E+01  0.2453E-03  0.3302E-03 -0.1838E-03
2441H^       0.1079E+01 -0.2489E+00 -0.5091E+01  0.4959E-03  0.6558E-03 -0.2504E-03
2442O^      -0.2941E-01  0.2661E+01 -0.4082E+01  0.1756E-03 -0.5742E-04 -0.1573E-03
2443H^      -0.8858E+00  0.2586E+01 -0.3571E+01  0.9848E-03 -0.7154E-04  0.1212E-02
2444H^       0.2989E+00  0.1746E+01 -0.4318E+01  0.2778E-03 -0.9530E-04  0.1150E-03
2445O^      -0.1659E+01  0.3915E+00 -0.2844E+01 -0.1270E-04 -0.1120E-03 -0.9166E-04
2446H^      -0.1204E+01  0.8157E+00 -0.2061E+01 -0.1351E-02  0.1320E-02 -0.9371E-04
2447H^      -0.1101E+01 -0.3654E+00 -0.3184E+01  0.1361E-02  0.3184E-03  0.1229E-02
2448O^       0.2089E+01  0.5535E+01 -0.3917E+01  0.1204E-04 -0.7803E-04  0.8825E-04
2449H^       0.2792E+01  0.6204E+01 -0.4157E+01  0.3230E-03 -0.4625E-03 -0.6275E-04
2450H^       0.2250E+01  0.4687E+01 -0.4423E+01 -0.8063E-03 -0.1769E-04 -0.2737E-03
2451O^      -0.3593E+01  0.4433E+01  0.9266E+00  0.1739E-03 -0.3290E-04 -0.3843E-04
2452H^      -0.4481E+01  0.4653E+01  0.1330E+01  0.7439E-04  0.3872E-03 -0.4940E-03
2453H^      -0.3441E+01  0.5007E+01  0.1217E+00  0.4864E-03 -0.6984E-03 -0.4424E-03
2454O^       0.5367E+01 -0.2126E+01 -0.1991E+01 -0.2551E-03  0.1323E-04  0.1464E-03
2455H^       0.4615E+01 -0.2084E+01 -0.1333E+01 -0.9232E-03 -0.8571E-03 -0.5616E-03
2456H^       0.6028E+01 -0.2817E+01 -0.1698E+01 -0.9047E-03 -0.8682E-03 -0.4681E-03
2457O^      -0.5302E+01  0.2831E+01  0.3682E+01 -0.8660E-05  0.1412E-03  0.1894E-06
2458H^      -0.5277E+01  0.3688E+01  0.3167E+01  0.1207E-02  0.1614E-03  0.9149E-04
2459H^      -0.5660E+01  0.2102E+01  0.3099E+01 -0.2688E-03  0.5247E-03 -0.3316E-03
2460O^      -0.4788E+01 -0.5922E+01 -0.4919E+01 -0.3929E-03 -0.9853E-05  0.3585E-03
2461H^      -0.4466E+01 -0.4994E+01 -0.5108E+01  0.2628E-03 -0.1497E-03  0.8332E-03
2462H^      -0.5586E+01 -0.6120E+01 -0.5489E+01 -0.1623E-03  0.6350E-03 -0.1750E-03
2463O^       0.2449E+01  0.5722E+01  0.2217E+01  0.1955E-03  0.6679E-06  0.1909E-03
2464H^       0.1457E+01  0.5804E+01  0.2318E+01  0.1783E-03 -0.2907E-03  0.2435E-03
2465H^       0.2696E+01  0.4757E+01  0.2130E+01  0.5892E-03 -0.2071E-04  0.1586E-02
2466O^       0.5651E+01  0.8176E+00 -0.2769E+01 -0.5866E-04 -0.1602E-04 -0.5855E-04
2467H^       0.4741E+01  0.1046E+01 -0.2421E+01 -0.1450E-04 -0.4401E-03  0.3128E-03
2468H^       0.5700E+01 -0.1641E+00 -0.2953E+01  0.2489E-03  0.4500E-04 -0.2890E-03
2469O^       0.2231E+01 -0.2461E+01 -0.6899E-01 -0.1876E-04  0.7416E-04  0.1305E-03
2470H^       0.2029E+01 -0.2779E+01 -0.9952E+00  0.1240E-02 -0.7506E-03  0.1383E-03
2471H^       0.1687E+01 -0.2982E+01  0.5886E+00  0.7330E-03 -0.8484E-03  0.8706E-05
2472O^       0.2294E+01  0.3375E+01  0.4716E+01 -0.1652E-03  0.2400E-03 -0.1586E-04
2473H^       0.1550E+01  0.2835E+01  0.5111E+01  0.4246E-03 -0.1052E-02 -0.6720E-03
2474H^       0.3160E+01  0.3107E+01  0.5138E+01  0.1669E-04  0.1270E-02  0.2646E-03
2475O^       0.7453E+00  0.4511E+01 -0.1428E+01  0.3864E-05  0.1202E-03 -0.1956E-04
2476H^       0.1116E+01  0.5421E+01 -0.1241E+01  0.2420E-03  0.3195E-06  0.1360E-03
2477H^       0.4066E+00  0.4476E+01 -0.2368E+01  0.5441E-03  0.1747E-03 -0.2138E-03
2478O^       0.3229E+01  0.2523E+01 -0.1702E+01  0.8684E-04  0.1770E-03 -0.1302E-03
2479H^       0.2367E+01  0.3024E+01 -0.1626E+01  0.1473E-03  0.2022E-03  0.3857E-03
2480H^       0.3259E+01  0.1803E+01 -0.1008E+01  0.2618E-03 -0.1686E-03 -0.4964E-03
2481O^      -0.4696E+01  0.1761E+01 -0.5781E+01 -0.1399E-03  0.5263E-04 -0.1977E-04
2482H^      -0.4285E+01  0.1469E+01 -0.4918E+01 -0.2145E-03  0.4890E-03  0.1638E-03
2483H^      -0.4401E+01  0.2692E+01 -0.5993E+01  0.4905E-03 -0.3279E-03 -0.8519E-03
2484O^      -0.1324E+01  0.8348E+00  0.5926E+01 -0.4021E-03 -0.2283E-03  0.1866E-03
2485H^      -0.9165E+00  0.1419E+01  0.5224E+01  0.6640E-03 -0.3537E-03  0.7015E-03
2486H^      -0.1446E+01 -0.8850E-01  0.5561E+01  0.6728E-04 -0.2690E-03  0.1331E-03
2487O^       0.3599E+01 -0.4806E+01  0.5923E+01  0.2240E-03  0.1057E-03 -0.1705E-06
2488H^       0.2749E+01 -0.4798E+01  0.5396E+01  0.7639E-03  0.1003E-02 -0.8568E-03
2489H^       0.3835E+01 -0.5749E+01  0.6158E+01 -0.8554E-03 -0.1746E-03 -0.3717E-04
2490O^       0.3944E+01  0.1279E+01  0.4873E+01 -0.1309E-04  0.2875E-03 -0.3979E-03
2491H^       0.4210E+01  0.1174E+01  0.5831E+01  0.1066E-02  0.1745E-02 -0.5234E-03
2492H^       0.3429E+01  0.4734E+00  0.4579E+01 -0.2975E-03 -0.1943E-03  0.1395E-02
2493O^       0.5483E+01 -0.7180E+00 -0.5757E+01  0.1312E-03  0.1083E-03  0.7991E-04
2494H^       0.6244E+01 -0.1590E+00 -0.6085E+01 -0.2745E-03  0.5021E-03 -0.1907E-03
2495H^       0.5629E+01 -0.9484E+00 -0.4795E+01  0.4035E-03  0.4934E-03  0.1307E-03
2496O^      -0.3287E+00  0.3790E+01  0.5524E+01 -0.7176E-05  0.1175E-03  0.2084E-04
2497H^       0.3281E+00  0.3309E+01  0.4943E+01  0.4936E-04  0.5155E-04  0.1453E-03
2498H^      -0.5608E+00  0.3217E+01  0.6310E+01  0.1927E-03  0.3956E-03  0.2736E-03
2499O^      -0.4527E+01 -0.7948E+00 -0.3582E+01 -0.5240E-04  0.1526E-03  0.1337E-03
2500H^      -0.3613E+01 -0.3987E+00 -0.3669E+01 -0.1226E-03  0.1632E-03 -0.5451E-03
2501H^      -0.4999E+01 -0.3775E+00 -0.2804E+01  0.5636E-03  0.5893E-04  0.5571E-03
2502O^      -0.6007E+01 -0.5060E+01  0.4881E+01 -0.1087E-04  0.3392E-03  0.9991E-04
2503H^      -0.5573E+01 -0.4743E+01  0.4038E+01 -0.1440E-03 -0.6469E-03 -0.3565E-03
2504H^      -0.6934E+01 -0.4690E+01  0.4939E+01 -0.3791E-03 -0.4391E-03 -0.7065E-03
2505O^       0.2677E+01 -0.3981E+01  0.2476E+01  0.1089E-03 -0.1054E-03  0.1375E-03
2506H^       0.3493E+01 -0.3506E+01  0.2147E+01 -0.6883E-04  0.1734E-03  0.8114E-04
2507H^       0.2947E+01 -0.4819E+01  0.2949E+01  0.4465E-03  0.2834E-03  0.6339E-03
2508O^      -0.5289E+01  0.1887E+01  0.8394E+00  0.9633E-04 -0.1890E-04 -0.1561E-03
2509H^      -0.5106E+01  0.1824E+01 -0.1418E+00  0.5279E-03 -0.4110E-03 -0.5213E-04
2510H^      -0.5189E+01  0.9829E+00  0.1255E+01  0.4782E-03  0.2522E-03  0.3444E-03
2511O^      -0.2867E+01 -0.3827E+01 -0.4340E+01  0.3624E-03 -0.4131E-03 -0.1321E-03
2512H^      -0.2075E+01 -0.3938E+01 -0.3739E+01  0.3156E-03  0.3721E-03  0.8843E-04
2513H^      -0.3635E+01 -0.3461E+01 -0.3814E+01  0.6431E-03  0.1311E-02 -0.9227E-03
2514O^      -0.3108E+01 -0.5334E+01 -0.4502E+00  0.1643E-03  0.8922E-04 -0.6109E-04
2515H^      -0.3192E+01 -0.5798E+01 -0.1332E+01 -0.7280E-03  0.6552E-03 -0.2814E-03
2516H^      -0.3767E+01 -0.4583E+01 -0.4035E+00 -0.1942E-04 -0.1519E-03  0.1222E-02
2517O^      -0.4554E+01 -0.2685E+01 -0.1490E+01 -0.1628E-03  0.1207E-03 -0.5201E-04
2518H^      -0.4735E+01 -0.2235E+01 -0.2365E+01 -0.7933E-03  0.5578E-04  0.5343E-04
2519H^      -0.5002E+01 -0.2175E+01 -0.7554E+00 -0.7371E-03 -0.5704E-03  0.7546E-04
2520O^       0.3475E+01 -0.4761E+01 -0.1158E+01  0.4877E-04  0.1059E-04 -0.5547E-04
2521H^       0.3973E+01 -0.5628E+01 -0.1186E+01  0.4343E-03  0.2527E-03 -0.6376E-03
2522H^       0.2590E+01 -0.4871E+01 -0.1610E+01  0.9492E-04 -0.8052E-04 -0.1260E-03
2523O^       0.3854E+01 -0.3250E+01 -0.4023E+01  0.1560E-03 -0.1082E-03  0.5321E-04
2524H^       0.3588E+01 -0.3599E+01 -0.4922E+01  0.9956E-03 -0.1719E-03 -0.1793E-03
2525H^       0.4732E+01 -0.2777E+01 -0.4097E+01  0.5500E-03 -0.7001E-03  0.9756E-03
2526O^       0.5345E+01 -0.2101E+01  0.4132E+01 -0.2089E-03 -0.2574E-03  0.1618E-04
2527H^       0.6127E+01 -0.2332E+01  0.4711E+01 -0.9618E-03 -0.1658E-03  0.1067E-02
2528H^       0.4498E+01 -0.2226E+01  0.4648E+01 -0.8397E-03  0.5189E-03 -0.8292E-03
2529O^       0.1412E+00 -0.6149E+01  0.3138E+01  0.2892E-03  0.5036E-03  0.3292E-04
2530H^      -0.7153E+00 -0.6083E+01  0.2626E+01  0.1289E-03  0.4802E-03  0.3119E-03
2531H^      -0.2587E-01 -0.6612E+01  0.4008E+01  0.3628E-03  0.1494E-02  0.5832E-03
2532O^      -0.3946E+00 -0.1042E+01  0.4471E+01 -0.1576E-04 -0.2368E-03  0.1489E-03
2533H^       0.9542E-03 -0.3942E+00  0.3820E+01 -0.3498E-03  0.1869E-03  0.3694E-03
2534H^      -0.1312E+01 -0.1300E+01  0.4169E+01  0.4445E-03 -0.1244E-02 -0.3945E-03
2535O^       0.5287E+01 -0.5793E+01  0.1490E+01 -0.7884E-04 -0.1027E-03 -0.2446E-03
2536H^       0.5544E+01 -0.5748E+01  0.2455E+01  0.2712E-03 -0.1871E-03 -0.3382E-03
2537H^       0.4354E+01 -0.5449E+01  0.1377E+01  0.1098E-03  0.5129E-03  0.2576E-04
2538O^      -0.1759E+01  0.2460E+01  0.3320E+01 -0.7676E-04 -0.2161E-03 -0.1200E-03
2539H^      -0.2739E+01  0.2657E+01  0.3343E+01 -0.8392E-04 -0.2861E-03 -0.1401E-03
2540H^      -0.1350E+01  0.2896E+01  0.2518E+01  0.1772E-03  0.9790E-03  0.6584E-03
2541O^      -0.3269E+01  0.3863E+01 -0.6091E+01 -0.1391E-03  0.5335E-04  0.6947E-04
2542H^      -0.3641E+01  0.4123E+01 -0.6982E+01 -0.1000E-02  0.3166E-03  0.5059E-03
2543H^      -0.2735E+01  0.4622E+01 -0.5719E+01 -0.3032E-03  0.1718E-03  0.6328E-04
2544O^      -0.1995E+01 -0.3980E+01  0.5500E+01 -0.2062E-03  0.5484E-04 -0.1547E-03
2545H^      -0.1956E+01 -0.3408E+01  0.6320E+01  0.2765E-03 -0.4418E-03  0.1804E-03
2546H^      -0.2256E+01 -0.3419E+01  0.4714E+01 -0.9111E-03  0.4974E-03  0.3954E-03
2547O^       0.4884E+01  0.6075E+01 -0.3080E+01  0.7152E-05  0.2327E-03 -0.1652E-05
2548H^       0.5552E+01  0.5525E+01 -0.2578E+01 -0.1376E-04 -0.1713E-03 -0.4170E-03
2549H^       0.5056E+01  0.7045E+01 -0.2906E+01  0.7043E-03  0.1266E-03 -0.1535E-03
2550O^       0.2615E+01 -0.1474E+01  0.4779E+01  0.2480E-03  0.2773E-03  0.6476E-04
2551H^       0.3294E+01 -0.7726E+00  0.4997E+01  0.6977E-03 -0.5022E-03  0.1176E-02
2552H^       0.2248E+01 -0.1858E+01  0.5626E+01 -0.5883E-03 -0.2609E-03 -0.5399E-03
2553O^      -0.3116E+01 -0.1271E+01  0.5862E+01  0.4484E-04 -0.4921E-03 -0.2958E-03
2554H^      -0.3824E+01 -0.1292E+01  0.6568E+01  0.4160E-03 -0.1014E-02  0.6119E-04
2555H^      -0.3115E+01 -0.3749E+00  0.5417E+01  0.2101E-03  0.3728E-04  0.7720E-03
2556O^      -0.3732E+01  0.4587E+00 -0.1024E+01  0.1530E-04  0.1409E-03  0.2144E-03
2557H^      -0.3291E+01  0.6710E+00 -0.1521E+00  0.4425E-03  0.2528E-04  0.2437E-04
2558H^      -0.3039E+01  0.3972E+00 -0.1742E+01 -0.2884E-03 -0.8982E-04 -0.6985E-04
2559O^      -0.6022E+01 -0.2054E+01  0.9880E+00  0.1148E-03  0.2240E-04 -0.6860E-04
2560H^      -0.5613E+01 -0.2820E+01  0.1483E+01 -0.8247E-03 -0.3674E-03  0.1037E-03
2561H^      -0.6561E+01 -0.1498E+01  0.1621E+01 -0.9049E-03 -0.3507E-03 -0.6107E-03
2562O^       0.5388E+01 -0.6596E-01  0.2375E+01  0.1300E-03  0.7636E-04  0.9649E-04
2563H^       0.4393E+01  0.2216E-01  0.2323E+01  0.8852E-05 -0.9209E-03  0.5667E-03
2564H^       0.5638E+01 -0.5050E+00  0.3238E+01  0.9431E-03 -0.1611E-03 -0.2704E-03
2565O^      -0.3777E+00 -0.3378E+01  0.1384E+01 -0.1187E-03  0.6597E-04 -0.9305E-04
2566H^       0.3137E+00 -0.3344E+01  0.2106E+01  0.6941E-04 -0.1725E-03 -0.2510E-03
2567H^      -0.2333E+00 -0.2620E+01  0.7483E+00 -0.1763E-03  0.1878E-03  0.5338E-04
2568O^      -0.5167E+01  0.9137E-01  0.4518E+01 -0.7764E-04 -0.2549E-04  0.4651E-03
2569H^      -0.4490E+01  0.2494E+00  0.3799E+01 -0.5003E-03 -0.3149E-03  0.3790E-05
2570H^      -0.5695E+01  0.9276E+00  0.4669E+01 -0.8687E-03 -0.3647E-03 -0.4836E-03
2571end
2572\end{verbatim}
2573\normalsize
2574\begin{verbatim}
2575#set up the QM/MM simulation and cell
2576NWPW
2577   SIMULATION_CELL
2578      SC 23.577
2579   END
2580   QMMM
2581      lj_ion_parameters C  3.41000000d0 0.10000000d0
2582      lj_ion_parameters Cl  3.45000000d0 0.16d0
2583      lj_ion_parameters O^ 3.16555789d0 0.15539425d0
2584
2585      # new input format
2586      fragment spc
2587         size 3
2588         index_start 6:195:3
2589         shake units angstroms 1 2 3 cyclic 1.0 1.632993125 1.0
2590      end
2591   END
2592END
2593
2594#***** Setup conjugate gradient code ****
2595nwpw
2596   cutoff 25.0
2597   xc pbe96
2598   lmbfgs
2599   ewald_ncut 1
2600end
2601set nwpw:lcao_skip .true.
2602task pspw energy
2603
2604
2605#***** Setup Car-Parrinello code ****
2606nwpw
2607   car-parrinello
2608      Nose-Hoover 1200.0 300.0 1200.0 300.0
2609      time_step 5.00
2610      fake_mass 750.0
2611      loop 10 2000
2612      xyz_filename         ccl4.00.xyz
2613      ion_motion_filename  ccl4.00.ion_motion
2614      emotion_filename     ccl4.00.emotion
2615    end
2616end
2617task pspw car-parrinello
2618
2619\end{verbatim}
2620
2621
2622
2623
2624\normalsize
2625\section{Band Tutorial 1: Minimizing the energy of a silicon-carbide crystal by running a PSPW and Band simulation in tandem}
2626\label{sec:band_tutorial1}
2627\normalsize
2628
2629The following input deck performs a PSPW energy calculation followed
2630by a Band energy calculation at the $\Gamma$-point  for a cubic (8-atom)
2631silicon-carbide crystal.  Since the geometry is entered using fractional coordinates
2632the unit cell parameters do not have to be re-specified in the simulation\_cell
2633nwpw sub-block.  In this example, default pseudopotential from the pseudopotential
2634library are used for C and Si.  The advantage of running these calculations in tandem is that
2635the Band code uses the wavefunctions generated from the faster PSPW calculation for
2636its initial guess.  The PSPW energy is -38.353570, and the Band energy is -38.353570.
2637
2638\begin{verbatim}
2639start SiC_band
2640title "SiC 8 atom cubic cell"
2641
2642#**** geometry entered using fractional coordinates ****
2643geometry units au center noautosym noautoz print
2644  system crystal
2645    lat_a 8.277d0
2646    lat_b 8.277d0
2647    lat_c 8.277d0
2648    alpha 90.0d0
2649    beta  90.0d0
2650    gamma 90.0d0
2651  end
2652Si    -0.50000d0  -0.50000d0  -0.50000d0
2653Si     0.00000d0   0.00000d0  -0.50000d0
2654Si     0.00000d0  -0.50000d0   0.00000d0
2655Si    -0.50000d0   0.00000d0   0.00000d0
2656C     -0.25000d0  -0.25000d0  -0.25000d0
2657C      0.25000d0   0.25000d0  -0.25000d0
2658C      0.25000d0  -0.25000d0   0.25000d0
2659C     -0.25000d0   0.25000d0   0.25000d0
2660end
2661
2662#***** setup the nwpw gamma point code ****
2663nwpw
2664   simulation_cell
2665     ngrid 16 16 16
2666   end
2667   brillouin_zone
2668     kvector  0.0 0.0 0.0
2669   end
2670   ewald_ncut 8
2671end
2672set nwpw:minimizer 2
2673set nwpw:psi_brillioun_check .false.
2674task pspw energy
2675task band energy
2676\end{verbatim}
2677
2678
2679
2680
2681\normalsize
2682\section{BAND Tutorial 2: optimizing a unit cell and geometry for Silicon-Carbide}
2683\label{sec:band_unitcell_optimization}
2684
2685The following example demonstrates how to uses the BAND module to optimize the unit cell
2686and geometry for a silicon-carbide crystal.
2687
2688\begin{verbatim}
2689title "SiC 8 atom cubic cell - geometry and unit cell optimization"
2690
2691start SiC
2692
2693#**** Enter the geometry using fractional coordinates ****
2694geometry units au center noautosym noautoz print
2695  system crystal
2696    lat_a 8.277d0
2697    lat_b 8.277d0
2698    lat_c 8.277d0
2699    alpha 90.0d0
2700    beta  90.0d0
2701    gamma 90.0d0
2702  end
2703Si    -0.50000d0  -0.50000d0  -0.50000d0
2704Si     0.00000d0   0.00000d0  -0.50000d0
2705Si     0.00000d0  -0.50000d0   0.00000d0
2706Si    -0.50000d0   0.00000d0   0.00000d0
2707C     -0.25000d0  -0.25000d0  -0.25000d0
2708C      0.25000d0   0.25000d0  -0.25000d0
2709C      0.25000d0  -0.25000d0   0.25000d0
2710C     -0.25000d0   0.25000d0   0.25000d0
2711end
2712
2713#***** setup the nwpw gamma point code ****
2714nwpw
2715   simulation_cell
2716     ngrid 16 16 16
2717   end
2718   ewald_ncut 8
2719   monkhorst-pack 2 2 2
2720   lmbfgs
2721end
2722
2723driver
2724  clear
2725  maxiter 40
2726end
2727set includestress .true.          # this option tells driver to optimize the unit cell
2728#set nwpw:stress_numerical .true.  #option to use numerical stresses
2729
2730task band optimize
2731
2732\end{verbatim}
2733
2734
2735\normalsize
2736\section{BAND Tutorial 3: optimizing a unit cell and geometry for Aluminum with fractional occupation}
2737\label{sec:band_unitcell_optimization}
2738
2739The following example demonstrates how to uses the BAND module to optimize the unit cell
2740and geometry for a Aluminum.
2741
2742\begin{verbatim}
2743title "Aluminum optimization with fractional occupation"
2744
2745start aluminumfrac
2746
2747memory 900 mb
2748
2749geometry noautoz
2750   system crystal
2751     lat_a 3.0
2752     lat_b 3.0
2753     lat_c 3.0
2754     alpha 90.0
2755     beta  90.0
2756     gamma 90.0
2757   end
2758Al  0.0 0.0 0.0
2759Al  0.0 0.5 0.5
2760Al  0.5 0.5 0.0
2761Al  0.5 0.0 0.5
2762end
2763set nwpw:cif_filename aluminum
2764
2765nwpw
2766   scf anderson
2767   mult 1
2768   smear  temperature 3500.0 fermi
2769   cutoff 15.0
2770   monkhorst-pack 3 3 3
2771   ewald_ncut 8
2772   mapping 2
2773end
2774set nwpw:lcao_skip .true.
2775
2776set includestress .true.
2777#set nwpw:stress_numerical .true.
2778
2779driver
2780   clear
2781end
2782task band optimize ignore
2783
2784\end{verbatim}
2785
2786
2787
2788\section{PAW Tutorial}
2789\label{sec:paw_tutorial}
2790
2791The following input deck performs for a water molecule a PSPW energy calculation followed
2792by a PAW energy calculation and a PAW geometry optimization calculation.
2793The default unit cell parameters are used (SC=20.0, ngrid 32 32 32).  In this simulation, the
2794first PAW run optimizes the wavefunction and the second PAW run optimizes the wavefunction
2795and geometry in tandem.
2796
2797\begin{verbatim}
2798title "paw steepest descent test"
2799
2800start paw_test
2801
2802charge 0
2803
2804geometry units au nocenter noautoz noautosym
2805O      0.00000    0.00000    0.01390
2806H     -1.49490    0.00000   -1.18710
2807H      1.49490    0.00000   -1.18710
2808end
2809
2810nwpw
2811   time_step 15.8
2812   ewald_rcut 1.50
2813   tolerances 1.0d-8 1.0d-8
2814end
2815set nwpw:lcao_iterations 1
2816set nwpw:minimizer 2
2817task pspw energy
2818
2819task paw energy
2820
2821nwpw
2822   time_step 5.8
2823   geometry_optimize
2824   ewald_rcut 1.50
2825   tolerances 1.0d-7 1.0d-7 1.0d-4
2826end
2827task paw steepest_descent
2828
2829task paw optimize
2830\end{verbatim}
2831
2832
2833
2834
2835\normalsize
2836\section{PAW Tutorial 2: optimizing a unit cell and geometry for Silicon-Carbide}
2837\label{sec:pspw_unitcell_optimization}
2838
2839The following example demonstrates how to uses the PAW module to optimize the unit cell
2840and geometry for a silicon-carbide crystal.
2841
2842\begin{verbatim}
2843title "SiC 8 atom cubic cell - geometry and unit cell optimization"
2844
2845start SiC
2846
2847#**** Enter the geometry using fractional coordinates ****
2848geometry units au center noautosym noautoz print
2849  system crystal
2850    lat_a 8.277d0
2851    lat_b 8.277d0
2852    lat_c 8.277d0
2853    alpha 90.0d0
2854    beta  90.0d0
2855    gamma 90.0d0
2856  end
2857Si    -0.50000d0  -0.50000d0  -0.50000d0
2858Si     0.00000d0   0.00000d0  -0.50000d0
2859Si     0.00000d0  -0.50000d0   0.00000d0
2860Si    -0.50000d0   0.00000d0   0.00000d0
2861C     -0.25000d0  -0.25000d0  -0.25000d0
2862C      0.25000d0   0.25000d0  -0.25000d0
2863C      0.25000d0  -0.25000d0   0.25000d0
2864C     -0.25000d0   0.25000d0   0.25000d0
2865end
2866
2867#***** setup the nwpw gamma point code ****
2868nwpw
2869   simulation_cell
2870     ngrid 16 16 16
2871   end
2872   ewald_ncut 8
2873end
2874set nwpw:minimizer 2
2875set nwpw:psi_nolattice .true.  # turns of unit cell checking for wavefunctions
2876
2877driver
2878  clear
2879  maxiter 40
2880end
2881set includestress .true.         # this option tells driver to optimize the unit cell
2882set nwpw:stress_numerical .true. #currently only numerical stresses implemented in paw
2883
2884task paw optimize
2885
2886\end{verbatim}
2887
2888
2889
2890\normalsize
2891\section{PAW Tutorial 2: Running a Car-Parrinello Simulation}
2892\label{sec:pspw_cp}
2893\normalsize
2894
2895In this section we show how use the PAW module to perform a Car-Parrinello
2896molecular dynamic simulation for a C$_2$ molecule at the LDA level.
2897Before running a PAW Car-Parrinello  simulation the system should be
2898on the Born-Oppenheimer surface, i.e. the one-electron orbitals should be minimized
2899with respect to the total energy (i.e. task pspw energy).  The input needed
2900is basically the same as for optimizing the geometry of a C$_2$ molecule at the LDA level,
2901except that and additional Car-Parrinello sub-block is added.
2902
2903In the following example we show the input needed to run a Car-Parrinello simulation
2904for a C$_2$ molecule at the LDA level.  In this example, default pseudopotentials
2905from the pseudopotential library are used for C, the boundary condition is free-space,
2906the exchange correlation functional is LDA, The boundary condition is free-space, and
2907the simulation cell cell is aperiodic and cubic with a side length of 10.0 Angstroms and has
290840 grid points in each direction (cutoff energy is 44 Ry).  The time step and fake mass
2909for the Car-Parrinello run are specified to be 5.0 au and 600.0 au, respectively.
2910
2911\begin{verbatim}
2912
2913start c2_paw_lda_md
2914title "C2 restricted singlet dimer, LDA/44Ry - constant energy Car-Parrinello simulation"
2915
2916geometry
2917C    -0.62 0.0 0.0
2918C     0.62 0.0 0.0
2919end
2920
2921pspw
2922   simulation_cell units angstroms
2923      boundary_conditions aperiodic
2924      lattice
2925        lat_a 10.00d0
2926        lat_b 10.00d0
2927        lat_c 10.00d0
2928      end
2929      ngrid 40 40 40
2930   end
2931   Car-Parrinello
2932     fake_mass 600.0
2933     time_step 5.0
2934     loop 10 10
2935   end
2936end
2937set nwpw:minimizer 2
2938task paw energy
2939task paw Car-Parrinello
2940\end{verbatim}
2941
2942
2943
2944\section{NWPW Capabilities and Limitations}
2945\label{sec:pspw_limits}
2946\normalsize
2947
2948\begin{itemize}
2949
2950\item Hybrid Functionals (e.g. PBE0, LDA-SIC) only work in PSPW.
2951\item Car-Parrinello QM/MM simulation only work with PSPW.
2952\item Fractional occupations only work for BAND simulations.
2953\end{itemize}
2954
2955
2956\section{Questions and Difficulties}
2957\normalsize
2958
2959Questions and encountered problems should be reported to
2960nwchem-users@emsl.pnl.gov
2961or to Eric J. Bylaska, Eric.Bylaska@pnl.gov
2962
2963
2964
2965
2966
2967% LocalWords:  tolc wcut ncut
2968