<commit_before>\label{sec:geom}

The \verb+GEOMETRY+ directive is a compound directive that allows the
user to define the geometry to be used for a given calculation.  The
directive allows the user to specify the geometry with a relatively
small amount of input, but there are a large number of optional
keywords and additional subordinate directives that the user can
specify, if needed.  The directive therefore appears to be rather long
and complicated when presented in its general form, as follows:
\begin{verbatim}
  GEOMETRY [<string name default geometry>] \
           [units <string units default angstroms>] \
           [(angstrom_to_au || ang2au) \
                  <real angstrom_to_au default 1.8897265>] \
           [print [xyz] || noprint] \
           [center || nocenter] \
           [bqbq] \
           [autoz || noautoz] \
           [adjust]
    
    [SYMMETRY [group] <string group_name> [print] \
           [tol <real tol default 1d-2>]]

    <string tag> <real x y z> [charge <real charge>] [mass <real mass>]
    ... ]

    [ZMATRIX || ZMT || ZMAT
         <string tagn> <list_of_zmatrix_variables>
         ... 

         [VARIABLES
              <string symbol> <real value>
              ... ]
 
         [CONSTANTS
              <string symbol> <real value>
              ... ]

     (END || ZEND)]

         [ZCOORD
              CVR_SCALING <real value>
              BOND    <integer i> <integer j> \
                      [<real value>] [<string name>] [constant]
              ANGLE   <integer i> <integer j> \
                      [<real value>] [<string name>] [constant]
              TORSION <integer i> <integer j> <integer k> <integer l> \
                      [<real value>] [<string name>] [constant]
          END]
   END
\end{verbatim}

The three main parts of the \verb+GEOMETRY+ directive
are:

\begin{itemize}
\item keywords on the first line of the directive (to specify such optional
input as the geometry name, input units, and print level for the output)
\item symmetry information
\item Cartesian coordinates or Z-matrix input to specify the locations 
of the atoms and centers
\end{itemize}

The following sections present the input for this compound directive in
detail, describing the options available and the usages of the various
keywords in each of the three main parts.


\section{Main keywords on the {\tt GEOMETRY} directive}
\label{sec:geomkeys}

This section presents the options that can be specified using the keywords 
and optional input on the main line of the {\tt GEOMETRY} directive.
As described above, the first line of the directive has the general form,
\begin{verbatim}
  GEOMETRY [<string name default geometry>] \
           [units <string units default angstroms>] \
           [bqbq] \
           [print [xyz] || noprint] \
           [center || nocenter] \
           [autoz || noautoz] \
           [adjust]
\end{verbatim}
    
All of the keywords and input on this line are optional.  The following
list describes  all options and their defaults.

\begin{itemize}
\item \verb+<name>+ -- user-supplied name for the geometry; the
  default name is \verb+geometry+, and all NWChem modules look for a
  geometry with this name.  However, multiple geometries may
  be specified by using a different name for each.  Subsequently,
  the user can direct a module to a named geometry by
  by using the the \verb+SET+ directive (see
  the example in Section \ref{sec:set}) to associate the default
  name of \verb+geometry+ with the alternate name.

% \subsection*{{\tt UNITS}}
\item \verb+units+ -- keyword specifying that a value will be entered
  by the user for the string variable \verb+<units>+.  The default
  units for the geometry input are \angstroms\ (Note: atomic units or
  Bohr are used within the code, regardless of the option specified
  for the input units.  The default conversion factor used in the code
  to convert from {\angstroms} to Bohr is $1.8897265$ which may be
  overidden with the \verb+angstrom_to_au+ keyword described below.).  The code
  recognizes the following possible values for the string variable
  \verb+<units>+:
\begin{itemize}
\item \verb+angstroms+ or \verb+an+ --- Angstroms ($\AA$), the default
  (converts to A.U. using the $\AA$ to A.U. conversion factor)
\item \verb+au+ or \verb+atomic+ or \verb+bohr+ --- Atomic units (A.U.)
\item \verb+nm+ or \verb+nanometers+ --- nanometers (converts to
  A.U. using a conversion factor computed as $10.0$ times the
  \AA\ to A.U. conversion factor) 
