Skip to content

Instantly share code, notes, and snippets.

View dgasmith's full-sized avatar

Daniel Smith dgasmith

View GitHub Profile
{
"cells": [
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"import opt_einsum\n",
"import random\n",
import psi4
import numpy as np
np.set_printoptions(precision=12, suppress=True)
mol = psi4.geometry("""
1 2
H 0.000 0.000 0.000
F 0.000 0.000 1.100
""")
{
"units": "2010CODATA",
"molecule": {
"type": "Molecule",
"file_name": "h2o.xyz",
"sort_input": "true",
"charge": "0",
"n_cluster": "2"
},
"obs": {
import time
import numpy as np
import sys
sys.path.insert(1, '../.')
from mrsapt import *
np.set_printoptions(precision=7, linewidth=200, threshold=2000, suppress=True)
# Set molecule to dimer
molecule dimer {
Be 0.000000000 0.000000000 0.000000000
import psi4
import pandas as pd
import timeit
import time
psi4.set_options({"PUREAM": True})
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)
ret = []
@dgasmith
dgasmith / extract_rks.py
Last active August 29, 2015 14:03
Script to extract the Molpro counterpoise corrected RKS energies for all outputs in the folder "Data".
#This is in the public domain.
import glob
import pandas as pd
infiles = glob.glob('Data/*.out')
def read(infile):
"""Read 'infile' into a list where each element is a line of the file"""
return open(infile, 'r').readlines()
import timeit
s="""
import numpy as np
A = [
[[2008, 5], [2009, 5], [2010, 2], [2011, 5], [2013, 17]],
[[2008, 6], [2009, 3], [2011, 1], [2013, 6]], [[2013, 9]],
[[2008, 4], [2011, 1], [2013, 4]],
[[2010, 3], [2011, 3], [2013, 1]],
[[2008, 2], [2011, 4], [2013, 1]],