Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > contrib > by-pkgid > 263386785cefb9ae5d63b926d214d809 > files > 1288

mpqc-2.1.2-4mdk.ppc.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Object-Oriented Input</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.5 on Mon Oct 14 14:18:08 2002 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><a name="mpqcoo"><h2>Object-Oriented Input</h2></a>
 MPQC is an object-oriented program that directly allows the user to specify objects that MPQC then manipulates to obtain energies, properties, etc. This makes the input very flexible, but very complex. However, most calculations should be quite similar to the one of the examples given later in this chapter. The best way to get started is to use one of the example input files and modify it to meet your needs.
<p>
<ul>
 <li> <a href="mpqcoo.html#mpqcooover">Overview of the Object-Oriented Input</a> <li> <a href="mpqcoo.html#mpqcoowalk">A Walk-Through of an Object-Oriented Input File</a> <li> <a href="mpqcoo.html#mpqcoosamp">Sample Object-Oriented Input Files</a> </ul>

<p>
<a name="mpqcooover"><h2>Overview of the Object-Oriented Input</h2></a>

<p>
MPQC starts off by creating a ParsedKeyVal object that parses the input file specified on the command line. The format of the input file is documented in <a href="keyval.html#keyval">The KeyVal Library</a>. It is basically a free format input that associates keywords and logical groupings of keywords with values. The values can be scalars, arrays, or objects.
<p>
The keywords recognized by MPQC begin with the mpqc prefix. That is, they must be nested between an <code>mpqc:(</code> and a <code>)</code>. Alternately, each keyword can be individually prefixed by <code>mpqc:</code>. The primary keywords are given below. Some of the keywords specify objects, in which case the object will require more ParsedKeyVal input. These objects are created from the input by using their ParsedKeyVal constructors. These constructors are documented with the source code documentation for the class.
<p>

<dl compact>

<p>
<dt><code>mole</code><dd> This is the most important keyword for MPQC. It specifies the MolecularEnergy object. This is an object that knows how to compute the energy of a molecule. The specializations of MolecularEnergy that are most commonly used are CLKS, HSOSKS, UKS, CLHF, HSOSHF, UHF, and MBPT2.
<p>
<dt><code>opt</code><dd> This keyword must be specified for optimizations. It specifies an Optimize object. Usually, QNewtonOpt is best for finding minima and EFCOpt is best for transition states.
<p>
<dt><code>freq</code><dd> This keyword must be specified to compute frequencies. It specifies a MolecularFrequencies object.
<p>
<dt><code>thread</code><dd> This specifies an object of type ThreadGrp that can be used to advantage on shared-memory multiprocessor machines for certain types of calculations. This keyword can be overridden by giving the ThreadGrp in the environment or command line. See the section on running MPQC for more information.
<p>
<dt><code>checkpoint</code><dd> The value of this keyword is boolean. If true, then optimizations will be checkpointed after each iteration. The checkpoint file suffice is <code>.ckpt</code>. The default is to checkpoint.
<p>
<dt><code>savestate</code><dd> The value of this keyword is boolean. If true, then the states of the optimizer and wavefunction objects will be saved after the calculation completes. The output file suffix is <code>.wfn</code>. The default is to save state.
<p>
<dt><code>restart</code><dd> The value of this keyword is boolean. If true, mpqc will attempt to restart the calculation. If the checkpoint file is not found, the calculation will continue as if the value were false. The default is true.
<p>
<dt><code>restart_file</code><dd> This gives the name of a file from which restart information is read. If the file name ends in <code>.wfn</code> the MolecularEnergy object will be restored. Otherwise, the Optimize object will be restored. The default file name is formed by appending <code>.ckpt</code> to the input file name with the extension removed.
<p>
<dt><code>do_energy</code><dd> The value of this keyword is boolean. If true a single point energy calculation will be done for the MolecularEnergy object given with the mole keyword. The default is true.
<p>
<dt><code>do_gradient</code><dd> The value of this keyword is boolean. If true a single point gradient calculation will be done for the MolecularEnergy object given with the mole keyword. The default is false.
<p>
<dt><code>optimize</code><dd> The value of this keyword is boolean. If true and the opt keyword was set to a valid value, then an optimization will be performed. The default is true.
<p>
<dt><code>write_pdb</code><dd> The value of this keyword is boolean. If true a PDB file with the molecular coordinates will be written.
<p>
<dt><code>filename</code><dd> The value of this keyword is a string that gives a name from which checkpoint and other filenames are constructed. The default is the basename of the input file.
<p>
<dt><code>print_timings</code><dd> If this is true, timing information is printed at the end of the run. The default is true.
<p>

