source: ThirdParty/mpqc_open/src/bin/mpqc/mpqcoo.dox@ 482400e

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_levmar Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 482400e was 860145, checked in by Frederik Heber <heber@…>, 8 years ago

Merge commit '0b990dfaa8c6007a996d030163a25f7f5fc8a7e7' as 'ThirdParty/mpqc_open'

  • Property mode set to 100644
File size: 38.1 KB
Line 
1
2/** \page mpqcoo Object-Oriented Input
3
4MPQC is an object-oriented program that directly allows the user to
5specify objects that MPQC then manipulates to obtain energies,
6properties, etc. This makes the input very flexible, but very complex.
7However, most calculations should be quite similar to the one of the
8examples given later in this chapter. The best way to get started is to
9use one of the example input files and modify it to meet your needs.
10
11The object-oriented input format is described in the following
12sections:
13
14<ul>
15 <li> \ref mpqcooover
16 <li> \ref mpqcoowalk
17 <li> \ref mpqcoosamp
18</ul>
19
20\section mpqcooover Overview of the Object-Oriented Input
21
22MPQC starts off by creating a ParsedKeyVal object that parses the
23input file specified on the command line. The format of the input file
24is documented in the KeyVal documentation\if html (see \ref keyval)\endif. It is basically a free
25format input that associates keywords and logical groupings of keywords
26with values. The values can be scalars, arrays, or objects.
27
28The keywords recognized by MPQC begin with the mpqc prefix. That is, they
29must be nested between an <tt>mpqc:(</tt> and a <tt>)</tt>. Alternately,
30each keyword can be individually prefixed by <tt>mpqc:</tt>. The primary
31keywords are given below. Some of the keywords specify objects, in which
32case the object will require more ParsedKeyVal input. These objects are
33created from the input by using their ParsedKeyVal constructors. These
34constructors are documented with the source code documentation for the
35class.
36
37<dl>
38
39<dt><tt>mole</tt><dd> This is the most important keyword for MPQC. It
40 specifies the MolecularEnergy object. This is an object that knows
41 how to compute the energy of a molecule. The specializations of
42 MolecularEnergy that are most commonly used are CLKS, HSOSKS, UKS,
43 CLHF, HSOSHF, UHF, and MBPT2.
44
45<dt><tt>opt</tt><dd> This keyword must be specified for optimizations. It
46 specifies an Optimize object. Usually, QNewtonOpt is best for
47 finding minima and EFCOpt is best for transition states.
48
49<dt><tt>freq</tt><dd> This keyword must be specified to compute
50 frequencies. It specifies a MolecularFrequencies object.
51
52<dt><tt>thread</tt><dd> This specifies an object of type ThreadGrp that can
53 be used to advantage on shared-memory multiprocessor machines for
54 certain types of calculations. This keyword can be overridden by
55 giving the ThreadGrp in the environment or command line. See the
56 section on running MPQC for more information.
57
58<dt><tt>integrals</tt><dd> This specifies an object of type Integral that
59 will be used as the default integral evaluator. If MP2-R12 is
60 used, then this should be set to use IntegralCints with a line
61 like <tt>integrals<IntegralCints>: ()</tt>.
62
63<dt><tt>checkpoint</tt> </dt> <dd> The value of this keyword is boolean.
64
65 <ul>
66
67 <li><tt>true</tt> and optimization is to be performed <br>
68
69 <tt>opt</tt> object will be checkpointed after each iteration.
70 The checkpoint file suffix is ".ckpt".
71
72 <li><tt>true</tt> and optimization is not performed <br>
73
74 <tt>mole</tt> object will be checkpointed at intermediate points.
75 The manner in which
76 <tt>mole</tt> will be checkpointed depends on its particular type.
77 The checkpoint file suffix is usually ".wfn", however
78 in general it will depend on the particular specialization of
79 <tt>MolecularEnergy</tt>.
80
81 </ul>
82
83 The default is to not checkpoint.
84 </dd>
85
86<dt><tt>checkpoint_freq</tt><dd> This specifies how often to checkpoint
87 certain MolecularEnergy specializations which compute iteratively.
88 Currently, mole objects of SCF type can use this keyword.
89 The default is 1, which means to checkpoint after every iteration.
90
91<dt><tt>savestate</tt><dd> The value of this keyword is boolean. If true,
92 then the states of the Optimize and MolecularEnergy objects will be
93 saved after the calculation completes. The output file suffixes are
94 ".ckpt" and ".wfn", respectively. The default is to save state.
95
96<dt><tt>restart</tt><dd> The value of this keyword is boolean. If true,
97 mpqc will attempt to restart the calculation. If the checkpoint
98 file is not found, the calculation will continue as if the value
99 were false. The default is true.
100
101<dt><tt>restart_file</tt><dd> This gives the name of a file from which
102 restart information is read. If the file name ends with ".wfn"
103 then MPQC will try to restore a <tt>MolecularEnergy</tt> object from it
104 and query for the <tt>opt</tt> object in the input file.
105 If the file name ends with ".ckpt" MPQC will try to restore an <tt>Optimize</tt>
106 object from this file. The default file
107 name is formed by appending ".ckpt" to the input file name
108 with the extension removed.
109
110<dt><tt>do_energy</tt><dd> The value of this keyword is boolean. If true a
111 single point energy calculation will be done for the
112 MolecularEnergy object given with the mole keyword. The default is
113 true.
114
115<dt><tt>do_gradient</tt><dd> The value of this keyword is boolean. If true
116 a single point gradient calculation will be done for the
117 MolecularEnergy object given with the mole keyword. The default is
118 false.
119
120<dt><tt>do_cca</tt><dd> The value of this keywork is boolean. If true
121 the cca embedded framework will be initialized. The default is
122 false.
123
124<dt><tt>cca_path</tt><dd> The value of this keyword is a string that provides
125 a colon-separated list of directories in which CCA component libraries
126 may be found.
127
128<dt><tt>cca_load</tt><dd> The value of this keyword is a string that provides
129 a colon-separated list of sidl class names for CCA components which
130 will be instantiated from the libraries found in the path given by
131 <tt>cca_path</tt>.
132
133<dt><tt>optimize</tt><dd> The value of this keyword is boolean. If true
134 and the opt keyword was set to a valid value, then an optimization
135 will be performed. The default is true.
136
137<dt><tt>write_pdb</tt><dd> The value of this keyword is boolean. If true a
138 PDB file with the molecular coordinates will be written.
139
140<dt><tt>filename</tt><dd> The value of this keyword is a string that gives
141 a name from which checkpoint and other filenames are constructed.
142 The default is the basename of the input file.
143
144<dt><tt>print_timings</tt><dd> If this is true, timing information is
145 printed at the end of the run. The default is true.
146
147</dl>
148
149There are also some utility keywords that tell mpqc some technical
150details about how to do the calculation:
151<dl>
152<dt><tt>debug</tt><dd> This optional keyword gives a Debugger
153 object which can be used to help find the problem
154 if MPQC encounters a catastrophic error.
155<dt><tt>matrixkit</tt><dd>
156 This optional keyword gives a SCMatrixKit specialization
157 which is used to produce matrices of the desired type.
158 The default is a ReplSCMatrixKit which replicates
159 matrices on all of the nodes. Other choices are not thoroughly
160 tested.
161</dl>
162
163\section mpqcoowalk A Walk-Through of an Object-Oriented Input File
164
165This example input does a Hartree-Fock calculation on water.
166Following is the entire input, followed by a breakdown with
167descriptions.
168
169<pre>
170\% This input does a Hartree-Fock calculation on water.
171molecule<Molecule>: (
172 symmetry = C2V
173 unit = angstrom
174 { atoms geometry } = {
175 O [ 0.00000000 0.00000000 0.37000000 ]
176 H [ 0.78000000 0.00000000 -0.18000000 ]
177 H [ -0.78000000 0.00000000 -0.18000000 ]
178 }
179)
180basis<GaussianBasisSet>: (
181 name = "STO-3G"
182 molecule = $:molecule
183)
184mpqc: (
185 mole<CLHF>: (
186 molecule = $:molecule
187 basis = $:basis
188 )
189)
190</pre>
191<br>
192
193We start with a descriptive comment. Comments begin with a <tt>%</tt>.
194Everything from the <tt>%</tt> to the end of the line is ignored.
195
196<pre>
197\% This input does a Hartree-Fock calculation on water.
198</pre>
199<br>
200
201Now lets set up a Molecule object. The name of the object comes first, it
202is <tt>molecule</tt>. Then, in angle brackets, comes the type of the
203molecule, which is the class Molecule. The keyword and class name are
204followed by a <tt>:</tt> and then several pieces of input grouped between a
205pair of matching parentheses. These parentheses contain the information
206that will be given to Molecule KeyVal constructor.
207
208<pre>
209molecule<Molecule>: (
210</pre>
211<br>
212
213The point group of the molecule is needed. This is done by assigning
214<tt>symmetry</tt> to a case insensitive Schoenflies symbol that is used to
215initialize a PointGroup object. An Abelian point group should be used.
216
217<pre>
218 symmetry = C2V
219</pre>
220<br>
221
222The default unit for the Cartesian coordinates is Bohr. You can
223specify other units by assigned <tt>unit</tt> to a string that will be
224used to initialize a Units object.
225
226<pre>
227 unit = angstrom
228</pre>
229<br>
230
231Finally, the atoms and coordinates are given. This can be given in the
232shorthand table syntax shown below. The headings of the table are the
233keywords between the first pair of brackets. These are followed by an <tt>=</tt>
234and another pair of brackets that contain the data. The first datum is
235assigned to the first element of the array that corresponds to the first
236heading, <tt>atom</tt>. The second datum is assigned to the first element of the
237array associated with the second heading, <tt>geometry</tt>, and so on. Here the
238second datum is actually a vector: the x, y and z coordinates of the first
239atom.
240
241<pre>
242 { atoms geometry } = {
243 O [ 0.00000000 0.00000000 0.37000000 ]
244 H [ 0.78000000 0.00000000 -0.18000000 ]
245 H [ -0.78000000 0.00000000 -0.18000000 ]
246 }
247)
248</pre>
249<br>
250
251Next, a basis set object is given.
252
253<pre>
254basis<GaussianBasisSet>: (
255 name = "STO-3G"
256 molecule = $:molecule
257)
258</pre>
259<br>
260
261Now we will give the main body of input. All the subsequent
262keywords will be grouped in the <tt>mpqc</tt> section of the input
263(that is, each keyword will be prefixed with <tt>mpqc:</tt>).
264
265<pre>
266mpqc: (
267</pre>
268<br>
269
270Next we give the <tt>mole</tt> keyword which provides a specialization of
271the MolecularEnergy class. In this case we will do a closed-shell
272Hartree-Fock calculation. That is done with an object of type CLHF. The
273keywords that CLHF accepts are given with the documentation for the CLHF
274class, usually in the description of the <tt>const RefKeyVal&</tt>
275constructor for the class. Also with the CLHF documentation is a list of
276parent classes. Each of the parent classes may also have input. This
277input is included with the rest of the input for the child class.
278
279<pre>
280 mole<CLHF>: (
281</pre>
282<br>
283
284The next line specifies the molecule to be used. There are two things to
285note, first that this is actually a reference to complete molecule
286specification elsewhere in the input file. The <tt>$</tt> indicates that this is
287a reference and the keyword following the <tt>$</tt> is the actual location of the
288molecule. The <tt>:</tt> in front of the keyword means that the keyword is not
289relative to the current location in the input, but rather relative to the
290root of the tree of keywords. Thus, this line grabs the molecule that was
291specified above. The molecule object could have been placed here, but
292frequently it is necessary that several objects refer to the exact same
293object and this can only be done using references.
294
295The second point is that if you look at the documentation for CLHF,
296you will see that it doesn't read <tt>molecule</tt> keyword. However, if you
297follow its parent classes up to MolecularEnergy, you'll find that
298<tt>molecule</tt> is indeed read.
299
300<pre>
301 molecule = $:molecule
302</pre>
303<br>
304
305Just as we gave <tt>molecule</tt>, specify the basis set with the <tt>basis</tt> keyword
306as follows:
307
308<pre>
309 basis = $:basis
310</pre>
311<br>
312
313Now we close off the parentheses we opened above and we are finished.
314
315<pre>
316 )
317)
318</pre>
319<br>
320
321\section mpqcoosamp Sample Object-Oriented Input Files
322
323The easiest way to get started with mpqc is to start with one of sample
324inputs that most nearly matches your problem. The
325<tt>src/bin/mpqc/samples</tt> contains all of the sample inputs below:
326
327<ul>
328 <li> \ref mpqcoosamphf
329 <li> \ref mpqcoosampmp2
330 <li> \ref mpqcoosampmp2r12
331 <li> \ref mpqcoosamphfopt
332 <li> \ref mpqcoosamphessopt
333 <li> \ref mpqcoosampoptnewt
334 <li> \ref mpqcoosamphffreq
335 <li> \ref mpqcoosampcoor
336 <li> \ref mpqcoosamphb
337 <li> \ref mpqcoosampfixopt
338 <li> \ref mpqcoosampts
339 <li> \ref mpqcoosamptshess
340 <li> \ref mpqcoosamphfckpt
341 <li> \ref mpqcoosampmp2r12ckpt
342 <li> \ref mpqcoosamphfgradfromwfn
343 <li> \ref mpqcoosampmp2usinghfwfn
344 <li> \ref mpqcoosamphfusingcca
345</ul>
346
347\subsection mpqcoosamphf Hartree-Fock Energy
348
349The following input will compute the Hartree-Fock energy of water.
350
351<pre>
352\% emacs should use -*- KeyVal -*- mode
353\% molecule specification
354molecule<Molecule>: (
355 symmetry = C2V
356 unit = angstrom
357 { atoms geometry } = {
358 O [ 0.00000000 0.00000000 0.37000000 ]
359 H [ 0.78000000 0.00000000 -0.18000000 ]
360 H [ -0.78000000 0.00000000 -0.18000000 ]
361 }
362)
363\% basis set specification
364basis<GaussianBasisSet>: (
365 name = "STO-3G"
366 molecule = $:molecule
367)
368mpqc: (
369 checkpoint = no
370 savestate = no
371 \% method for computing the molecule's energy
372 mole<CLHF>: (
373 molecule = $:molecule
374 basis = $:basis
375 memory = 16000000
376 )
377)
378</pre>
379<br>
380
381\subsection mpqcoosampmp2 MP2 Energy
382
383The following input will compute the MP2 energy of water.
384
385<pre>
386\% emacs should use -*- KeyVal -*- mode
387\% molecule specification
388molecule<Molecule>: (
389 symmetry = C2V
390 unit = angstrom
391 { atoms geometry } = {
392 O [ 0.00000000 0.00000000 0.37000000 ]
393 H [ 0.78000000 0.00000000 -0.18000000 ]
394 H [ -0.78000000 0.00000000 -0.18000000 ]
395 }
396)
397\% basis set specification
398basis<GaussianBasisSet>: (
399 name = "STO-3G"
400 molecule = $:molecule
401)
402mpqc: (
403 checkpoint = no
404 savestate = no
405 \% method for computing the molecule's energy
406 mole<MBPT2>: (
407 molecule = $:molecule
408 basis = $:basis
409 memory = 16000000
410 \% reference wavefunction
411 reference<CLHF>: (
412 molecule = $:molecule
413 basis = $:basis
414 memory = 16000000
415 )
416 )
417)
418</pre>
419<br>
420
421\subsection mpqcoosampmp2r12 MP2-R12 energy
422
423The following will compute the MP2-R12 energy of water in standard approximation A'
424(MP2-R12/A').
425
426<pre>
427\% emacs should use -*- KeyVal -*- mode
428\% molecule specification
429molecule<Molecule>: (
430 symmetry = C2V
431 unit = angstrom
432 { atoms geometry } = {
433 O [ 0.00000000 0.00000000 0.37000000 ]
434 H [ 0.78000000 0.00000000 -0.18000000 ]
435 H [ -0.78000000 0.00000000 -0.18000000 ]
436 }
437)
438\% basis set specification
439basis<GaussianBasisSet>: (
440 name = "cc-pVDZ"
441 molecule = $:molecule
442)
443\% auxiliary basis set specification
444abasis<GaussianBasisSet>: (
445 name = "aug-cc-pVDZ"
446 molecule = $:molecule
447)
448mpqc: (
449 checkpoint = no
450 savestate = no
451 \% method for computing the molecule's energy
452 mole<MBPT2_R12>: (
453 molecule = $:molecule
454 basis = $:basis
455 aux_basis = $:abasis
456 stdapprox = "A'"
457 nfzc = 1
458 memory = 16000000
459 integrals<IntegralCints>:()
460 \% reference wavefunction
461 reference<CLHF>: (
462 molecule = $:molecule
463 basis = $:basis
464 memory = 16000000
465 integrals<IntegralCints>:()
466 )
467 )
468)
469</pre>
470<br>
471
472\subsection mpqcoosamphfopt Hartree-Fock Optimization
473
474The following input will optimize the geometry of water using
475the quasi-Newton method.
476
477<pre>
478\% emacs should use -*- KeyVal -*- mode
479\% molecule specification
480molecule<Molecule>: (
481 symmetry = C2V
482 unit = angstrom
483 { atoms geometry } = {
484 O [ 0.00000000 0.00000000 0.37000000 ]
485 H [ 0.78000000 0.00000000 -0.18000000 ]
486 H [ -0.78000000 0.00000000 -0.18000000 ]
487 }
488)
489\% basis set specification
490basis<GaussianBasisSet>: (
491 name = "6-31G*"
492 molecule = $:molecule
493)
494mpqc: (
495 checkpoint = no
496 savestate = no
497 \% molecular coordinates for optimization
498 coor<SymmMolecularCoor>: (
499 molecule = $:molecule
500 generator<IntCoorGen>: (
501 molecule = $:molecule
502 )
503 )
504 \% method for computing the molecule's energy
505 mole<CLHF>: (
506 molecule = $:molecule
507 basis = $:basis
508 coor = $..:coor
509 memory = 16000000
510 )
511 \% optimizer object for the molecular geometry
512 opt<QNewtonOpt>: (
513 function = $..:mole
514 update<BFGSUpdate>: ()
515 convergence<MolEnergyConvergence>: (
516 cartesian = yes
517 energy = $..:..:mole
518 )
519 )
520)
521</pre>
522<br>
523
524\subsection mpqcoosamphessopt Optimization with a Computed Guess Hessian
525
526The following input will optimize the geometry of water using
527the quasi-Newton method. The guess Hessian will be computed
528at a lower level of theory.
529
530<pre>
531\% emacs should use -*- KeyVal -*- mode
532\% molecule specification
533molecule<Molecule>: (
534 symmetry = C2V
535 unit = angstrom
536 { atoms geometry } = {
537 O [ 0.00000000 0.00000000 0.37000000 ]
538 H [ 0.78000000 0.00000000 -0.18000000 ]
539 H [ -0.78000000 0.00000000 -0.18000000 ]
540 }
541)
542\% basis set specification
543basis<GaussianBasisSet>: (
544 name = "6-31G*"
545 molecule = $:molecule
546)
547mpqc: (
548 checkpoint = no
549 savestate = no
550 \% molecular coordinates for optimization
551 coor<SymmMolecularCoor>: (
552 molecule = $:molecule
553 generator<IntCoorGen>: (
554 molecule = $:molecule
555 )
556 )
557 \% method for computing the molecule's energy
558 mole<CLHF>: (
559 molecule = $:molecule
560 basis = $:basis
561 coor = $..:coor
562 memory = 16000000
563 guess_hessian<FinDispMolecularHessian>: (
564 molecule = $:molecule
565 only_totally_symmetric = yes
566 eliminate_cubic_terms = no
567 checkpoint = no
568 energy<CLHF>: (
569 molecule = $:molecule
570 memory = 16000000
571 basis<GaussianBasisSet>: (
572 name = "3-21G"
573 molecule = $:molecule
574 )
575 )
576 )
577 )
578 \% optimizer object for the molecular geometry
579 opt<QNewtonOpt>: (
580 function = $..:mole
581 update<BFGSUpdate>: ()
582 convergence<MolEnergyConvergence>: (
583 cartesian = yes
584 energy = $..:..:mole
585 )
586 )
587)
588</pre>
589<br>
590
591\subsection mpqcoosampoptnewt Optimization Using Newton's Method
592
593The following input will optimize the geometry of water using the Newton's
594method. The Hessian will be computed at each step in the optimization.
595However, Hessian recomputation is usually not worth the cost; try using the
596computed Hessian as a guess Hessian for a quasi-Newton method before
597resorting to a Newton optimization.
598
599<pre>
600\% Emacs should use -*- KeyVal -*- mode
601\% molecule specification
602molecule<Molecule>: (
603 symmetry = c2v
604 unit = angstrom
605 { atoms geometry } = {
606 O [ 0.00000000 0.00000000 0.36937294 ]
607 H [ 0.78397590 0.00000000 -0.18468647 ]
608 H [ -0.78397590 0.00000000 -0.18468647 ]
609 }
610)
611\% basis set specification
612basis<GaussianBasisSet>: (
613 name = "3-21G"
614 molecule = $:molecule
615)
616mpqc: (
617 checkpoint = no
618 savestate = no
619 restart = no
620 \% molecular coordinates for optimization
621 coor<SymmMolecularCoor>: (
622 molecule = $:molecule
623 generator<IntCoorGen>: (
624 molecule = $:molecule
625 )
626 )
627 do_energy = no
628 do_gradient = no
629 \% method for computing the molecule's energy
630 mole<CLHF>: (
631 molecule = $:molecule
632 basis = $:basis
633 memory = 16000000
634 coor = $..:coor
635 guess_wavefunction<CLHF>: (
636 molecule = $:molecule
637 total_charge = 0
638 basis<GaussianBasisSet>: (
639 molecule = $:molecule
640 name = "STO-3G"
641 )
642 memory = 16000000
643 )
644 hessian<FinDispMolecularHessian>: (
645 only_totally_symmetric = yes
646 eliminate_cubic_terms = no
647 checkpoint = no
648 )
649 )
650 optimize = yes
651 \% optimizer object for the molecular geometry
652 opt<NewtonOpt>: (
653 print_hessian = yes
654 max_iterations = 20
655 function = $..:mole
656 convergence<MolEnergyConvergence>: (
657 cartesian = yes
658 energy = $..:..:mole
659 )
660 )
661)
662</pre>
663<br>
664
665\subsection mpqcoosamphffreq Hartree-Fock Frequencies
666
667The following input will compute Hartree-Fock frequencies by finite
668displacements. A thermodynamic analysis will also be
669performed. If optimization input is also provided, then the
670optimization will be run first, then the frequencies.
671
672<pre>
673\% emacs should use -*- KeyVal -*- mode
674\% molecule specification
675molecule<Molecule>: (
676 symmetry = C1
677 { atoms geometry } = {
678 O [ 0.0000000000 0.0000000000 0.8072934188 ]
679 H [ 1.4325589285 0.0000000000 -0.3941980761 ]
680 H [ -1.4325589285 0.0000000000 -0.3941980761 ]
681 }
682)
683\% basis set specification
684basis<GaussianBasisSet>: (
685 name = "STO-3G"
686 molecule = $:molecule
687)
688mpqc: (
689 checkpoint = no
690 savestate = no
691 \% method for computing the molecule's energy
692 mole<CLHF>: (
693 molecule = $:molecule
694 basis = $:basis
695 memory = 16000000
696 )
697\% vibrational frequency input
698 freq<MolecularFrequencies>: (
699 molecule = $:molecule
700 )
701)
702</pre>
703<br>
704
705\subsection mpqcoosampcoor Giving Coordinates and a Guess Hessian
706
707The following example shows several features that are really independent.
708The variable coordinates are explicitly given, rather than generated
709automatically. This is especially useful when a guess Hessian is to be
710provided, as it is here. This Hessian, as given by the user, is not
711complete and the QNewtonOpt object will fill in the missing
712values using a guess the Hessian provided by the MolecularEnergy
713object. Also, fixed coordinates are given in this sample input.
714
715<pre>
716\% emacs should use -*- KeyVal -*- mode
717\% molecule specification
718molecule<Molecule>: (
719 symmetry = C1
720 { atoms geometry } = {
721 H [ 0.088 2.006 1.438 ]
722 O [ 0.123 3.193 0.000 ]
723 H [ 0.088 2.006 -1.438 ]
724 O [ 4.502 5.955 -0.000 ]
725 H [ 2.917 4.963 -0.000 ]
726 H [ 3.812 7.691 -0.000 ]
727 }
728)
729\% basis set specification
730basis<GaussianBasisSet>: (
731 name = "STO-3G"
732 molecule = $:molecule
733)
734mpqc: (
735 checkpoint = no
736 savestate = no
737 \% method for computing the molecule's energy
738 mole<CLHF>: (
739 molecule = $:molecule
740 basis = $:basis
741 coor = $..:coor
742 memory = 16000000
743 )
744 \% molecular coordinates for optimization
745 coor<SymmMolecularCoor>: (
746 molecule = $:molecule
747 generator<IntCoorGen>: (
748 molecule = $:molecule
749 extra_bonds = [ 2 5 ]
750 )
751 \% use these instead of generated coordinates
752 variable<SetIntCoor>: [
753 \<StreSimpleCo>:( atoms = [ 2 5 ] )
754 \<BendSimpleCo>:( atoms = [ 2 5 4 ] )
755 \<OutSimpleCo>: ( atoms = [ 5 2 1 3 ] )
756 \<SumIntCoor>: (
757 coor: [
758 \<StreSimpleCo>:( atoms = [ 1 2 ] )
759 \<StreSimpleCo>:( atoms = [ 2 3 ] )
760 ]
761 coef = [ 1.0 1.0 ]
762 )
763 \<SumIntCoor>: (
764 coor: [
765 \<StreSimpleCo>:( atoms = [ 4 5 ] )
766 \<StreSimpleCo>:( atoms = [ 4 6 ] )
767 ]
768 coef = [ 1.0 1.0 ]
769 )
770 \<BendSimpleCo>:( atoms = [ 1 2 3 ] )
771 \<BendSimpleCo>:( atoms = [ 5 4 6 ] )
772 ]
773 \% these are fixed by symmetry anyway,
774 fixed<SetIntCoor>: [
775 \<SumIntCoor>: (
776 coor: [
777 \<StreSimpleCo>:( atoms = [ 1 2 ] )
778 \<StreSimpleCo>:( atoms = [ 2 3 ] )
779 ]
780 coef = [ 1.0 -1.0 ]
781 )
782 \<SumIntCoor>: (
783 coor: [
784 \<StreSimpleCo>:( atoms = [ 4 5 ] )
785 \<StreSimpleCo>:( atoms = [ 4 6 ] )
786 ]
787 coef = [ 1.0 -1.0 ]
788 )
789 \<TorsSimpleCo>:( atoms = [ 2 5 4 6] )
790 \<OutSimpleCo>:( atoms = [ 3 2 6 4 ] )
791 \<OutSimpleCo>:( atoms = [ 1 2 6 4 ] )
792 ]
793 )
794 \% optimizer object for the molecular geometry
795 opt<QNewtonOpt>: (
796 function = $..:mole
797 update<BFGSUpdate>: ()
798 convergence<MolEnergyConvergence>: (
799 cartesian = yes
800 energy = $..:..:mole
801 )
802 \% give a partial guess hessian in internal coordinates
803 \% the missing elements will be filled in automatically
804 hessian = [
805 [ 0.0109261670 ]
806 [ -0.0004214845 0.0102746106 ]
807 [ -0.0008600592 0.0030051330 0.0043149957 ]
808 [ 0.0 0.0 0.0 ]
809 [ 0.0 0.0 0.0 ]
810 [ 0.0 0.0 0.0 ]
811 [ 0.0 0.0 0.0 ]
812 ]
813 )
814)
815</pre>
816<br>
817
818\subsection mpqcoosamphb Optimization with a Hydrogen Bond
819
820The automatic internal coordinate generator will fail if it cannot find
821enough redundant internal coordinates. In this case, the internal
822coordinate generator must be explicitly created in the input and given
823extra connectivity information, as is shown below.
824
825<pre>
826\% emacs should use -*- KeyVal -*- mode
827\% molecule specification
828molecule<Molecule>: (
829 symmetry = C1
830 { atoms geometry } = {
831 H [ 0.088 2.006 1.438 ]
832 O [ 0.123 3.193 0.000 ]
833 H [ 0.088 2.006 -1.438 ]
834 O [ 4.502 5.955 -0.000 ]
835 H [ 2.917 4.963 -0.000 ]
836 H [ 3.812 7.691 -0.000 ]
837 }
838)
839\% basis set specification
840basis<GaussianBasisSet>: (
841 name = "STO-3G"
842 molecule = $:molecule
843)
844mpqc: (
845 checkpoint = no
846 savestate = no
847 \% method for computing the molecule's energy
848 mole<CLHF>: (
849 molecule = $:molecule
850 basis = $:basis
851 coor = $..:coor
852 memory = 16000000
853 )
854 \% molecular coordinates for optimization
855 coor<SymmMolecularCoor>: (
856 molecule = $:molecule
857 \% give an internal coordinate generator that knows about the
858 \% hydrogen bond between atoms 2 and 5
859 generator<IntCoorGen>: (
860 molecule = $:molecule
861 extra_bonds = [ 2 5 ]
862 )
863 )
864 \% optimizer object for the molecular geometry
865 opt<QNewtonOpt>: (
866 function = $..:mole
867 update<BFGSUpdate>: ()
868 convergence<MolEnergyConvergence>: (
869 cartesian = yes
870 energy = $..:..:mole
871 )
872 )
873)
874</pre>
875<br>
876
877\subsection mpqcoosampfixopt Fixed Coordinate Optimization
878
879 This example shows how to selectively fix internal coordinates in an
880optimization. Any number of linearly independent coordinates can be given.
881These coordinates must remain linearly independent throughout the
882optimization, a condition that might not hold since the coordinates can be
883nonlinear.
884
885 By default, the initial fixed coordinates' values are taken from the
886cartesian geometry given by the Molecule object; however, the
887molecule will be displaced to the internal coordinate values given with the
888fixed internal coordinates if have_fixed_values keyword is set to
889true, as shown in this example. In this case, the initial cartesian
890geometry should be reasonably close to the desired initial geometry and all
891of the variable coordinates will be frozen to their original values during
892the initial displacement.
893
894<pre>
895\% emacs should use -*- KeyVal -*- mode
896\% molecule specification
897molecule<Molecule>: (
898 symmetry = CS
899 { atoms geometry } = {
900 H [ 3.04 -0.69 -1.59 ]
901 H [ 3.04 -0.69 1.59 ]
902 N [ 2.09 -0.48 -0.00 ]
903 C [ -0.58 -0.15 0.00 ]
904 H [ -1.17 1.82 0.00 ]
905 H [ -1.41 -1.04 -1.64 ]
906 H [ -1.41 -1.04 1.64 ]
907 }
908)
909\% basis set specification
910basis<GaussianBasisSet>: (
911 name = "3-21G*"
912 molecule = $:molecule
913)
914mpqc: (
915 checkpoint = no
916 savestate = no
917 \% molecular coordinates for optimization
918 coor<SymmMolecularCoor>: (
919 molecule = $:molecule
920 generator<IntCoorGen>: (
921 molecule = $:molecule
922 )
923 have_fixed_values = yes
924 fixed<SetIntCoor>: [
925 \<OutSimpleCo>: ( value = -0.1
926 label = "N-inversion"
927 atoms = [4 3 2 1] )
928 ]
929 )
930 \% method for computing the molecule's energy
931 mole<CLHF>: (
932 molecule = $:molecule
933 basis = $:basis
934 coor = $..:coor
935 memory = 16000000
936 )
937 \% optimizer object for the molecular geometry
938 opt<QNewtonOpt>: (
939 max_iterations = 20
940 function = $..:mole
941 update<BFGSUpdate>: ()
942 convergence<MolEnergyConvergence>: (
943 cartesian = yes
944 energy = $..:..:mole
945 )
946 )
947)
948</pre>
949<br>
950
951\subsection mpqcoosampts Transition State Optimization
952
953This example shows a transition state optimization of the N-inversion in
954\f$\mathrm{CH}_3\mathrm{NH}_2\f$ using mode following. The initial geometry
955was obtained by doing a few fixed coordinate optimizations along the
956inversion coordinate.
957
958<pre>
959\% emacs should use -*- KeyVal -*- mode
960\% molecule specification
961molecule<Molecule>: (
962 symmetry = CS
963 { atoms geometry } = {
964 H [ 3.045436 -0.697438 -1.596748 ]
965 H [ 3.045436 -0.697438 1.596748 ]
966 N [ 2.098157 -0.482779 -0.000000 ]
967 C [ -0.582616 -0.151798 0.000000 ]
968 H [ -1.171620 1.822306 0.000000 ]
969 H [ -1.417337 -1.042238 -1.647529 ]
970 H [ -1.417337 -1.042238 1.647529 ]
971 }
972)
973\% basis set specification
974basis<GaussianBasisSet>: (
975 name = "3-21G*"
976 molecule = $:molecule
977)
978mpqc: (
979 checkpoint = no
980 savestate = no
981 \% molecular coordinates for optimization
982 coor<SymmMolecularCoor>: (
983 molecule = $:molecule
984 generator<IntCoorGen>: (
985 molecule = $:molecule
986 )
987 followed<OutSimpleCo> = [ "N-inversion" 4 3 2 1 ]
988 )
989 \% method for computing the molecule's energy
990 mole<CLHF>: (
991 molecule = $:molecule
992 basis = $:basis
993 coor = $..:coor
994 memory = 16000000
995 )
996 \% optimizer object for the molecular geometry
997 opt<EFCOpt>: (
998 transition_state = yes
999 mode_following = yes
1000 max_iterations = 20
1001 function = $..:mole
1002 update<PowellUpdate>: ()
1003 convergence<MolEnergyConvergence>: (
1004 cartesian = yes
1005 energy = $..:..:mole
1006 )
1007 )
1008)
1009</pre>
1010<br>
1011
1012\subsection mpqcoosamptshess Transition State Optimization with a Computed Guess Hessian
1013
1014This example shows a transition state optimization of the N-inversion in
1015\f$\mathrm{CH}_3\mathrm{NH}_2\f$ using mode following. The initial geometry
1016was obtained by doing a few fixed coordinate optimizations along the
1017inversion coordinate. An approximate guess Hessian will be computed, which
1018makes the optimiziation converge much faster in this case.
1019
1020<pre>
1021\% emacs should use -*- KeyVal -*- mode
1022\% molecule specification
1023molecule<Molecule>: (
1024 symmetry = CS
1025 { atoms geometry } = {
1026 H [ 3.045436 -0.697438 -1.596748 ]
1027 H [ 3.045436 -0.697438 1.596748 ]
1028 N [ 2.098157 -0.482779 -0.000000 ]
1029 C [ -0.582616 -0.151798 0.000000 ]
1030 H [ -1.171620 1.822306 0.000000 ]
1031 H [ -1.417337 -1.042238 -1.647529 ]
1032 H [ -1.417337 -1.042238 1.647529 ]
1033 }
1034)
1035\% basis set specification
1036basis<GaussianBasisSet>: (
1037 name = "3-21G*"
1038 molecule = $:molecule
1039)
1040mpqc: (
1041 checkpoint = no
1042 savestate = no
1043 \% molecular coordinates for optimization
1044 coor<SymmMolecularCoor>: (
1045 molecule = $:molecule
1046 generator<IntCoorGen>: (
1047 molecule = $:molecule
1048 )
1049 followed<OutSimpleCo> = [ "N-inversion" 4 3 2 1 ]
1050 )
1051 \% method for computing the molecule's energy
1052 mole<CLHF>: (
1053 molecule = $:molecule
1054 basis = $:basis
1055 coor = $..:coor
1056 memory = 16000000
1057 guess_hessian<FinDispMolecularHessian>: (
1058 molecule = $:molecule
1059 only_totally_symmetric = yes
1060 eliminate_cubic_terms = no
1061 checkpoint = no
1062 energy<CLHF>: (
1063 molecule = $:molecule
1064 memory = 16000000
1065 basis<GaussianBasisSet>: (
1066 name = "3-21G"
1067 molecule = $:molecule
1068 )
1069 )
1070 )
1071 )
1072 \% optimizer object for the molecular geometry
1073 opt<EFCOpt>: (
1074 transition_state = yes
1075 mode_following = yes
1076 max_iterations = 20
1077 function = $..:mole
1078 update<PowellUpdate>: ()
1079 convergence<MolEnergyConvergence>: (
1080 cartesian = yes
1081 energy = $..:..:mole
1082 )
1083 )
1084)
1085</pre>
1086<br>
1087
1088
1089\subsection mpqcoosamphfckpt Hartree-Fock energy with intermediate checkpointing
1090
1091The following two sections demonstrate how MPQC can be used to save the <tt>mole</tt> object
1092periodically.
1093This input will compute the Hartree-Fock energy of water while saving
1094the <tt>mole</tt> object every 3 iterations.
1095
1096<pre>
1097\% emacs should use -*- KeyVal -*- mode
1098\% molecule specification
1099molecule<Molecule>: (
1100 symmetry = C2V
1101 unit = angstrom
1102 { atoms geometry } = {
1103 O [ 0.00000000 0.00000000 0.37000000 ]
1104 H [ 0.78000000 0.00000000 -0.18000000 ]
1105 H [ -0.78000000 0.00000000 -0.18000000 ]
1106 }
1107)
1108\% basis set specification
1109basis<GaussianBasisSet>: (
1110 name = "STO-3G"
1111 molecule = $:molecule
1112)
1113mpqc: (
1114 checkpoint = yes
1115 filename = "h2o-rhf-STO3G"
1116 checkpoint_freq = 3
1117 savestate = no
1118 \% method for computing the molecule's energy
1119 mole<CLHF>: (
1120 molecule = $:molecule
1121 basis = $:basis
1122 memory = 16000000
1123 )
1124)
1125</pre>
1126<br>
1127
1128The <tt>mole</tt> object will be saved to files named "h2o-rhf-STO3G.wfn.<iter#>.tmp"
1129where <iter#> is the SCF iteration number (3, 6, etc.). Only the most recent file is kept,
1130files from previous iterations are removed automatically. Keyword <tt>filename</tt>
1131here is used to set the default file name prefix.
1132
1133\subsection mpqcoosampmp2r12ckpt MP2-R12 energy with intermediate checkpointing
1134
1135The following input will compute the MP2-R12 energy of water in standard approximation A'
1136(MP2-R12/A') while saving the <tt>mole</tt> object at intermediate checkpoints.
1137
1138<pre>
1139\% emacs should use -*- KeyVal -*- mode
1140\% molecule specification
1141molecule<Molecule>: (
1142 symmetry = C2V
1143 unit = angstrom
1144 { atoms geometry } = {
1145 O [ 0.00000000 0.00000000 0.37000000 ]
1146 H [ 0.78000000 0.00000000 -0.18000000 ]
1147 H [ -0.78000000 0.00000000 -0.18000000 ]
1148 }
1149)
1150\% basis set specification
1151basis<GaussianBasisSet>: (
1152 name = "cc-pVDZ"
1153 molecule = $:molecule
1154)
1155\% auxiliary basis set specification
1156abasis<GaussianBasisSet>: (
1157 name = "aug-cc-pVDZ"
1158 molecule = $:molecule
1159)
1160mpqc: (
1161 checkpoint = yes
1162 filename = "h2o-mp2r12ap-vdz-avdz"
1163 savestate = no
1164 \% method for computing the molecule's energy
1165 mole<MBPT2_R12>: (
1166 molecule = $:molecule
1167 basis = $:basis
1168 aux_basis = $:abasis
1169 stdapprox = "A'"
1170 nfzc = 1
1171 memory = 16000000
1172 integrals<IntegralCints>:()
1173 \% reference wavefunction
1174 reference<CLHF>: (
1175 molecule = $:molecule
1176 basis = $:basis
1177 memory = 16000000
1178 integrals<IntegralCints>:()
1179 )
1180 )
1181)
1182</pre>
1183<br>
1184
1185The <tt>mole</tt> object will be saved to a file named <tt>h2o-mp2r12ap-vdz-avdz.wfn"</tt>.
1186Keyword <tt>filename</tt> here is used to set the default file name prefix.
1187Objects of the <tt>MBPT2_R12</tt> type are checkpointed after the HF procedure,
1188after the first integrals (SBS) transformation, and after the optional second (ABS)
1189transformation.
1190
1191\subsection mpqcoosamphfgradfromwfn HF gradient computed from a previously computed HF wave funtion
1192
1193The following will illustrate how to reuse previously computed <tt>MolecularEnergy</tt> objects
1194in subsequent computations. The first input computes Hartree-Fock energy for water
1195and saves the <tt>mole</tt> object to file <tt>h2o-rhf-sto3g.wfn</tt>.
1196
1197<pre>
1198\% emacs should use -*- KeyVal -*- mode
1199\% molecule specification
1200molecule<Molecule>: (
1201 symmetry = C2V
1202 unit = angstrom
1203 { atoms geometry } = {
1204 O [ 0.00000000 0.00000000 0.37000000 ]
1205 H [ 0.78000000 0.00000000 -0.18000000 ]
1206 H [ -0.78000000 0.00000000 -0.18000000 ]
1207 }
1208)
1209\% basis set specification
1210basis<GaussianBasisSet>: (
1211 name = "STO-3G"
1212 molecule = $:molecule
1213)
1214mpqc: (
1215 checkpoint = no
1216 savestate = yes
1217 filename = "h2o-rhf-sto3g"
1218 \% method for computing the molecule's energy
1219 mole<CLHF>: (
1220 molecule = $:molecule
1221 basis = $:basis
1222 memory = 16000000
1223 )
1224)
1225</pre>
1226<br>
1227
1228The second input reuses the <tt>mole</tt> object from the previous run
1229to compute the gradient of the Hartree-Fock energy.
1230
1231<pre>
1232\% emacs should use -*- KeyVal -*- mode
1233mpqc: (
1234 checkpoint = no
1235 savestate = no
1236 restart = yes
1237 restart_file = "h2o-rhf-sto3g.wfn"
1238 do_gradient = yes
1239)
1240</pre>
1241<br>
1242
1243\subsection mpqcoosampmp2usinghfwfn MP2 Energy computed using precomputed Hartree-Fock wave function
1244
1245The following input will compute the MP2 energy of water using a saved Hartree-Fock wave function
1246obtained using the first input from \ref mpqcoosamphfgradfromwfn.
1247
1248<pre>
1249\% emacs should use -*- KeyVal -*- mode
1250\% molecule specification
1251molecule<Molecule>: (
1252 symmetry = C2V
1253 unit = angstrom
1254 { atoms geometry } = {
1255 O [ 0.00000000 0.00000000 0.37000000 ]
1256 H [ 0.78000000 0.00000000 -0.18000000 ]
1257 H [ -0.78000000 0.00000000 -0.18000000 ]
1258 }
1259)
1260\% basis set specification
1261basis<GaussianBasisSet>: (
1262 name = "STO-3G"
1263 molecule = $:molecule
1264)
1265\% wave function file object specification
1266wfnfile<BcastStateInBin>:file = "h2o-rhf-sto3g.wfn"
1267mpqc: (
1268 checkpoint = no
1269 savestate = no
1270 \% method for computing the molecule's energy
1271 mole<MBPT2>: (
1272 molecule = $:molecule
1273 basis = $:basis
1274 memory = 16000000
1275 \% reference wavefunction
1276 reference<SavableStateProxy>: (
1277 statein = $:wfnfile
1278 object = "CLHF"
1279 )
1280 )
1281)
1282</pre>
1283<br>
1284
1285Note that now object <tt>reference</tt> is of type <tt>SavableStateProxy</tt>,
1286rather than <tt>CLHF</tt>. <tt>SavableStateProxy</tt> is a special object type
1287that can be converted at runtime into the desired type (in this case, <tt>CLHF</tt>,
1288as indicated by <tt>object</tt>).
1289
1290\subsection mpqcoosamphfusingcca CLHF energy using a CCA integrals component
1291
1292The following input will compute the CLHF energy of water using a CCA integrals component
1293via the IntegralCCA adaptor class.
1294
1295<pre>
1296\% emacs should use -*- KeyVal -*- mode
1297\% molecule specification
1298molecule<Molecule>: (
1299 symmetry = C2V
1300 unit = angstrom
1301 { atoms geometry } = {
1302 O [ 0.00000000 0.00000000 0.37000000 ]
1303 H [ 0.78000000 0.00000000 -0.18000000 ]
1304 H [ -0.78000000 0.00000000 -0.18000000 ]
1305 }
1306)
1307\% basis set specification
1308basis<GaussianBasisSet>: (
1309 name = "STO-3G"
1310 molecule = $:molecule
1311)
1312mpqc: (
1313 \% path to component libraries
1314 cca_path = /usr/local/lib/cca
1315 \% sidl class names of components which will be instantiated
1316 cca_load = MPQC.IntegralEvaluatorFactory
1317 do_cca = yes
1318 checkpoint = no
1319 savestate = no
1320 \% method for computing the molecule's energy
1321 mole<CLHF>: (
1322 molecule = $:molecule
1323 basis = $:basis
1324 \% cca integrals adaptor class
1325 integrals<IntegralCCA>: (
1326 molecule = $:molecule
1327 \% integral buffer type
1328 integral_buffer = opaque
1329 \% integral package
1330 integral_package = intv3
1331 \% factory component sidl class name
1332 evaluator_factory = MPQC.IntegralEvaluatorFactory
1333 )
1334 )
1335)
1336</pre>
1337<br>
1338
1339*/
Note: See TracBrowser for help on using the repository browser.