\item \verb+pm+ or \verb+picometers+ --- picometers (converts to 
  A.U. using a conversion factor computed as $0.01$ times the 
  \AA\ to A.U. conversion factor)
\end{itemize}

\item \verb+angstrom_to_au+ -- may also be specified as
  \verb+ang2au+.  This enables the user to modify the conversion
  factors used to convert between \AA\ and A.U..  The default value is
  $1.8897265$. 
      
\item \verb+bqbq+ -- keyword to specify the treatment of interactions
  between dummy centers.  The default in NWChem is to ignore such
  interactions when computing energies or energy derivatives.  These
  interactions will be included if the keyword \verb+bqbq+ is
  specified.

\item \verb+print+ and \verb+noprint+ -- complementary keyword pair to
  enable or disable printing of the geometry.  The default is to print
  the output associated with the geometry.  In addition, the keyword
  \verb+print+ may be qualified by the additional keyword \verb+xyz+,
  which specifies that the coordinates should be printed in the XYZ
  format of molecular graphics program XMol.

\item \verb+center+ and \verb+nocenter+ -- complementary keyword pair
  to enable or disable translation of the center of nuclear charge to
  the origin.  With the origin at this position, all three components
  of the nuclear dipole are zero.  The default is to move the center
  of nuclear charge to the origin.

\item \verb+noautoz+ -- by default NWChem (release 3.3 and later) 
  will generate redundant internal coordinates from user input
  Cartesian coordinates.  The internal coordinates will be used in
  geometry optimizations.  The \verb+noautoz+ keyword disables use of
  internal coordinates.  The \verb+autoz+ keyword is provided only for
  backward compatibility.  See Section \ref{sec:zcoord} for a more
  detailed description of redundant internal coordinates, including
  how to force the definition of specific internal variables in
  combination with automatically generated variables.

\item \verb+adjust+ -- This indicates that an existing geometry is
  to be adjusted.  Only new input for the redundant internal
  coordinates may be provided (Section \ref{sec:zcoord}).  It is 
  not possible to define new centers or to modify the point
  group using this keyword.  See Section \ref{sec:zcoord} for 
  an example of its usage.
\end{itemize}

The following examples illustrate some of the various options that the
user can specify on the first input line of the \verb+GEOMETRY+
directive, using the keywords and input options described above.

The following directives all specify the same geometry for $H_2$ (a
bond length of 0.732556\ \AA):
\begin{verbatim}
  geometry                           geometry units nm    
    h 0 0 0                            h 0 0 0            
    h 0 0 0.732556                     h 0 0 0.0732556    
  end                                end                  

  geometry units pm                  geometry units atomic 
    h 0 0 0                            h 0 0 0             
    h 0 0 73.2556                      h 0 0 1.3843305     
  end                                end                   
\end{verbatim}
      
\section{Symmetry Group Input}

The \verb+SYMMETRY+ directive is used (optionally) within the compound
\verb+GEOMETRY+ directive to specify the point group for the molecular
geometry. (Note: space group information for 1-, 2-, and 3-dimensional
periodic systems is not yet documented.)

The general form of the directive, as described above within the general
form of the \verb+GEOMETRY+ directive, is as follows:
\begin{verbatim}
    [SYMMETRY [group] <string group_name> [print] \
           [tol <real tol default 1d-2>]]
