1 |
|
---|
2 | /** \page mpqcpsi Running Psi 3 from MPQC
|
---|
3 |
|
---|
4 | <a href="http://www.psicode.org/">Psi 3</a>
|
---|
5 | is a suite of <i>ab initio</i> codes related to the
|
---|
6 | original Psi package started in Prof. Fritz Schaefer's
|
---|
7 | group at UC Berkeley. Current version of MPQC works with stable
|
---|
8 | versions of Psi 3 starting with 3.2.0.
|
---|
9 | From now on we will refer to Psi 3 as simply Psi.
|
---|
10 | Psi is written primarily in C and executes
|
---|
11 | in serial mode only.
|
---|
12 | The interface between Psi and MPQC is intended mainly for
|
---|
13 | Psi users who wish to exploit MPQC's geometry optimization and frequency analyses
|
---|
14 | capabilities with Psi energies and gradients.
|
---|
15 |
|
---|
16 | The following sections explain how to use Psi from MPQC:
|
---|
17 |
|
---|
18 | <ul>
|
---|
19 | <li> \ref psiworks
|
---|
20 | <li> \ref psienv
|
---|
21 | <li> \ref psiinp
|
---|
22 | <li> \ref psiexenv
|
---|
23 | <li> \ref psiwfn
|
---|
24 | <li> \ref examples
|
---|
25 | </ul>
|
---|
26 |
|
---|
27 | \section psiworks How the MPQC-Psi interface works
|
---|
28 |
|
---|
29 | The current version of the interface is rather slim. It is only possible to
|
---|
30 | import energies and gradients computed with Psi into MPQC, i.e. wave functions
|
---|
31 | cannot be imported. All MPQC-Psi interaction happens via text files and system calls.
|
---|
32 | MPQC generates input file for Psi, calls appropriate Psi modules, and then
|
---|
33 | parses the output files for energies and gradients.
|
---|
34 |
|
---|
35 |
|
---|
36 | \section psienv Environmental Variables
|
---|
37 |
|
---|
38 | Several environmental variables are used to control MPQC-Psi interaction:
|
---|
39 | <dl>
|
---|
40 | <dt><tt>PSIBIN</tt><dd> By default, MPQC will try to find Psi binaries under <tt>/usr/local/psi/bin</tt>.
|
---|
41 | Use <tt>PSIBIN</tt> environmental variable to point to the right location.
|
---|
42 | </dl>
|
---|
43 | The rest of the Psi environment is job specific and specified in the input file.
|
---|
44 |
|
---|
45 |
|
---|
46 | \section psiinp Preparing an input file
|
---|
47 |
|
---|
48 | As noted above, MPQC parses the input file, and as such the input file has to be in the MPQC
|
---|
49 | OO input format. All features of usual MPQC input files are there (<tt>mpqc</tt> section,
|
---|
50 | <tt>mole</tt> MolecularEnergy object, etc.).
|
---|
51 | In addition the following rules apply:
|
---|
52 | <ul>
|
---|
53 | <li> instead of using MPQC Wavefunction objects (CLHF, MBPT2, etc.),
|
---|
54 | the Psi specific Wavefunction types (i.e. specializations of PsiWavefunction) have to be used.
|
---|
55 | Presently the following specializations are
|
---|
56 | supported: PsiCLHF, PsiHSOSHF, PsiUHF, PsiCCSD, PsiCCSD_T . The first three are directly
|
---|
57 | analogous to MPQC Wavefunction types CLHF, HSOSHF, and UHF. The latter two do not have
|
---|
58 | MPQC analogs yet. See appropriate class documentation on how to specify them properly.
|
---|
59 | <li> each Psi-specific Wavefunction object has to have a member object <tt>psienv</tt> of type
|
---|
60 | PsiExEnv. PsiExEnv contains job specific information, such as the directory in which
|
---|
61 | Psi input, output, and checkpoint files will be kept, filename prefix, scratch directories, etc.
|
---|
62 | It makes sense to define one such object and simply refer to it from all
|
---|
63 | PsiWavefunction objects. See PsiExEnv class documentation for more info.
|
---|
64 | </ul>
|
---|
65 |
|
---|
66 | \section psiexenv Psi Execution Environment
|
---|
67 |
|
---|
68 | Each PsiWavefunction-derived class has to have a member object called <tt>psienv</tt>
|
---|
69 | of type PsiExEnv. The following keywords are used by its KeyVal constructor:
|
---|
70 | <dl>
|
---|
71 | <dt><tt>cwd</tt><dd> The directory where to keep Psi input, checkpoint, stdout, stderr, and other
|
---|
72 | files. Default is <tt>/tmp</tt>.
|
---|
73 | <dt><tt>fileprefix</tt><dd> The file prefix to use for Psi checkpoint, scratch, and some ASCII files.
|
---|
74 | Equivalent to keyword <tt>name</tt> in Psi <tt>psi:files:default</tt> section.
|
---|
75 | Defaults to <tt>psi</tt>.
|
---|
76 | <dt><tt>stdout</tt><dd> The file into which to redirect standard output of Psi modules.
|
---|
77 | Defaults to <tt>psi.stdout</tt>.
|
---|
78 | <dt><tt>stderr</tt><dd> The file into which to redirect standard error of Psi modules.
|
---|
79 | Defaults to <tt>psi.stderr</tt>.
|
---|
80 | <dt><tt>nscratch</tt><dd> The number of locations over which to stripe Psi binary
|
---|
81 | files. Equivalent to keyword <tt>nvolume</tt> in Psi <tt>psi:files:default</tt> section.
|
---|
82 | Default is 1.
|
---|
83 | <dt><tt>scratch</tt><dd> The locations over which to stripe Psi binary
|
---|
84 | files. Equivalent to keyword <tt>volume<i>x</i></tt> in Psi <tt>psi:files:default</tt> section.
|
---|
85 | There's no default.
|
---|
86 | </dl>
|
---|
87 |
|
---|
88 | Here's an example:
|
---|
89 | <pre>
|
---|
90 | psienv<PsiExEnv>: (
|
---|
91 | cwd = ./
|
---|
92 | fileprefix = psi.test
|
---|
93 | nscratch = 2
|
---|
94 | scratch = [ "/scratch1/" "/scratch2/" ]
|
---|
95 | )
|
---|
96 | </pre>
|
---|
97 | <br>
|
---|
98 |
|
---|
99 |
|
---|
100 | \section psiwfn PsiWavefunction specializations
|
---|
101 |
|
---|
102 | Class PsiWavefunction is derived from class Wavefunction, hence its
|
---|
103 | KeyVal constructor uses all keywords that Wavefunction's KeyVal
|
---|
104 | constructor uses (<tt>basis</tt>, <tt>molecule</tt>, etc.).
|
---|
105 | In addition, PsiWavefunction's KeyVal constructor
|
---|
106 | looks for the following keywords in the input file:
|
---|
107 | <dl>
|
---|
108 | <dt><tt>psienv</tt><dd> The PsiExEnv object that provides job specific
|
---|
109 | Psi environment. There's no default.
|
---|
110 | <dt><tt>docc</tt><dd> An optional array of integers that specifies
|
---|
111 | the number of doubly-occupied orbitals in each irrep.
|
---|
112 | <dt><tt>socc</tt><dd> An optional array of integers that specifies
|
---|
113 | the number of singly-occupied orbitals in each irrep.
|
---|
114 | <dt><tt>frozen_docc</tt><dd> An optional array of integers that specifies
|
---|
115 | the number of doubly-occupied orbitals in each irrep frozen in correlated
|
---|
116 | computations.
|
---|
117 | <dt><tt>frozen_uocc</tt><dd> An optional array of integers that specifies
|
---|
118 | the number of unoccupied orbitals in each irrep frozen in correlated
|
---|
119 | computations.
|
---|
120 | <dt><tt>total_charge</tt><dd> The total charge of the system. This keyword is
|
---|
121 | queried only if neither <tt>docc</tt> nor <tt>socc</tt> are given.
|
---|
122 | <dt><tt>multiplicity</tt><dd> The spin multiplicity of the system (2*M_S+1).
|
---|
123 | This keyword is queried only if neither <tt>docc</tt> nor <tt>socc</tt>
|
---|
124 | are given.
|
---|
125 | <dt><tt>memory</tt><dd> The number of bytes of memory Psi modules
|
---|
126 | associated with this PsiWavefunction are allowed to use. Default is
|
---|
127 | 2000000 (2 million bytes, approximately 2 MB).
|
---|
128 | </dl>
|
---|
129 | Note that keywords <tt>docc</tt>, <tt>socc</tt>, <tt>frozen_docc</tt>, <tt>frozen_uocc</tt>,
|
---|
130 | <tt>total_charge</tt>, and <tt>multiplicity</tt> are used by appropriate specializations
|
---|
131 | of PsiWavefunctions, i.e. PsiCLHF only checks for <tt>docc</tt>,
|
---|
132 | etc.
|
---|
133 |
|
---|
134 | PsiWavefunction specializations PsiCCSD and PsiCCSD_T also look for keyword
|
---|
135 | <tt>reference</tt> which specifies the reference wave function
|
---|
136 | (an object of type PsiSCF). All classes for correlated Psi wave functions
|
---|
137 | will require such an object.
|
---|
138 |
|
---|
139 | Here are a few examples of PsiWavefunctions:
|
---|
140 | <pre>
|
---|
141 | \%
|
---|
142 | \% ROHF DZ on F atom
|
---|
143 | \%
|
---|
144 | mole<PsiHSOSHF>: (
|
---|
145 | docc = [ 2 0 0 0 0 1 1 0 ] socc = [ 0 0 0 0 0 0 0 1]
|
---|
146 | memory = 10000000
|
---|
147 |
|
---|
148 | \% Psi Environment data
|
---|
149 | psienv<PsiExEnv>: (
|
---|
150 | cwd = ./
|
---|
151 | fileprefix = f.dz.test
|
---|
152 | stdout = f.dz.test.stdout
|
---|
153 | stderr = f.dz.test.stderr
|
---|
154 | nscratch = 1
|
---|
155 | scratch = [ "/scratch/mpqc/" ]
|
---|
156 | )
|
---|
157 |
|
---|
158 | \% MolecularEnergy input
|
---|
159 | molecule<Molecule>: (
|
---|
160 | {atoms geometry} = {
|
---|
161 | F [ 0.0 0.0 0.0 ]
|
---|
162 | }
|
---|
163 | )
|
---|
164 |
|
---|
165 | \% Basis input
|
---|
166 | basis<GaussianBasisSet>: (
|
---|
167 | molecule = $..:molecule
|
---|
168 | name = "DZ (Dunning)"
|
---|
169 | )
|
---|
170 |
|
---|
171 | )
|
---|
172 | </pre>
|
---|
173 | <br>
|
---|
174 |
|
---|
175 | <pre>
|
---|
176 | \%
|
---|
177 | \% RHF CCSD/cc-pVDZ on water
|
---|
178 | \%
|
---|
179 | mole<PsiCCSD>: (
|
---|
180 | frozen_docc = [1 0 0 0]
|
---|
181 | memory = 40000000
|
---|
182 |
|
---|
183 | \% Psi Environment data
|
---|
184 | psienv<PsiExEnv>: (
|
---|
185 | cwd = ./
|
---|
186 | fileprefix = h2o.ccpvdz.ccsd.test
|
---|
187 | nscratch = 1
|
---|
188 | scratch = [ "/tmp/" ]
|
---|
189 | )
|
---|
190 |
|
---|
191 | \% MolecularEnergy input
|
---|
192 | molecule<Molecule>: (
|
---|
193 | {atoms geometry} = {
|
---|
194 | H [ -1.5 0.0 -0.3 ]
|
---|
195 | H [ 1.5 0.0 -0.3 ]
|
---|
196 | O [ 0.0 0.0 1.0 ]
|
---|
197 | }
|
---|
198 | )
|
---|
199 |
|
---|
200 | \% Basis input
|
---|
201 | basis<GaussianBasisSet>: (
|
---|
202 | molecule = $..:molecule
|
---|
203 | name = "cc-pVDZ"
|
---|
204 | )
|
---|
205 |
|
---|
206 | reference<PsiCLHF>: (
|
---|
207 | psienv = $..:psienv
|
---|
208 | molecule = $..:molecule
|
---|
209 | basis = $..:basis
|
---|
210 | total_charge = 0
|
---|
211 | multiplicity = 1
|
---|
212 | )
|
---|
213 | )
|
---|
214 | </pre>
|
---|
215 | <br>
|
---|
216 |
|
---|
217 |
|
---|
218 | \section examples More examples
|
---|
219 |
|
---|
220 | This section contains some examples of complete inputs that specify an MPQC/Psi computations.
|
---|
221 |
|
---|
222 | Here's an optimization + subsequent frequency analysis on water molecule
|
---|
223 | at the RHF CCSD 6-311G** level:
|
---|
224 | <pre>
|
---|
225 | \% Emacs should use -*- KeyVal -*- mode
|
---|
226 | \% this file was automatically generated
|
---|
227 | \% label: water test series
|
---|
228 | \% molecule specification
|
---|
229 | molecule<Molecule>: (
|
---|
230 | symmetry = C2V
|
---|
231 | unit = angstrom
|
---|
232 | { atoms geometry } = {
|
---|
233 | O [ 0.000000000000 0.000000000000 0.369372944000 ]
|
---|
234 | H [ 0.783975899000 0.000000000000 -0.184686472000 ]
|
---|
235 | H [ -0.783975899000 0.000000000000 -0.184686472000 ]
|
---|
236 | }
|
---|
237 | )
|
---|
238 | \% basis set specification
|
---|
239 | basis<GaussianBasisSet>: (
|
---|
240 | name = "6-311G**"
|
---|
241 | molecule = $:molecule
|
---|
242 | )
|
---|
243 | \% Psi environment specification
|
---|
244 | psienv<PsiExEnv>: (
|
---|
245 | cwd = ./
|
---|
246 | fileprefix = mpqcpsi
|
---|
247 | stdout = mpqcpsi.stdout
|
---|
248 | stderr = mpqcpsi.stderr
|
---|
249 | nscratch = 1
|
---|
250 | scratch = [ "/scratch/evaleev/" ]
|
---|
251 | )
|
---|
252 |
|
---|
253 | mpqc: (
|
---|
254 | checkpoint = no
|
---|
255 | savestate = no
|
---|
256 | restart = no
|
---|
257 | coor<SymmMolecularCoor>: (
|
---|
258 | molecule = $:molecule
|
---|
259 | generator<IntCoorGen>: (
|
---|
260 | molecule = $:molecule
|
---|
261 | )
|
---|
262 | )
|
---|
263 | \% molecular coordinates for optimization do_energy = yes
|
---|
264 | do_gradient = no
|
---|
265 | \% method for computing the molecule's energy
|
---|
266 | mole<PsiCCSD>: (
|
---|
267 | molecule = $:molecule
|
---|
268 | basis = $:basis
|
---|
269 | coor = $..:coor
|
---|
270 | psienv = $:psienv
|
---|
271 | memory = 32000000
|
---|
272 | reference<PsiCLHF>: (
|
---|
273 | psienv = $:psienv
|
---|
274 | molecule = $:molecule
|
---|
275 | total_charge = 0
|
---|
276 | multiplicity = 1
|
---|
277 | basis = $:basis
|
---|
278 | memory = 32000000
|
---|
279 | )
|
---|
280 | hessian<FinDispMolecularHessian>: (
|
---|
281 | point_group<PointGroup>: symmetry = C2V
|
---|
282 | checkpoint = no
|
---|
283 | restart = no
|
---|
284 | )
|
---|
285 | )
|
---|
286 | optimize = yes
|
---|
287 | \% optimizer object for the molecular geometry
|
---|
288 | opt<QNewtonOpt>: (
|
---|
289 | max_iterations = 20
|
---|
290 | function = $..:mole
|
---|
291 | update<BFGSUpdate>: ()
|
---|
292 | convergence<MolEnergyConvergence>: (
|
---|
293 | cartesian = yes
|
---|
294 | energy = $..:..:mole
|
---|
295 | )
|
---|
296 | )
|
---|
297 | \% vibrational frequency input
|
---|
298 | freq<MolecularFrequencies>: (
|
---|
299 | point_group<PointGroup>: symmetry = C2V
|
---|
300 | molecule = $:molecule
|
---|
301 | )
|
---|
302 | )
|
---|
303 | </pre>
|
---|
304 | <br>
|
---|
305 |
|
---|
306 | */
|
---|