</dl>

<p>
There are also some utility keywords that tell mpqc some technical details about how to do the calculation: 
<dl compact>
 <dt><code>debug</code><dd> This optional keyword gives a Debugger object which can used to help find the problem if MPQC encounters a catastrophic error. <dt><code>matrixkit</code><dd> This optional keyword gives a SCMatrixKit specialization which is used to produce matrices of the desired type. The default is a ReplSCMatrixKit which replicates matrices on all of the nodes. Other choices are not thoroughly tested. 
</dl>

<p>
<a name="mpqcoowalk"><h2>A Walk-Through of an Object-Oriented Input File</h2></a>

<p>
This example input does a Hartree-Fock calculation on water. Following is the entire input, followed by a breakdown with descriptions.
<p>
<pre>
% This input does a Hartree-Fock calculation on water.
molecule&lt;Molecule&gt;: (
  symmetry = C2V
  unit = angstrom
  { atoms geometry } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
  )
)
</pre>
<p>
We start with a descriptive comment. Comments begin with a <code>%</code>. Everything from the <code>%</code> to the end of the line is ignored.
<p>
<pre>
% This input does a Hartree-Fock calculation on water.
</pre>
<p>
Now lets set up a Molecule object. The name of the object comes first, it is <code>molecule</code>. Then, in angle brackets, comes the type of the molecule, which is the class Molecule. The keyword and class name are followed by a <code>:</code> and then several pieces of input grouped between a pair of matching parentheses. These parentheses contain the information that will be given to Molecule KeyVal constructor.
<p>
<pre>
molecule&lt;Molecule&gt;: (
</pre>
<p>
The point group of the molecule is needed. This is done by assigning <code>symmetry</code> to a case insensitive Schoenflies symbol that is used to initialize a PointGroup object. An Abelian point group should be used.
<p>
<pre>
  symmetry = C2V
</pre>
<p>
The default unit for the Cartesian coordinates is Bohr. You can specify other units by assigned <code>unit</code> to a string that will be used to initialize a Units object.
<p>
<pre>
  unit = angstrom
</pre>
<p>
Finally, the atoms and coordinates are given. This can be given in the shorthand table syntax shown below. The headings of the table are the keywords between the first pair of brackets. These are followed by an <code>=</code> and another pair of brackets that contain the data. The first datum is assigned to the first element of the array that corresponds to the first heading, <code>atom</code>. The second datum is assigned to the first element of the array associated with the second heading, <code>geometry</code>, and so on. Here the second datum is actually a vector: the x, y and z coordinates of the first atom.
<p>
<pre>
  { atoms                       geometry                   } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
</pre>
<p>
Next, a basis set object is given.
<p>
<pre>
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
</pre>
<p>
Now we will give the main body of input. All the subsequent keywords will be grouped in the <code>mpqc</code> section of the input (that is, each keyword will be prefixed with <code>mpqc:</code>).
<p>
<pre>
mpqc: (
</pre>
<p>
Next we give the <code>mole</code> keyword which provides a specialization of the MolecularEnergy class. In this case we will do a closed-shell Hartree-Fock calculation. That is done with an object of type CLHF. The keywords that CLHF accepts are given with the documentation for the CLHF class, usually in the description of the <code>const RefKeyVal&amp;</code> constructor for the class. Also with the CLHF documentation is a list of parent classes. Each of the parent classes may also have input. This input is included with the rest of the input for the child class.
<p>
<pre>
  mole&lt;CLHF&gt;: (
</pre>
<p>
The next line specifies the molecule to be used. There are two things to note, first that this is actually a reference to complete molecule specification elsewhere in the input file. The <code>$</code> indicates that this is a reference and the keyword following the <code>$</code> is the actual location of the molecule. The <code>:</code> in front of the keyword means that the keyword is not relative to the current location in the input, but rather relative to the root of the tree of keywords. Thus, this line grabs the molecule that was specified above. The molecule object could have been placed here, but frequently it is necessary that several objects refer to the exact same object and this can only be done using references.
<p>
The second point is that if you look at the documentation for CLHF, you will see that it doesn't read <code>molecule</code> keyword. However, if you follow its parent classes up to MolecularEnergy, you'll find that <code>molecule</code> is indeed read.
<p>
<pre>
    molecule = $:molecule
</pre>
<p>
Just as we gave <code>molecule</code>, specify the basis set with the <code>basis</code> keyword as follows:
<p>
<pre>
    basis = $:basis
</pre>
<p>
Now we close off the parentheses we opened above and we are finished.
<p>
<pre>
  )
)
</pre>
<p>
<a name="mpqcoosamp"><h2>Sample Object-Oriented Input Files</h2></a>

<p>
The easiest way to get started with mpqc is to start with one of sample inputs that most nearly matches your problem. All of the samples inputs shown here can be found in the directory <code>src/bin/mpqc/samples</code>.
<p>
<ul>
 <li> <a href="mpqcoo.html#mpqcoosamphf">Hartree-Fock Energy</a> <li> <a href="mpqcoo.html#mpqcoosampmp2">MP2 Energy</a> <li> <a href="mpqcoo.html#mpqcoosamphfopt">Hartree-Fock Optimization</a> <li> <a href="mpqcoo.html#mpqcoosamphessopt">Optimization with a Computed Guess Hessian</a> <li> <a href="mpqcoo.html#mpqcoosampoptnewt">Optimization Using Newton's Method</a> <li> <a href="mpqcoo.html#mpqcoosamphffreq">Hartree-Fock Frequencies</a> <li> <a href="mpqcoo.html#mpqcoosampcoor">Giving Coordinates and a Guess Hessian</a> <li> <a href="mpqcoo.html#mpqcoosamphb">Optimization with a Hydrogen Bond</a> <li> <a href="mpqcoo.html#mpqcoosampfixopt">Fixed Coordinate Optimization</a> <li> <a href="mpqcoo.html#mpqcoosampts">Transition State Optimization</a> <li> <a href="mpqcoo.html#mpqcoosamptshess">Transition State Optimization with a Computed Guess Hessian</a> </ul>

<p>
<a name="mpqcoosamphf"><h3>Hartree-Fock Energy</h3></a>

<p>
The following input will compute the Hartree-Fock energy of water.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C2V
  unit = angstrom
  { atoms geometry } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    memory = 16000000
  )
)
</pre>
<p>
<a name="mpqcoosampmp2"><h3>MP2 Energy</h3></a>