\end{verbatim}
The keyword \verb+group+ is optional, and can be omitted without
affecting how the input for this directive is processed\footnote{For
  periodic systems, there are additional keywords within this<commit_msg>Put in documentation for autosym.<commit_after>\label{sec:geom}

The \verb+GEOMETRY+ directive is a compound directive that allows the
user to define the geometry to be used for a given calculation.  The
directive allows the user to specify the geometry with a relatively
small amount of input, but there are a large number of optional
keywords and additional subordinate directives that the user can
specify, if needed.  The directive therefore appears to be rather long
and complicated when presented in its general form, as follows:
\begin{verbatim}
  GEOMETRY [<string name default geometry>] \
           [units <string units default angstroms>] \
           [(angstrom_to_au || ang2au) \
                  <real angstrom_to_au default 1.8897265>] \
           [print [xyz] || noprint] \
           [center || nocenter] \
           [bqbq] \
           [autosym [real tol default 1d-2]] \
           [autoz || noautoz] \
           [adjust]
    
    [SYMMETRY [group] <string group_name> [print] \
           [tol <real tol default 1d-2>]]

    <string tag> <real x y z> [charge <real charge>] [mass <real mass>]
    ... ]

    [ZMATRIX || ZMT || ZMAT
         <string tagn> <list_of_zmatrix_variables>
         ... 

         [VARIABLES
              <string symbol> <real value>
              ... ]
 
         [CONSTANTS
              <string symbol> <real value>
              ... ]

     (END || ZEND)]

         [ZCOORD
              CVR_SCALING <real value>
              BOND    <integer i> <integer j> \
                      [<real value>] [<string name>] [constant]
              ANGLE   <integer i> <integer j> \
                      [<real value>] [<string name>] [constant]
              TORSION <integer i> <integer j> <integer k> <integer l> \
                      [<real value>] [<string name>] [constant]
          END]
   END
\end{verbatim}

The three main parts of the \verb+GEOMETRY+ directive
are:

\begin{itemize}
\item keywords on the first line of the directive (to specify such optional
input as the geometry name, input units, and print level for the output)
\item symmetry information
\item Cartesian coordinates or Z-matrix input to specify the locations 
of the atoms and centers
\end{itemize}

The following sections present the input for this compound directive in
detail, describing the options available and the usages of the various
keywords in each of the three main parts.


\section{Main keywords on the {\tt GEOMETRY} directive}
\label{sec:geomkeys}

This section presents the options that can be specified using the keywords 
and optional input on the main line of the {\tt GEOMETRY} directive.
As described above, the first line of the directive has the general form,
\begin{verbatim}
  GEOMETRY [<string name default geometry>] \
           [units <string units default angstroms>] \
           [bqbq] \
           [print [xyz] || noprint] \
           [center || nocenter] \
           [autosym [real tol default 1d-2]] \
           [autoz || noautoz] \
           [adjust]
\end{verbatim}
    
All of the keywords and input on this line are optional.  The following
list describes  all options and their defaults.

\begin{itemize}
\item \verb+<name>+ -- user-supplied name for the geometry; the
  default name is \verb+geometry+, and all NWChem modules look for a
  geometry with this name.  However, multiple geometries may
  be specified by using a different name for each.  Subsequently,
  the user can direct a module to a named geometry by
  by using the the \verb+SET+ directive (see
  the example in Section \ref{sec:set}) to associate the default
  name of \verb+geometry+ with the alternate name.

% \subsection*{{\tt UNITS}}
\item \verb+units+ -- keyword specifying that a value will be entered
  by the user for the string variable \verb+<units>+.  The default
  units for the geometry input are \angstroms\ (Note: atomic units or
  Bohr are used within the code, regardless of the option specified
  for the input units.  The default conversion factor used in the code
  to convert from {\angstroms} to Bohr is $1.8897265$ which may be
  overidden with the \verb+angstrom_to_au+ keyword described below.).  The code
  recognizes the following possible values for the string variable
  \verb+<units>+:
\begin{itemize}
\item \verb+angstroms+ or \verb+an+ --- Angstroms ($\AA$), the default
  (converts to A.U. using the $\AA$ to A.U. conversion factor)
\item \verb+au+ or \verb+atomic+ or \verb+bohr+ --- Atomic units (A.U.)
\item \verb+nm+ or \verb+nanometers+ --- nanometers (converts to
  A.U. using a conversion factor computed as $10.0$ times the
  \AA\ to A.U. conversion factor) 
\item \verb+pm+ or \verb+picometers+ --- picometers (converts to 
  A.U. using a conversion factor computed as $0.01$ times the 
  \AA\ to A.U. conversion factor)
\end{itemize}

\item \verb+angstrom_to_au+ -- may also be specified as
  \verb+ang2au+.  This enables the user to modify the conversion
  factors used to convert between \AA\ and A.U..  The default value is
  $1.8897265$. 
      
