This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#reproduces the "stats" or "verbose" output from LINEST in Excel or Google Sheets | |
import numpy as np | |
data = np.genfromtxt('data.csv', delimiter=',', names=True) | |
x = data['x'] | |
y = data['y'] | |
n = len(y) | |
dofreedom = n-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess,sys | |
filename = sys.argv[1] | |
input = open(filename, "r+") | |
output = open(filename+".smiles", "w+") | |
for line in input: | |
words = line.split() | |
name = words[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
pKa_ref = 11.4 | |
ref = "heliotridane" | |
filename = sys.argv[1] | |
file = open(filename, "r+") | |
energies = {} | |
log_files = {} | |
names = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
file = open("names", "r+") | |
for line in file: | |
name = line.split() | |
subprocess.call(['./name2smiles', name[0]]) | |
subprocess.call(['echo']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
smiles = "CCCC" | |
subst = ["F","Cl"] | |
l = list(smiles) | |
print l | |
s = "" | |
print l[1]+l[2]+l[3] | |
for i in range(len(subst)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /Applications/jmol-11.7.26/models/ | |
background white | |
frank off | |
hide all | |
delay 2 | |
display atomno=8; delay 2 | |
display atomno=8,atomno=4; delay 2 | |
display atomno=8,atomno=4,atomno=2; delay 1 | |
display atomno=8,atomno=4,atomno=2; delay 1 | |
display atomno=8,atomno=4,atomno=2,atomno=1; delay 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/csh | |
# Molget: cshell script to get coordinates from chemical name using Babel and Cactus | |
# usage: ./molget methane | |
# (remember to "chmod 755 molget) | |
# | |
set molecule = $argv[1] | |
curl https://cactus.nci.nih.gov/chemical/structure/$molecule/smiles -o $molecule.smi | |
babel -ismi $molecule.smi -oxyz $molecule.xyz --gen3D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
type "python readv2.py *.log" to use | |
This program finds the last heat of formation in all GAMESS log files | |
for semiempirical geometry optimizations | |
""" | |
import sys | |
for filename in sys.argv[1:]: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
type "python read.py" to use | |
This program finds the last heat of formation in all GAMESS log files | |
for semiempirical geometry optimizations | |
""" | |
import string | |
from glob import glob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""\ | |
This python program extracts coordinates and gradients from a GAMESS output | |
file and creates a .xzy+vib file. Note that the sign of the gradient is chaged to produce the force | |
To use it type (assuming opt.py and the output file is in the same directory): | |
python opt.py x xx > xxx.xyz | |
where x is the number of atoms in the molecule and xx is the name of the GAMESS output file. xxx is whatever you want to call your xyz file. |