<p>
The following input will compute the MP2 energy of water.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C2V
  unit = angstrom
  { atoms geometry } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % method for computing the molecule's energy
  mole&lt;MBPT2&gt;: (
    molecule = $:molecule
    basis = $:basis
    memory = 16000000
    % reference wavefunction
    reference&lt;CLHF&gt;: (
      molecule = $:molecule
      basis = $:basis
      memory = 16000000
    )
  )
)
</pre>
<p>
<a name="mpqcoosamphfopt"><h3>Hartree-Fock Optimization</h3></a>

<p>
The following input will optimize the geometry of water using the quasi-Newton method.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C2V
  unit = angstrom
  { atoms geometry } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "6-31G*"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
  )
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
  )
  % optimizer object for the molecular geometry
  opt&lt;QNewtonOpt&gt;: (
    function = $..:mole
    update&lt;BFGSUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosamphessopt"><h3>Optimization with a Computed Guess Hessian</h3></a>

<p>
The following input will optimize the geometry of water using the quasi-Newton method. The guess Hessian will be computed at a lower level of theory.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C2V
  unit = angstrom
  { atoms geometry } = {
    O     [     0.00000000     0.00000000     0.37000000 ]
    H     [     0.78000000     0.00000000    -0.18000000 ]
    H     [    -0.78000000     0.00000000    -0.18000000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "6-31G*"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
  )
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
    guess_hessian&lt;FinDispMolecularHessian&gt;: (
      molecule = $:molecule
      only_totally_symmetric = yes
      eliminate_cubic_terms = no
      checkpoint = no
      energy&lt;CLHF&gt;: (
        molecule = $:molecule
        memory = 16000000
        basis&lt;GaussianBasisSet&gt;: (
          name = "3-21G"
          molecule = $:molecule
        )
      )
    )
  )
  % optimizer object for the molecular geometry
  opt&lt;QNewtonOpt&gt;: (
    function = $..:mole
    update&lt;BFGSUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosampoptnewt"><h3>Optimization Using Newton's Method</h3></a>

<p>
The following input will optimize the geometry of water using the Newton's method. The Hessian will be computed at each step in the optimization. However, Hessian recomputation is usually not worth the cost; try using the computed Hessian as a guess Hessian for a quasi-Newton method before resorting to a Newton optimization.
<p>
<pre>
% Emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = c2v
  unit = angstrom
  { atoms geometry } = {
     O     [     0.00000000     0.00000000     0.36937294 ]
     H     [     0.78397590     0.00000000    -0.18468647 ]
     H     [    -0.78397590     0.00000000    -0.18468647 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "3-21G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  restart = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
  )
  do_energy = no
  do_gradient = no
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    memory = 16000000
    coor = $..:coor
    guess_wavefunction&lt;CLHF&gt;: (
      molecule = $:molecule
      total_charge = 0
      basis&lt;GaussianBasisSet&gt;: (
        molecule = $:molecule
        name = "STO-3G"
      )
      memory = 16000000
    )
    hessian&lt;FinDispMolecularHessian&gt;: (
      only_totally_symmetric = yes
      eliminate_cubic_terms = no
      checkpoint = no
    )
  )
  optimize = yes
  % optimizer object for the molecular geometry
  opt&lt;NewtonOpt&gt;: (
    print_hessian = yes
    max_iterations = 20
    function = $..:mole
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosamphffreq"><h3>Hartree-Fock Frequencies</h3></a>

<p>
The following input will compute Hartree-Fock frequencies by finite displacements. A thermodynamic analysis will also be performed. If optimization input is also provided, then the optimization will be run first, then the frequencies.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C1
  { atoms geometry } = {
    O     [  0.0000000000    0.0000000000    0.8072934188 ]
    H     [  1.4325589285    0.0000000000   -0.3941980761 ]
    H     [ -1.4325589285    0.0000000000   -0.3941980761 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    memory = 16000000
  )
% vibrational frequency input
  freq&lt;MolecularFrequencies&gt;: (
    molecule = $:molecule
  )
)
</pre>
<p>
<a name="mpqcoosampcoor"><h3>Giving Coordinates and a Guess Hessian</h3></a>

<p>
The following example shows several features that are really independent. The variable coordinates are explicitly given, rather than generated automatically. This is especially useful when a guess Hessian is to be provided, as it is here. This Hessian, as given by the user, is not complete and the QNewtonOpt object will fill in the missing values using a guess the Hessian provided by the MolecularEnergy object. Also, fixed coordinates are given in this sample input.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C1
  { atoms geometry } = {
      H    [ 0.088    2.006    1.438 ]
      O    [ 0.123    3.193    0.000 ]
      H    [ 0.088    2.006   -1.438 ]
      O    [ 4.502    5.955   -0.000 ]
      H    [ 2.917    4.963   -0.000 ]
      H    [ 3.812    7.691   -0.000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
  )
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
      extra_bonds = [ 2 5 ]
    )
    % use these instead of generated coordinates
    variable&lt;SetIntCoor&gt;: [
      &lt;StreSimpleCo&gt;:( atoms = [ 2 5 ] )
      &lt;BendSimpleCo&gt;:( atoms = [ 2 5 4 ] )
      &lt;OutSimpleCo&gt;: ( atoms = [ 5 2 1 3 ] )
      &lt;SumIntCoor&gt;: (
        coor: [
          &lt;StreSimpleCo&gt;:( atoms = [ 1 2 ] )
          &lt;StreSimpleCo&gt;:( atoms = [ 2 3 ] )
          ]
        coef = [ 1.0 1.0 ]
        )
      &lt;SumIntCoor&gt;: (
        coor: [
          &lt;StreSimpleCo&gt;:( atoms = [ 4 5 ] )
          &lt;StreSimpleCo&gt;:( atoms = [ 4 6 ] )
          ]
        coef = [ 1.0 1.0 ]
        )
      &lt;BendSimpleCo&gt;:( atoms = [ 1 2 3 ] )
      &lt;BendSimpleCo&gt;:( atoms = [ 5 4 6 ] )
    ]
    % these are fixed by symmetry anyway,
    fixed&lt;SetIntCoor&gt;: [
      &lt;SumIntCoor&gt;: (
        coor: [
          &lt;StreSimpleCo&gt;:( atoms = [ 1 2 ] )
          &lt;StreSimpleCo&gt;:( atoms = [ 2 3 ] )
          ]
        coef = [ 1.0 -1.0 ]
        )
      &lt;SumIntCoor&gt;: (
        coor: [
          &lt;StreSimpleCo&gt;:( atoms = [ 4 5 ] )
          &lt;StreSimpleCo&gt;:( atoms = [ 4 6 ] )
          ]
        coef = [ 1.0 -1.0 ]
        )
      &lt;TorsSimpleCo&gt;:( atoms = [ 2 5 4 6] )
      &lt;OutSimpleCo&gt;:( atoms = [ 3 2 6 4 ] )
      &lt;OutSimpleCo&gt;:( atoms = [ 1 2 6 4 ] )
    ]
  )
  % optimizer object for the molecular geometry
  opt&lt;QNewtonOpt&gt;: (
    function = $..:mole
    update&lt;BFGSUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
    % give a partial guess hessian in internal coordinates
    % the missing elements will be filled in automatically
    hessian = [
        [  0.0109261670 ]
        [ -0.0004214845    0.0102746106  ]
        [ -0.0008600592    0.0030051330    0.0043149957 ]
        [  0.0             0.0             0.0          ]
        [  0.0             0.0             0.0          ]
        [  0.0             0.0             0.0          ]
        [  0.0             0.0             0.0          ]
     ]
  )
)
</pre>
<p>
<a name="mpqcoosamphb"><h3>Optimization with a Hydrogen Bond</h3></a>

<p>
The automatic internal coordinate generator will fail if it cannot find enough redundant internal coordinates. In this case, the internal coordinate generator must be explicitly created in the input and given extra connectivity information, as is shown below.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = C1
  { atoms geometry } = {
      H    [ 0.088    2.006    1.438 ]
      O    [ 0.123    3.193    0.000 ]
      H    [ 0.088    2.006   -1.438 ]
      O    [ 4.502    5.955   -0.000 ]
      H    [ 2.917    4.963   -0.000 ]
      H    [ 3.812    7.691   -0.000 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "STO-3G"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
  )
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    % give an internal coordinate generator that knows about the
    % hydrogen bond between atoms 2 and 5
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
      extra_bonds = [ 2 5 ]
    )
  )
  % optimizer object for the molecular geometry
  opt&lt;QNewtonOpt&gt;: (
    function = $..:mole
    update&lt;BFGSUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosampfixopt"><h3>Fixed Coordinate Optimization</h3></a>

<p>
This example shows how to selectively fix internal coordinates in an optimization. Any number of linearly independent coordinates can be given. These coordinates must remain linearly independent throughout the optimization, a condition that might not hold since the coordinates can be nonlinear.
<p>
By default, the initial fixed coordinates' values are taken from the cartesian geometry given by the Molecule object; however, the molecule will be displaced to the internal coordinate values given with the fixed internal coordinates if have_fixed_values keyword is set to true, as shown in this example. In this case, the initial cartesian geometry should be reasonably close to the desired initial geometry and all of the variable coordinates will be frozen to their original values during the initial displacement.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = CS
  { atoms geometry } = {
    H [  3.04 -0.69 -1.59 ]
    H [  3.04 -0.69  1.59 ]
    N [  2.09 -0.48 -0.00 ]
    C [ -0.58 -0.15  0.00 ]
    H [ -1.17  1.82  0.00 ]
    H [ -1.41 -1.04 -1.64 ]
    H [ -1.41 -1.04  1.64 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "4-31G*"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
    have_fixed_values = yes
    fixed&lt;SetIntCoor&gt;: [
      &lt;OutSimpleCo&gt;: ( value = -0.1
                       label = "N-inversion"
                       atoms = [4 3 2 1] )
      ]
  )
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
  )
  % optimizer object for the molecular geometry
  opt&lt;QNewtonOpt&gt;: (
    max_iterations = 20
    function = $..:mole
    update&lt;BFGSUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosampts"><h3>Transition State Optimization</h3></a>

<p>
This example shows a transition state optimization of the N-inversion in <img align="top" src="form-0.gif">
 using mode following. The initial geometry was obtained by doing a few fixed coordinate optimizations along the inversion coordinate.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = CS
  { atoms geometry } = {
    H [  3.045436 -0.697438 -1.596748 ]
    H [  3.045436 -0.697438  1.596748 ]
    N [  2.098157 -0.482779 -0.000000 ]
    C [ -0.582616 -0.151798  0.000000 ]
    H [ -1.171620  1.822306  0.000000 ]
    H [ -1.417337 -1.042238 -1.647529 ]
    H [ -1.417337 -1.042238  1.647529 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "4-31G*"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
    followed&lt;OutSimpleCo&gt; = [ "N-inversion" 4 3 2 1 ]
  ) 
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
  )
  % optimizer object for the molecular geometry
  opt&lt;EFCOpt&gt;: (
    transition_state = yes
    mode_following = yes
    max_iterations = 20
    function = $..:mole
    update&lt;PowellUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<a name="mpqcoosamptshess"><h3>Transition State Optimization with a Computed Guess Hessian</h3></a>

<p>
This example shows a transition state optimization of the N-inversion in <img align="top" src="form-0.gif">
 using mode following. The initial geometry was obtained by doing a few fixed coordinate optimizations along the inversion coordinate. An approximate guess Hessian will be computed, which makes the optimiziation converge much faster in this case.
<p>
<pre>
% emacs should use -*- KeyVal -*- mode
% molecule specification
molecule&lt;Molecule&gt;: (
  symmetry = CS
  { atoms geometry } = {
    H [  3.045436 -0.697438 -1.596748 ]
    H [  3.045436 -0.697438  1.596748 ]
    N [  2.098157 -0.482779 -0.000000 ]
    C [ -0.582616 -0.151798  0.000000 ]
    H [ -1.171620  1.822306  0.000000 ]
    H [ -1.417337 -1.042238 -1.647529 ]
    H [ -1.417337 -1.042238  1.647529 ]
  }
)
% basis set specification
basis&lt;GaussianBasisSet&gt;: (
  name = "4-31G*"
  molecule = $:molecule
)
mpqc: (
  checkpoint = no
  savestate = no
  % molecular coordinates for optimization
  coor&lt;SymmMolecularCoor&gt;: (
    molecule = $:molecule
    generator&lt;IntCoorGen&gt;: (
      molecule = $:molecule
    )
    followed&lt;OutSimpleCo&gt; = [ "N-inversion" 4 3 2 1 ]
  ) 
  % method for computing the molecule's energy
  mole&lt;CLHF&gt;: (
    molecule = $:molecule
    basis = $:basis
    coor = $..:coor
    memory = 16000000
    guess_hessian&lt;FinDispMolecularHessian&gt;: (
      molecule = $:molecule
      only_totally_symmetric = yes
      eliminate_cubic_terms = no
      checkpoint = no
      energy&lt;CLHF&gt;: (
        molecule = $:molecule
        memory = 16000000
        basis&lt;GaussianBasisSet&gt;: (
          name = "3-21G"
          molecule = $:molecule
        )
      )
    )
  )
  % optimizer object for the molecular geometry
  opt&lt;EFCOpt&gt;: (
    transition_state = yes
    mode_following = yes
    max_iterations = 20
    function = $..:mole
    update&lt;PowellUpdate&gt;: ()
    convergence&lt;MolEnergyConvergence&gt;: (
      cartesian = yes
      energy = $..:..:mole
    )
  )
)
</pre>
<p>
<hr>
<address>
<small>

Generated at Mon Oct 14 14:18:08 2002 for <a
href="http://aros.ca.sandia.gov/~cljanss/mpqc">MPQC</a>
2.1.2 using the documentation package <a
href="http://www.stack.nl/~dimitri/doxygen/index.html">Doxygen</a>
1.2.5.

</small>
</address>
</body>
</html>