\item \verb+bqbq+ -- keyword to specify the treatment of interactions
  between dummy centers.  The default in NWChem is to ignore such
  interactions when computing energies or energy derivatives.  These
  interactions will be included if the keyword \verb+bqbq+ is
  specified.

\item \verb+print+ and \verb+noprint+ -- complementary keyword pair to
  enable or disable printing of the geometry.  The default is to print
  the output associated with the geometry.  In addition, the keyword
  \verb+print+ may be qualified by the additional keyword \verb+xyz+,
  which specifies that the coordinates should be printed in the XYZ
  format of molecular graphics program XMol.

\item \verb+center+ and \verb+nocenter+ -- complementary keyword pair
  to enable or disable translation of the center of nuclear charge to
  the origin.  With the origin at this position, all three components
  of the nuclear dipole are zero.  The default is to move the center
  of nuclear charge to the origin.

\item \verb+autosym+ -- keyword to specify that the symmetry of the
  geometric system should be automatically determined.  This option is off
  by default.  Only groups up to and including $O_{h}$ are recognized.
  Occasionally NWChem will be unable to determine the full symmetry
  of a molecular system, but will find a proper subgroup of the full 
  symmetry.  The default tolerance is set to work for most cases, but may
  need to be decreased to find the full symmetry of a geometry.  Note that
  autosym will be turned off if the \verb+SYMMETRY+ group input is given
  (See section \ref{sec:symgrp}).

\item \verb+noautoz+ -- by default NWChem (release 3.3 and later) 
  will generate redundant internal coordinates from user input
  Cartesian coordinates.  The internal coordinates will be used in
  geometry optimizations.  The \verb+noautoz+ keyword disables use of
  internal coordinates.  The \verb+autoz+ keyword is provided only for
  backward compatibility.  See Section \ref{sec:zcoord} for a more
  detailed description of redundant internal coordinates, including
  how to force the definition of specific internal variables in
  combination with automatically generated variables.

\item \verb+adjust+ -- This indicates that an existing geometry is
  to be adjusted.  Only new input for the redundant internal
  coordinates may be provided (Section \ref{sec:zcoord}).  It is 
  not possible to define new centers or to modify the point
  group using this keyword.  See Section \ref{sec:zcoord} for 
  an example of its usage.
\end{itemize}

The following examples illustrate some of the various options that the
user can specify on the first input line of the \verb+GEOMETRY+
directive, using the keywords and input options described above.

The following directives all specify the same geometry for $H_2$ (a
bond length of 0.732556\ \AA):
\begin{verbatim}
  geometry                           geometry units nm    
    h 0 0 0                            h 0 0 0            
    h 0 0 0.732556                     h 0 0 0.0732556    
  end                                end                  

  geometry units pm                  geometry units atomic 
    h 0 0 0                            h 0 0 0             
    h 0 0 73.2556                      h 0 0 1.3843305     
  end                                end                   
\end{verbatim}
      
\section{Symmetry Group Input}
\label{sec:symgrp}

The \verb+SYMMETRY+ directive is used (optionally) within the compound
\verb+GEOMETRY+ directive to specify the point group for the molecular
geometry. (Note: space group information for 1-, 2-, and 3-dimensional
periodic systems is not yet documented.)

The general form of the directive, as described above within the general
form of the \verb+GEOMETRY+ directive, is as follows:
\begin{verbatim}
    [SYMMETRY [group] <string group_name> [print] \
           [tol <real tol default 1d-2>]]
\end{verbatim}
The keyword \verb+group+ is optional, and can be omitted without
affecting how the input for this directive is processed\footnote{For
  periodic systems, there are additional keywords within this
{'fraction_non_alphanumeric': 0.07259073842302878, 'fraction_numerical': 0.011377858686995108, 'mean_word_length': 2.706304026987139, 'pattern_counts': {'":': 0, '<': 77, '<?xml version=': 0, '>': 77, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 16, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2932436', 'n_tokens_mistral': 5097, 'n_tokens_neox': 4753, 'n_words': 2260}