diff --git a/doc/htmlize b/doc/htmlize index eb47acf487..d8eb69196c 100755 --- a/doc/htmlize +++ b/doc/htmlize @@ -9,7 +9,6 @@ if ($#argv != 1) then exit 1 endif - set WWWDIR=/msrc/doc/www/changes/docs/nwchem/doc set TMP=tmp.$$ @@ -26,6 +25,8 @@ foreach document ($1) echo " Cleaning and making $document.ps" +goto doit + make clean >& /dev/null make $document.ps >& $document.latex.log @@ -145,11 +146,38 @@ foreach document ($1) exit 1 endif +# Now run Pawel's magic perl script to make the frames +doit: + if (! $?NWCHEM_TOP ) then + echo " NWCHEM_TOP is not defined ... cannot generate frames" + else if (! -e $NWCHEM_TOP/doc/make_manual.pl) then + echo " $NWCHEM_TOP/doc/make_manual.pl missing ... cannot generate frames" + else + echo " Making frames" + pushd $WWWDIR/$document > /dev/null + if ($document == "user") then + set title = "NWChem User Manual" + else if ($document == "prog") then + set title = "NWChem Programmers Manual" + else + set title = "NWChem Manual" + endif + + $NWCHEM_TOP/doc/make_manual.pl $document.html "$title" + + if ($status != 0) then + echo " Making the frames failed" + endif + + popd > /dev/null + endif + + # Hopefully all is OK echo " Done with $document" - /bin/rm -f $TMP $document + /bin/rm -rf $TMP $document end diff --git a/doc/make_manual.pl b/doc/make_manual.pl new file mode 100755 index 0000000000..dbf8e48c56 --- /dev/null +++ b/doc/make_manual.pl @@ -0,0 +1,192 @@ +#!/msrc/apps/bin/perl5 +########################### +# latex2HTML wrapper script +# Pawel Wolinski +# pwolinsk@comp.uark.edu +# 5/21/97 +########################### + +# +# This script takes the output of htmlize (munged latex2html) +# and adds the frame based indexing +# + + +$input_dir ="."; +$output_dir="."; +$title="NWChem User Documentation"; + +if ($ARGV[0] eq "") {&print_usage;exit(0);} else {$start_file=$ARGV[0];} +if ($ARGV[1] ne "") {$title=$ARGV[1];} + +&make_contents_cover($input_dir,$output_dir,$start_file); +&make_manuals($output_dir,$title); + + + + + +#-----------------------subroutines------------------- +sub make_contents_cover { +local ($in_dir,$out_dir,$start_f)=@_; +$r1=<.*Next:.* +.*Up:.* +.*Previous:.**. +EOT + +$r2=< +var ontop=true; +function focus_me() { + if (ontop) {self.focus();} +} +function toggle_ontop() { + if (ontop==true) ontop=false; + else ontop=true; + focus_me(); +} +function index() { + if (self.name=="contentsWin") { + self.opener.location="index.html"; + self.close(); + } +} +function windows_man() { + if (self.name=="contents_frame") { + top.location="windows_man.html"; + } +} + +EOT2 + +$r3=< + + + + + + + +EOT5 + if (!(open(F,"$in_dir/node2.html"))) { + print stderr "make_manual: Cannot find the contents file \"node2.html\" - terminating!\n\n"; + exit(0); + } + close(F); + + if (!(open(F,"$in_dir/$start_f"))) { + print stderr "make_manual: Cannot find the start file \"$start_f\" - terminating!\n\n"; + exit(0); + } + close(F); + + $contents=`cat $in_dir/node2.html`; + $cover =`cat $in_dir/$start_f`; + + $contents=~s/$r1//g; + $contents=~s///g; + $contents=~s/ //ig; + + $cover =~s/*.<\/H2>//g; + $cover =~s/.*<\/UL>//gs; + $cover =~s///g; + + if ($cover=~/\s*Compressed postscript<\/A>/i) + {$comp_postscript=$&;} + if ($cover=~/\s*Postscript<\/A>/i) + {$postscript=$&;} + if ($cover=~//i) + {$search=$&;} + + $cover =~s/.*Compressed Postscript<\/A>//ig; + $cover =~s/.*Postscript<\/A>//ig; + $cover =~s///gi; + + $contents=~s/<\/HEAD>/\n$r2<\/HEAD>/g; + $contents=~s//$r3$comp_postscript $postscript<\/form><\/i><\/font>\n$search\n/g; + + open(F,">$out_dir/contents.html"); + print F $contents; + close(F); + + open(F,">$out_dir/cover.html"); + print F $cover; + close(F); +} + + + + +sub print_usage { +print < + +$tit + + + + + + + +EOT3 + + +$cover=`cat cover.html`; +if ($cover=~//is) { + $cover=$&; + $cover=~s/ + +$tit + + +$cover + +EOT4 + + open(F,">$out_dir/index.html"); + print F $frames_index; + close(F); + + open(F,">$out_dir/windows_man.html"); + print F $windows_index; + close(F); +} diff --git a/doc/user/ccsd.tex b/doc/user/ccsd.tex index a91f2b940a..9fa7857955 100644 --- a/doc/user/ccsd.tex +++ b/doc/user/ccsd.tex @@ -1,26 +1,29 @@ \label{sec:ccsd} -{\bf Some corrections/additions still pending?} - -\section{Background and Capabilities} - -The NWChem coupled cluster module is primarily the work of Alistair -Rendell and Rika Kobayashi, and is derived from the Titan parallel -coupled cluster program. +The NWChem coupled cluster energy module is primarily the work of +Alistair Rendell and Rika Kobayashi, with contributions from David +Bernholdt, and is derived from the Titan parallel coupled cluster +program. The gradients program is the work of Kobayashi and +Bernholdt, with contributions from Harrison. The coupled cluster code can perform calculations with full iterative treatment of single and double excitations and non-iterative inclusion of triple excitation effects. It is presently limited to closed-shell -(RHF) references. It is {\em not} presently possible to freeze core or -virtual orbitals. - -\section{Control Directives} +(RHF) references. The operation of the coupled cluster code is controlled by the input block \begin{verbatim} CCSD - ... + [MAXITER ] + [THRESH ] + [TOL2E ] + [DIISBAS ] + [FREEZE [[core] (atomic || )] \ + [virtual ]] + [IPRT ] + [PRINT ...] + [NOPRINT ...] END \end{verbatim} Note that the keyword \verb+CCSD+ is used for the input block @@ -28,17 +31,17 @@ regardless of the actual level of theory desired (specified with the \verb+TASK+ directive). The following directives are recognized within the \verb+CCSD+ group. -\subsection{{\tt MAXITER} --- Maximum number of iterations} +\section{{\tt MAXITER} --- Maximum number of iterations} The maximum number of iterations is set to 20 by default. This should be quite enough for most calculations, although particularly -troublesome cases may require an increase. +troublesome cases may require more. \begin{verbatim} MAXITER \end{verbatim} -\subsection{{\tt THRESH} --- Convergence threshold} +\section{{\tt THRESH} --- Convergence threshold} Controls the convergence threshold for the iterative part of the calculation. Both the RMS error in the amplitudes {\em and} the @@ -58,15 +61,15 @@ The variable \verb+tol2e+ is used in determining the integral screening threshold for the evaluation of the energy and related quantities. -{\em CAUTION! At the present time, the \verb+tol2e+ parameter only -effects the three- and four-virtual contributions, and the triples, +{\em CAUTION!} At the present time, the \verb+tol2e+ parameter only +affects the three- and four-virtual contributions, and the triples, all of which are done ``on the fly''. The transformations used for the other parts of the code currently have a hard-wired threshold of $10^{-12}$. The default for \verb+tol2e+ is set to match this, and since user input can only make the threshold smaller, -setting this parameter can only make calculations take longer.} +setting this parameter can only make calculations take longer. -\subsection{{\tt DIISBAS} --- DIIS subspace dimension} +\section{{\tt DIISBAS} --- DIIS subspace dimension} Specifies the maximum size of the subspace used in DIIS convergence acceleration. Note that DIIS requires the amplitudes and errors be @@ -82,7 +85,17 @@ storage are being considered, but have not yet been implemented.} DIISBAS \end{verbatim} -\subsection{{\tt IPRT} --- Debug printing} +\section{{\tt FREEZE} --- Freezing orbitals} + +\begin{verbatim} + [FREEZE [[core] (atomic || )] \ + [virtual ]] +\end{verbatim} + +This directive is idential to that used in the MP2 module, Section +\ref{mp2:core}. + +\section{{\tt IPRT} --- Debug printing} This directive controls the level of output from the code, mostly to facilitate debugging and the like. The larger the value, the more @@ -93,7 +106,7 @@ values seem to be \verb+IPRT+ $>$ 5, 10, and 50. IPRT \end{verbatim} -\subsection{PRINT and NOPRINT} +\section{PRINT and NOPRINT} The coupled cluster module supports the standard NWChem print control keywords, although very little in the code is actually hooked into diff --git a/doc/user/mcscf.tex b/doc/user/mcscf.tex index b18201f3f5..1e35b086ab 100644 --- a/doc/user/mcscf.tex +++ b/doc/user/mcscf.tex @@ -1,39 +1,31 @@ \label{sec:mcscf} -{\bf This is junk ... I'm reworking it.} - The NWChem multiconfiguration SCF (MCSCF) module can currently perform complete active space SCF (CASSCF) calculations with at most 20 active -orbitals and about 500 basis functions. +orbitals and about 500 basis functions. It planned to extend it to +handle 1000+ basis functions. \begin{verbatim} MCSCF + STATE ACTIVE - ACTELEC - MULTIPLICITY - [SYMMETRY ] - [VECTORS [[input] ] [swap ...] \ [output ] \ [lock] - [HESSIAN (exact||onel)] - [MAXITER ] - [THRESH ] - [TOL2E ] - [LEVEL ] END \end{verbatim} Note that the \verb+ACTIVE+, \verb+ACTELEC+, and \verb+MULTIPLICITY+ -directives are {\em required}. +directives are {\em required}. The symmetry and multiplicity may +alternatively be entered using the \verb+STATE+ directive. \section{{\tt ACTIVE} --- Number of active orbitals} @@ -87,6 +79,21 @@ E.g., to specify a $B_1$ state when using the $C_{2v}$ group symmetry 3 \end{verbatim} +\section{{\tt STATE} --- Symmetry and multiplicity} + +The electronic state (spatial symmetry and multiplicity) may +alternatively be specified using the conventional notation for an +electronic state, such as $^3B_2$ for a triplet state of $B_2$ +symmetry. This would be accomplished with the input +\begin{verbatim} + state 3b2 +\end{verbatim} +which is equivalent to +\begin{verbatim} + symmetry 4 + multiplicity 3 +\end{verbatim} + \section{{\tt VECTORS} --- Input/output of MO vectors} \label{sec:mcscfvectors} @@ -102,10 +109,14 @@ See Section \ref{sec:vectors} for an example. Output orbitals of a converged MCSCF calculation are canonicalized as follows: \begin{itemize} -\item Doubly occupied and occupied orbitals diagonalize the - corresponding blocks of an effective Fock operator. -\item Active orbitals are chosen as natural orbitals by +\item Doubly occupied and unoccupied orbitals diagonalize the + corresponding blocks of an effective Fock operator. Note that in + the case of degenerate orbital energies this does not fully + determine the orbtials. +\item Active-space orbitals are chosen as natural orbitals by diagonalization of the active space 1-particle density matrix. + Note that in the case of degenerate occupations that this + does not fully determine the orbitals. \end{itemize} \section{{\tt HESSIAN} --- Select preconditioner} diff --git a/doc/user/property.tex b/doc/user/property.tex index 7cc816550a..ddabef67f1 100644 --- a/doc/user/property.tex +++ b/doc/user/property.tex @@ -6,9 +6,9 @@ \end{verbatim} The following properties can be extracted from -Hartree-Fock ( closed-shell RHF, open-shell ROHF, -and open-shell UHF ) wavefunctions, as well as -DFT ( closed-shell and open-shell spin unrestricted ) +Hartree-Fock (closed-shell RHF, open-shell ROHF, +and open-shell UHF) wavefunctions, as well as +DFT (closed-shell and open-shell spin unrestricted) wavefunctions. \begin{itemize} diff --git a/doc/user/scf.tex b/doc/user/scf.tex index cac4446e08..6c2b1f87d1 100644 --- a/doc/user/scf.tex +++ b/doc/user/scf.tex @@ -117,9 +117,10 @@ For example, to disable use of symmetry in Fock matrix construction: The default in the SCF module calculation is to force symmetry adaption of the molecular orbitals. This does not affect the speed of -the calculation, but the resulting orbitals may be symmetry -contaminated for some problems. This is especially likely if the -calculation is started using orbitals from a distorted geometry. +the calculation, but without explicit adaption the resulting orbitals +may be symmetry contaminated for some problems. This is especially +likely if the calculation is started using orbitals from a distorted +geometry. The underlying assumption in the use of symmetry in Fock matrix construction is that the density is totally symmetric. If the orbitals @@ -147,7 +148,7 @@ typically much greater than this threshold. It is generally not necessary to set this parameter directly. Specify instead the required precision in the wavefunction, using the \verb+THRESH+ directive (Section \ref{sec:thresh}). The default -threshold is the minimum of $10^{-7}$ and $0.01$ times the requested +threshold is the minimum of $10^{-7}$ and 0.01 times the requested convergence threshold for the SCF calculation (Section \ref{sec:thresh}). This is suitable for nearly all purposes, though a more relaxed value of $10^{-6}$ might accelerate exploratory @@ -167,7 +168,8 @@ directive is, for example: \begin{verbatim} VECTORS [[input] () || \ - (project )] \ + (project ) || \ + (fragment [ ...])] \ [swap [alpha||beta] ...] \ [output ] \ [lock] @@ -198,6 +200,14 @@ source of the input molecular orbital vectors as any of the following: the geometry used for the previous calculations must have the atoms in the same order and in the same orientation as the current geometry. +\item \verb+FRAGMENT file1 ...+ --- assembles starting MO vectors from + previously performed calculations on fragments of the system and is + described in more detail in Section \ref{sec:fragguess}. Even + though there are some significant restrictions in the use of the + initial implementation of this method (see Section + \ref{sec:fragguess}), this is the most powerful initial guess option + within the code. It is particularly indispensible for open shell + metallic systems. \end{itemize} The molecular orbitals are saved every iteration if more than 600 @@ -297,6 +307,314 @@ a case, the \verb+LOCK+ directive can be used to prevent the SCF calculation from changing the ordering, even if the orbital energies change. +\subsection{Superposition of fragment molecular orbitals} +\label{sec:fragguess} + +The fragment initial guess is particularly useful in the following +instances: +\begin{itemize} +\item The system naturally decomposes into molecules that can be + treated individually, e.g., a cluster. +\item One or more fragments are particularly hard to converge and + therefore much time can be saved by converging them independently. +\item A fragment (e.g., a metal atom) must be prepared with a specific + occupation. This can often be readily accomplished with a + calculation on the fragment using dummy charges to model a ligand + field. +\item The atomic initial guess currently does not work correctly in + the presence of ECPs. Independenly converging fragments with ECPs + can save a lot of resources. +\item The molecular occupation predicted by the atomic initial guess + is often wrong for systems with heavy metals which may have + partially occupied orbitals with lower energy than some doubly + occupied orbitals. The fragment initial guess avoids this problem. +\end{itemize} + +\begin{verbatim} + VECTORS [input] fragment [ ...] +\end{verbatim} +The molecular orbitals are formed by superimposing the previously +generated orbitals of fragments of the molecule being studied. These +fragment molecular orbitals must be in the same basis as the current +calculation. The input specifies the files containing the fragment +molecular orbitals. For instance, in a calculation on the water +dimer, one might specify +\begin{verbatim} + vectors fragment h2o1.movecs h2o2.movecs +\end{verbatim} +where \verb+h2o1.movecs+ contains the orbitals for the first fragment, and +\verb+h2o2.movecs+ contains the orbitals for the second fragment. + +A complete example of the input for a calculation on the water +dimer using the fragment guess is as follows: +\begin{verbatim} + start dimer + + title + Water dimer SCF using fragment initial guess + + geometry dimer + O -0.595 1.165 -0.048 + H 0.110 1.812 -0.170 + H -1.452 1.598 -0.154 + O 0.724 -1.284 0.034 + H 0.175 -2.013 0.348 + H 0.177 -0.480 0.010 + end + + geometry h2o1 + O -0.595 1.165 -0.048 + H 0.110 1.812 -0.170 + H -1.452 1.598 -0.154 + end + + geometry h2o2 + O 0.724 -1.284 0.034 + H 0.175 -2.013 0.348 + H 0.177 -0.480 0.010 + end + + basis + o library 3-21g + h library 3-21g + end + + set geometry h2o1 + scf; vectors input atomic output h2o1.movecs; end + task scf + + set geometry h2o2 + scf; vectors input atomic output h2o2.movecs; end + task scf + + set geometry dimer + scf + vectors input fragment h2o1.movecs h2o2.movecs \ + output dimer.movecs + end + task scf +\end{verbatim} +First, the geometry of the dimer and the two monomers are specified +and given names. Then, after the basis specification, calculations +are performed on the fragments by setting the geometry to the +appropriate fragment (Section \ref{sec:set}) and redirecting the +output molecular orbitals to an appropriately named file. Note also +that use of the atomic initial guess is forced, since the default +initial guess is to use any existing MOs which would not be +appropriate for the second fragment calculation. Finally, the dimer +calculation is performed by specifying the dimer geometry, indicating +use of the fragment guess, and redirecting the output MOs. + +The following points are important in using the fragment initial guess: +\begin{enumerate} +\item The fragment calculations must be in the same basis set as the + full calculation. +\item The order of atoms in the fragments and the order in which the + fragment files are specified must be such that when the fragment + basis sets are concatentated all the basis functions are in the same + order as in the full system. This is readily accomplished by first + generating the full geometry with atoms for each fragment + contiguous, splitting this into numbered fragments and specifying + the fragment MO files in the correct order on the \verb+VECTORS+ + directive. +\item The occupation of orbitals is preserved when they are merged + from the fragments to the full molecule and the resulting occupation + must match the requested occupation for the full molecule. E.g., a + triplet ROHF calculation must be comprised of fragments that have + a total of exactly two open-shell orbtials. +\item Because of these restrictions, it is not possible to introduce + additional atoms (or basis functions) into fragments for the purpose + of cleanly breaking real bonds. However, it is possible, and highly + recommended, to introduce additional point charges to simulate the + presence of other fragments. +\item MO vectors of partially occupied or strongly polarized systems + are very sensitive to orientation. While it is possible to specify + the same fragment MO vector file multiple times in the + \verb+VECTORS+ directive, it is usually much better to do a separate + calculation for each fragment. +\end{enumerate} + +A more involved example is now presented. We wish to model the sextet +state of Fe(III) complexed with water, imidazole and a heme with a net +unit positive charge. The default atomic guess does not give the +correct $d^5$ occupation for the metal and also gives an incorrect +state for the double anion of the heme. The following performs +calculations on the all of the fragments. Things to note are: +\begin{enumerate} +\item The use +of a dummy $+2$ charge in the initial guess on the heme which in part +simulates the presence of the metal ion, and also automatically forces +an additional two electrons to be added to the system (the default net +charge being zero). +\item The iron fragment calculation (charge +3, $d^5$, sextet) will + yield the correct open-shell occupation for the full system. If, + instead, the {\it d}-orbitals were partially occupied (e.g., the doublet + state) it would be useful to introduce dummy charges around the iron + to model the ligand field and thereby lift the degeneracy to obtain + the correct occupation. +\item $C_s$ symmetry is used for all of the calculations. It is not + necessary that the same symmetry be used in all of the + calculations, provided that the order and orientation of the atoms + is preserved. +\item The \verb+unset scf:*+ directive is used immediately before + the calculation on the full system so that the default name for the + output MO vector file can be used, rather than having to specify it + explicitly. +\end{enumerate} +\begin{verbatim} +start heme6a1 +title ; heme-H2O (6A1) from M.Dupuis + +############################################################ +# Define the geometry of the full system and the fragments # +############################################################ + +geometry full-system + symmetry cs + + H 0.438 -0.002 4.549 + C 0.443 -0.001 3.457 + C 0.451 -1.251 2.828 + C 0.452 1.250 2.828 + H 0.455 2.652 4.586 + H 0.461 -2.649 4.586 + N1 0.455 -1.461 1.441 + N1 0.458 1.458 1.443 + C 0.460 2.530 3.505 + C 0.462 -2.530 3.506 + C 0.478 2.844 1.249 + C 0.478 3.510 2.534 + C 0.478 -2.848 1.248 + C 0.480 -3.513 2.536 + C 0.484 3.480 0.000 + C 0.485 -3.484 0.000 + H 0.489 4.590 2.664 + H 0.496 -4.592 2.669 + + H 0.498 4.573 0.000 + H 0.503 -4.577 0.000 + H -4.925 1.235 0.000 + H -4.729 -1.338 0.000 + C -3.987 0.685 0.000 + N -3.930 -0.703 0.000 + C -2.678 1.111 0.000 + C -2.622 -1.076 0.000 + H -2.284 2.126 0.000 + H -2.277 -2.108 0.000 + N -1.838 0.007 0.000 + + Fe 0.307 0.000 0.000 + + O 2.673 -0.009 0.000 + H 3.238 -0.804 0.000 + H 3.254 0.777 0.000 +end + +geometry ring-only + symmetry cs + H 0.438 -0.002 4.549 + C 0.443 -0.001 3.457 + C 0.451 -1.251 2.828 + C 0.452 1.250 2.828 + H 0.455 2.652 4.586 + H 0.461 -2.649 4.586 + N1 0.455 -1.461 1.441 + N1 0.458 1.458 1.443 + C 0.460 2.530 3.505 + C 0.462 -2.530 3.506 + C 0.478 2.844 1.249 + C 0.478 3.510 2.534 + C 0.478 -2.848 1.248 + C 0.480 -3.513 2.536 + C 0.484 3.480 0.000 + C 0.485 -3.484 0.000 + H 0.489 4.590 2.664 + H 0.496 -4.592 2.669 + + Bq 0.307 0.0 0.0 charge 2 # simulate the iron +end + +geometry imid-only + symmetry cs + H 0.498 4.573 0.000 + H 0.503 -4.577 0.000 + H -4.925 1.235 0.000 + H -4.729 -1.338 0.000 + C -3.987 0.685 0.000 + N -3.930 -0.703 0.000 + C -2.678 1.111 0.000 + C -2.622 -1.076 0.000 + H -2.284 2.126 0.000 + H -2.277 -2.108 0.000 + N -1.838 0.007 0.000 +end + +geometry fe-only + symmetry cs + Fe .307 0.000 0.000 +end + +geometry water-only + symmetry cs + O 2.673 -0.009 0.000 + H 3.238 -0.804 0.000 + H 3.254 0.777 0.000 +end + +############################ +# Basis set for everything # +############################ + +basis nosegment + O library 6-31g* + N library 6-31g* + C library 6-31g* + H library 6-31g* + Fe library "Ahlrichs pVDZ" +end + +########################################################## +# SCF on the fragments for initial guess for full system # +########################################################## + +scf; thresh 1e-2; end + +set geometry ring-only +scf; vectors atomic swap 80 81 output ring.mo; end +task scf + +set geometry water-only +scf; vectors atomic output water.mo; end +task scf + +set geometry imid-only +scf; vectors atomic output imid.mo; end +task scf + +charge 3 +set geometry fe-only +scf; sextet; vectors atomic output fe.mo; end +task scf + +########################## +# SCF on the full system # +########################## + +unset scf:* # This restores the defaults + +charge 1 + +set geometry full-system + +scf + sextet + vectors fragment ring.mo imid.mo fe.mo water.mo + maxiter 50 +end + +task scf +\end{verbatim} + \subsection{Atomic guess orbitals with charged atoms} \label{sec:atomscf} diff --git a/doc/user/user.tex b/doc/user/user.tex index c916f3f40f..f3f1f5499e 100644 --- a/doc/user/user.tex +++ b/doc/user/user.tex @@ -1,4 +1,4 @@ -% $Id: user.tex,v 1.25 1997-06-20 14:19:26 d3g681 Exp $ +% $Id: user.tex,v 1.26 1997-07-30 02:04:00 d3g681 Exp $ \documentstyle[fullpage,12pt,fleqn]{book} \setlength{\parskip}{6pt} @@ -69,8 +69,8 @@ \chapter{Coupled Cluster Calculations} \input{ccsd.tex} -\chapter{Four-Index Transformation} -\input{fourindex} +%\chapter{Four-Index Transformation} +%\input{fourindex} %%\chapter{Plane-wave periodic DFT} %%\input{plnwv.tex}
//ig; + + $cover =~s/
.*Compressed Postscript<\/A>//ig; + $cover =~s/
.*Postscript<\/A>//ig; + $cover =~s///gi; + + $contents=~s/<\/HEAD>/\n$r2<\/HEAD>/g; + $contents=~s//$r3$comp_postscript $postscript<\/form><\/i><\/font>\n$search\n/g; + + open(F,">$out_dir/contents.html"); + print F $contents; + close(F); + + open(F,">$out_dir/cover.html"); + print F $cover; + close(F); +} + + + + +sub print_usage { +print < + +$tit + + + + + + + +EOT3 + + +$cover=`cat cover.html`; +if ($cover=~//is) { + $cover=$&; + $cover=~s/ + +$tit + + +$cover + +EOT4 + + open(F,">$out_dir/index.html"); + print F $frames_index; + close(F); + + open(F,">$out_dir/windows_man.html"); + print F $windows_index; + close(F); +} diff --git a/doc/user/ccsd.tex b/doc/user/ccsd.tex index a91f2b940a..9fa7857955 100644 --- a/doc/user/ccsd.tex +++ b/doc/user/ccsd.tex @@ -1,26 +1,29 @@ \label{sec:ccsd} -{\bf Some corrections/additions still pending?} - -\section{Background and Capabilities} - -The NWChem coupled cluster module is primarily the work of Alistair -Rendell and Rika Kobayashi, and is derived from the Titan parallel -coupled cluster program. +The NWChem coupled cluster energy module is primarily the work of +Alistair Rendell and Rika Kobayashi, with contributions from David +Bernholdt, and is derived from the Titan parallel coupled cluster +program. The gradients program is the work of Kobayashi and +Bernholdt, with contributions from Harrison. The coupled cluster code can perform calculations with full iterative treatment of single and double excitations and non-iterative inclusion of triple excitation effects. It is presently limited to closed-shell -(RHF) references. It is {\em not} presently possible to freeze core or -virtual orbitals. - -\section{Control Directives} +(RHF) references. The operation of the coupled cluster code is controlled by the input block \begin{verbatim} CCSD - ... + [MAXITER ] + [THRESH ] + [TOL2E ] + [DIISBAS ] + [FREEZE [[core] (atomic || )] \ + [virtual ]] + [IPRT ] + [PRINT ...] + [NOPRINT ...] END \end{verbatim} Note that the keyword \verb+CCSD+ is used for the input block @@ -28,17 +31,17 @@ regardless of the actual level of theory desired (specified with the \verb+TASK+ directive). The following directives are recognized within the \verb+CCSD+ group. -\subsection{{\tt MAXITER} --- Maximum number of iterations} +\section{{\tt MAXITER} --- Maximum number of iterations} The maximum number of iterations is set to 20 by default. This should be quite enough for most calculations, although particularly -troublesome cases may require an increase. +troublesome cases may require more. \begin{verbatim} MAXITER \end{verbatim} -\subsection{{\tt THRESH} --- Convergence threshold} +\section{{\tt THRESH} --- Convergence threshold} Controls the convergence threshold for the iterative part of the calculation. Both the RMS error in the amplitudes {\em and} the @@ -58,15 +61,15 @@ The variable \verb+tol2e+ is used in determining the integral screening threshold for the evaluation of the energy and related quantities. -{\em CAUTION! At the present time, the \verb+tol2e+ parameter only -effects the three- and four-virtual contributions, and the triples, +{\em CAUTION!} At the present time, the \verb+tol2e+ parameter only +affects the three- and four-virtual contributions, and the triples, all of which are done ``on the fly''. The transformations used for the other parts of the code currently have a hard-wired threshold of $10^{-12}$. The default for \verb+tol2e+ is set to match this, and since user input can only make the threshold smaller, -setting this parameter can only make calculations take longer.} +setting this parameter can only make calculations take longer. -\subsection{{\tt DIISBAS} --- DIIS subspace dimension} +\section{{\tt DIISBAS} --- DIIS subspace dimension} Specifies the maximum size of the subspace used in DIIS convergence acceleration. Note that DIIS requires the amplitudes and errors be @@ -82,7 +85,17 @@ storage are being considered, but have not yet been implemented.} DIISBAS \end{verbatim} -\subsection{{\tt IPRT} --- Debug printing} +\section{{\tt FREEZE} --- Freezing orbitals} + +\begin{verbatim} + [FREEZE [[core] (atomic || )] \ + [virtual ]] +\end{verbatim} + +This directive is idential to that used in the MP2 module, Section +\ref{mp2:core}. + +\section{{\tt IPRT} --- Debug printing} This directive controls the level of output from the code, mostly to facilitate debugging and the like. The larger the value, the more @@ -93,7 +106,7 @@ values seem to be \verb+IPRT+ $>$ 5, 10, and 50. IPRT \end{verbatim} -\subsection{PRINT and NOPRINT} +\section{PRINT and NOPRINT} The coupled cluster module supports the standard NWChem print control keywords, although very little in the code is actually hooked into diff --git a/doc/user/mcscf.tex b/doc/user/mcscf.tex index b18201f3f5..1e35b086ab 100644 --- a/doc/user/mcscf.tex +++ b/doc/user/mcscf.tex @@ -1,39 +1,31 @@ \label{sec:mcscf} -{\bf This is junk ... I'm reworking it.} - The NWChem multiconfiguration SCF (MCSCF) module can currently perform complete active space SCF (CASSCF) calculations with at most 20 active -orbitals and about 500 basis functions. +orbitals and about 500 basis functions. It planned to extend it to +handle 1000+ basis functions. \begin{verbatim} MCSCF + STATE ACTIVE - ACTELEC - MULTIPLICITY - [SYMMETRY ] - [VECTORS [[input] ] [swap ...] \ [output ] \ [lock] - [HESSIAN (exact||onel)] - [MAXITER ] - [THRESH ] - [TOL2E ] - [LEVEL ] END \end{verbatim} Note that the \verb+ACTIVE+, \verb+ACTELEC+, and \verb+MULTIPLICITY+ -directives are {\em required}. +directives are {\em required}. The symmetry and multiplicity may +alternatively be entered using the \verb+STATE+ directive. \section{{\tt ACTIVE} --- Number of active orbitals} @@ -87,6 +79,21 @@ E.g., to specify a $B_1$ state when using the $C_{2v}$ group symmetry 3 \end{verbatim} +\section{{\tt STATE} --- Symmetry and multiplicity} + +The electronic state (spatial symmetry and multiplicity) may +alternatively be specified using the conventional notation for an +electronic state, such as $^3B_2$ for a triplet state of $B_2$ +symmetry. This would be accomplished with the input +\begin{verbatim} + state 3b2 +\end{verbatim} +which is equivalent to +\begin{verbatim} + symmetry 4 + multiplicity 3 +\end{verbatim} + \section{{\tt VECTORS} --- Input/output of MO vectors} \label{sec:mcscfvectors} @@ -102,10 +109,14 @@ See Section \ref{sec:vectors} for an example. Output orbitals of a converged MCSCF calculation are canonicalized as follows: \begin{itemize} -\item Doubly occupied and occupied orbitals diagonalize the - corresponding blocks of an effective Fock operator. -\item Active orbitals are chosen as natural orbitals by +\item Doubly occupied and unoccupied orbitals diagonalize the + corresponding blocks of an effective Fock operator. Note that in + the case of degenerate orbital energies this does not fully + determine the orbtials. +\item Active-space orbitals are chosen as natural orbitals by diagonalization of the active space 1-particle density matrix. + Note that in the case of degenerate occupations that this + does not fully determine the orbitals. \end{itemize} \section{{\tt HESSIAN} --- Select preconditioner} diff --git a/doc/user/property.tex b/doc/user/property.tex index 7cc816550a..ddabef67f1 100644 --- a/doc/user/property.tex +++ b/doc/user/property.tex @@ -6,9 +6,9 @@ \end{verbatim} The following properties can be extracted from -Hartree-Fock ( closed-shell RHF, open-shell ROHF, -and open-shell UHF ) wavefunctions, as well as -DFT ( closed-shell and open-shell spin unrestricted ) +Hartree-Fock (closed-shell RHF, open-shell ROHF, +and open-shell UHF) wavefunctions, as well as +DFT (closed-shell and open-shell spin unrestricted) wavefunctions. \begin{itemize} diff --git a/doc/user/scf.tex b/doc/user/scf.tex index cac4446e08..6c2b1f87d1 100644 --- a/doc/user/scf.tex +++ b/doc/user/scf.tex @@ -117,9 +117,10 @@ For example, to disable use of symmetry in Fock matrix construction: The default in the SCF module calculation is to force symmetry adaption of the molecular orbitals. This does not affect the speed of -the calculation, but the resulting orbitals may be symmetry -contaminated for some problems. This is especially likely if the -calculation is started using orbitals from a distorted geometry. +the calculation, but without explicit adaption the resulting orbitals +may be symmetry contaminated for some problems. This is especially +likely if the calculation is started using orbitals from a distorted +geometry. The underlying assumption in the use of symmetry in Fock matrix construction is that the density is totally symmetric. If the orbitals @@ -147,7 +148,7 @@ typically much greater than this threshold. It is generally not necessary to set this parameter directly. Specify instead the required precision in the wavefunction, using the \verb+THRESH+ directive (Section \ref{sec:thresh}). The default -threshold is the minimum of $10^{-7}$ and $0.01$ times the requested +threshold is the minimum of $10^{-7}$ and 0.01 times the requested convergence threshold for the SCF calculation (Section \ref{sec:thresh}). This is suitable for nearly all purposes, though a more relaxed value of $10^{-6}$ might accelerate exploratory @@ -167,7 +168,8 @@ directive is, for example: \begin{verbatim} VECTORS [[input] () || \ - (project )] \ + (project ) || \ + (fragment [ ...])] \ [swap [alpha||beta] ...] \ [output ] \ [lock] @@ -198,6 +200,14 @@ source of the input molecular orbital vectors as any of the following: the geometry used for the previous calculations must have the atoms in the same order and in the same orientation as the current geometry. +\item \verb+FRAGMENT file1 ...+ --- assembles starting MO vectors from + previously performed calculations on fragments of the system and is + described in more detail in Section \ref{sec:fragguess}. Even + though there are some significant restrictions in the use of the + initial implementation of this method (see Section + \ref{sec:fragguess}), this is the most powerful initial guess option + within the code. It is particularly indispensible for open shell + metallic systems. \end{itemize} The molecular orbitals are saved every iteration if more than 600 @@ -297,6 +307,314 @@ a case, the \verb+LOCK+ directive can be used to prevent the SCF calculation from changing the ordering, even if the orbital energies change. +\subsection{Superposition of fragment molecular orbitals} +\label{sec:fragguess} + +The fragment initial guess is particularly useful in the following +instances: +\begin{itemize} +\item The system naturally decomposes into molecules that can be + treated individually, e.g., a cluster. +\item One or more fragments are particularly hard to converge and + therefore much time can be saved by converging them independently. +\item A fragment (e.g., a metal atom) must be prepared with a specific + occupation. This can often be readily accomplished with a + calculation on the fragment using dummy charges to model a ligand + field. +\item The atomic initial guess currently does not work correctly in + the presence of ECPs. Independenly converging fragments with ECPs + can save a lot of resources. +\item The molecular occupation predicted by the atomic initial guess + is often wrong for systems with heavy metals which may have + partially occupied orbitals with lower energy than some doubly + occupied orbitals. The fragment initial guess avoids this problem. +\end{itemize} + +\begin{verbatim} + VECTORS [input] fragment [ ...] +\end{verbatim} +The molecular orbitals are formed by superimposing the previously +generated orbitals of fragments of the molecule being studied. These +fragment molecular orbitals must be in the same basis as the current +calculation. The input specifies the files containing the fragment +molecular orbitals. For instance, in a calculation on the water +dimer, one might specify +\begin{verbatim} + vectors fragment h2o1.movecs h2o2.movecs +\end{verbatim} +where \verb+h2o1.movecs+ contains the orbitals for the first fragment, and +\verb+h2o2.movecs+ contains the orbitals for the second fragment. + +A complete example of the input for a calculation on the water +dimer using the fragment guess is as follows: +\begin{verbatim} + start dimer + + title + Water dimer SCF using fragment initial guess + + geometry dimer + O -0.595 1.165 -0.048 + H 0.110 1.812 -0.170 + H -1.452 1.598 -0.154 + O 0.724 -1.284 0.034 + H 0.175 -2.013 0.348 + H 0.177 -0.480 0.010 + end + + geometry h2o1 + O -0.595 1.165 -0.048 + H 0.110 1.812 -0.170 + H -1.452 1.598 -0.154 + end + + geometry h2o2 + O 0.724 -1.284 0.034 + H 0.175 -2.013 0.348 + H 0.177 -0.480 0.010 + end + + basis + o library 3-21g + h library 3-21g + end + + set geometry h2o1 + scf; vectors input atomic output h2o1.movecs; end + task scf + + set geometry h2o2 + scf; vectors input atomic output h2o2.movecs; end + task scf + + set geometry dimer + scf + vectors input fragment h2o1.movecs h2o2.movecs \ + output dimer.movecs + end + task scf +\end{verbatim} +First, the geometry of the dimer and the two monomers are specified +and given names. Then, after the basis specification, calculations +are performed on the fragments by setting the geometry to the +appropriate fragment (Section \ref{sec:set}) and redirecting the +output molecular orbitals to an appropriately named file. Note also +that use of the atomic initial guess is forced, since the default +initial guess is to use any existing MOs which would not be +appropriate for the second fragment calculation. Finally, the dimer +calculation is performed by specifying the dimer geometry, indicating +use of the fragment guess, and redirecting the output MOs. + +The following points are important in using the fragment initial guess: +\begin{enumerate} +\item The fragment calculations must be in the same basis set as the + full calculation. +\item The order of atoms in the fragments and the order in which the + fragment files are specified must be such that when the fragment + basis sets are concatentated all the basis functions are in the same + order as in the full system. This is readily accomplished by first + generating the full geometry with atoms for each fragment + contiguous, splitting this into numbered fragments and specifying + the fragment MO files in the correct order on the \verb+VECTORS+ + directive. +\item The occupation of orbitals is preserved when they are merged + from the fragments to the full molecule and the resulting occupation + must match the requested occupation for the full molecule. E.g., a + triplet ROHF calculation must be comprised of fragments that have + a total of exactly two open-shell orbtials. +\item Because of these restrictions, it is not possible to introduce + additional atoms (or basis functions) into fragments for the purpose + of cleanly breaking real bonds. However, it is possible, and highly + recommended, to introduce additional point charges to simulate the + presence of other fragments. +\item MO vectors of partially occupied or strongly polarized systems + are very sensitive to orientation. While it is possible to specify + the same fragment MO vector file multiple times in the + \verb+VECTORS+ directive, it is usually much better to do a separate + calculation for each fragment. +\end{enumerate} + +A more involved example is now presented. We wish to model the sextet +state of Fe(III) complexed with water, imidazole and a heme with a net +unit positive charge. The default atomic guess does not give the +correct $d^5$ occupation for the metal and also gives an incorrect +state for the double anion of the heme. The following performs +calculations on the all of the fragments. Things to note are: +\begin{enumerate} +\item The use +of a dummy $+2$ charge in the initial guess on the heme which in part +simulates the presence of the metal ion, and also automatically forces +an additional two electrons to be added to the system (the default net +charge being zero). +\item The iron fragment calculation (charge +3, $d^5$, sextet) will + yield the correct open-shell occupation for the full system. If, + instead, the {\it d}-orbitals were partially occupied (e.g., the doublet + state) it would be useful to introduce dummy charges around the iron + to model the ligand field and thereby lift the degeneracy to obtain + the correct occupation. +\item $C_s$ symmetry is used for all of the calculations. It is not + necessary that the same symmetry be used in all of the + calculations, provided that the order and orientation of the atoms + is preserved. +\item The \verb+unset scf:*+ directive is used immediately before + the calculation on the full system so that the default name for the + output MO vector file can be used, rather than having to specify it + explicitly. +\end{enumerate} +\begin{verbatim} +start heme6a1 +title ; heme-H2O (6A1) from M.Dupuis + +############################################################ +# Define the geometry of the full system and the fragments # +############################################################ + +geometry full-system + symmetry cs + + H 0.438 -0.002 4.549 + C 0.443 -0.001 3.457 + C 0.451 -1.251 2.828 + C 0.452 1.250 2.828 + H 0.455 2.652 4.586 + H 0.461 -2.649 4.586 + N1 0.455 -1.461 1.441 + N1 0.458 1.458 1.443 + C 0.460 2.530 3.505 + C 0.462 -2.530 3.506 + C 0.478 2.844 1.249 + C 0.478 3.510 2.534 + C 0.478 -2.848 1.248 + C 0.480 -3.513 2.536 + C 0.484 3.480 0.000 + C 0.485 -3.484 0.000 + H 0.489 4.590 2.664 + H 0.496 -4.592 2.669 + + H 0.498 4.573 0.000 + H 0.503 -4.577 0.000 + H -4.925 1.235 0.000 + H -4.729 -1.338 0.000 + C -3.987 0.685 0.000 + N -3.930 -0.703 0.000 + C -2.678 1.111 0.000 + C -2.622 -1.076 0.000 + H -2.284 2.126 0.000 + H -2.277 -2.108 0.000 + N -1.838 0.007 0.000 + + Fe 0.307 0.000 0.000 + + O 2.673 -0.009 0.000 + H 3.238 -0.804 0.000 + H 3.254 0.777 0.000 +end + +geometry ring-only + symmetry cs + H 0.438 -0.002 4.549 + C 0.443 -0.001 3.457 + C 0.451 -1.251 2.828 + C 0.452 1.250 2.828 + H 0.455 2.652 4.586 + H 0.461 -2.649 4.586 + N1 0.455 -1.461 1.441 + N1 0.458 1.458 1.443 + C 0.460 2.530 3.505 + C 0.462 -2.530 3.506 + C 0.478 2.844 1.249 + C 0.478 3.510 2.534 + C 0.478 -2.848 1.248 + C 0.480 -3.513 2.536 + C 0.484 3.480 0.000 + C 0.485 -3.484 0.000 + H 0.489 4.590 2.664 + H 0.496 -4.592 2.669 + + Bq 0.307 0.0 0.0 charge 2 # simulate the iron +end + +geometry imid-only + symmetry cs + H 0.498 4.573 0.000 + H 0.503 -4.577 0.000 + H -4.925 1.235 0.000 + H -4.729 -1.338 0.000 + C -3.987 0.685 0.000 + N -3.930 -0.703 0.000 + C -2.678 1.111 0.000 + C -2.622 -1.076 0.000 + H -2.284 2.126 0.000 + H -2.277 -2.108 0.000 + N -1.838 0.007 0.000 +end + +geometry fe-only + symmetry cs + Fe .307 0.000 0.000 +end + +geometry water-only + symmetry cs + O 2.673 -0.009 0.000 + H 3.238 -0.804 0.000 + H 3.254 0.777 0.000 +end + +############################ +# Basis set for everything # +############################ + +basis nosegment + O library 6-31g* + N library 6-31g* + C library 6-31g* + H library 6-31g* + Fe library "Ahlrichs pVDZ" +end + +########################################################## +# SCF on the fragments for initial guess for full system # +########################################################## + +scf; thresh 1e-2; end + +set geometry ring-only +scf; vectors atomic swap 80 81 output ring.mo; end +task scf + +set geometry water-only +scf; vectors atomic output water.mo; end +task scf + +set geometry imid-only +scf; vectors atomic output imid.mo; end +task scf + +charge 3 +set geometry fe-only +scf; sextet; vectors atomic output fe.mo; end +task scf + +########################## +# SCF on the full system # +########################## + +unset scf:* # This restores the defaults + +charge 1 + +set geometry full-system + +scf + sextet + vectors fragment ring.mo imid.mo fe.mo water.mo + maxiter 50 +end + +task scf +\end{verbatim} + \subsection{Atomic guess orbitals with charged atoms} \label{sec:atomscf} diff --git a/doc/user/user.tex b/doc/user/user.tex index c916f3f40f..f3f1f5499e 100644 --- a/doc/user/user.tex +++ b/doc/user/user.tex @@ -1,4 +1,4 @@ -% $Id: user.tex,v 1.25 1997-06-20 14:19:26 d3g681 Exp $ +% $Id: user.tex,v 1.26 1997-07-30 02:04:00 d3g681 Exp $ \documentstyle[fullpage,12pt,fleqn]{book} \setlength{\parskip}{6pt} @@ -69,8 +69,8 @@ \chapter{Coupled Cluster Calculations} \input{ccsd.tex} -\chapter{Four-Index Transformation} -\input{fourindex} +%\chapter{Four-Index Transformation} +%\input{fourindex} %%\chapter{Plane-wave periodic DFT} %%\input{plnwv.tex}