File: input.py

package info (click to toggle)
psi4 1%3A1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 229,808 kB
  • sloc: cpp: 416,201; python: 207,680; perl: 4,328; makefile: 384; sh: 158; csh: 6
file content (32 lines) | stat: -rw-r--r-- 710 bytes parent folder | download | duplicates (12)
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
#! PsiAPI scanning a potential energy curve

import psi4
import numpy as np

psi4.set_output_file("output.dat", False)

mol_string = """
He
He 1 **R**
"""

mols = [(d, mol_string.replace("**R**", "%5.3f" % d)) for d in np.linspace(2, 5, 4)] 
psi4.set_options({"SCF_TYPE": "DF",
                  "BASIS": "6-31G"})


out = {}
for d, mol in mols:
    geom = psi4.geometry(mol)
    out[d] = psi4.energy('SCF', molecule=geom)


bench_dict = {2.0: -5.70825982153,
              3.0: -5.71036140727,
              4.0: -5.71036306964,
              5.0: -5.71036203769}

for key in bench_dict.keys():
    val = out[key]
    bench = bench_dict[key]
    psi4.compare_values(val, bench, 6, 'SCF Energy @%5.3fR' % key)