-
Notifications
You must be signed in to change notification settings - Fork 442
/
input.dat
57 lines (43 loc) · 1.64 KB
/
input.dat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#! RHF cc-pVDZ energy for water, automatically scanning the symmetric stretch and bending coordinates
#! using Python's built-in loop mechanisms. The geometry is apecified using a Z-matrix with variables
#! that are updated during the potential energy surface scan, and then the same procedure is performed
#! using polar coordinates, converted to Cartesian coordinates.
memory 650 mb
# Define the points on the potential energy surface using standard Python list functions
Rvals = [ 0.9, 1.0, 1.1 ]
Avals = range(102, 106, 2)
# Start with a potentital energy scan in Z-matrix coordinates
molecule h2o {
O
H 1 R
H 1 R 2 A
}
count = 0
set basis cc-pvdz
set cfour_scf_conv = 12
for R in Rvals:
h2o.R = R
for A in Avals:
h2o.A = A
thisenergy = energy('c4-scf')
count = count + 1
# And now the same thing, using Python's trigonometry functions, and Cartesian input. This time
# we want to reset the Cartesian positions every time the angles and bond lengths change, so we
# define the geometry inside the loops. N.B. this requires the basis set to be re-specified after
# every change of geometry
count = 0
for R in Rvals:
for A in Avals:
molecule h2o {
O 0.0 0.0 0.0
H 0.0 R 0.0
H 0.0 RCosA RSinA
}
# The non-numeric entries above just define placeholders with names. They still need
# to be set, which we do below.
h2o.R = R
h2o.RCosA = R * math.cos(math.radians(A))
h2o.RSinA = R * math.sin(math.radians(A))
set basis cc-pvdz
thisenergy = energy('c4-scf')
count = count + 1