This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 numpy as np | |
models = 20 | |
res = 166 | |
filename = "lis" | |
file = open(filename,'r') | |
ave = [[0 for x in xrange(3)] for x in xrange(res)] | |
stdev = [[0 for x in xrange(3)] for x in xrange(res)] |
This file contains hidden or 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
#conformer search with RDKIT | |
import sys | |
sys.path.append("/usr/local/lib/python2.7/site-packages/") | |
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
m = Chem.AddHs(Chem.MolFromSmiles('CCCO')) #creates molecule from smiles and adds H's | |
AllChem.EmbedMultipleConfs(m,20) #makes 20 3D conformations | |
_=AllChem.MMFFOptimizeMoleculeConfs(m,maxIters=1000) #MMFF geometry optimization |
This file contains hidden or 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 | |
sys.path.append("/usr/local/lib/python2.7/site-packages/") | |
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
from rdkit import DataStructs | |
m = Chem.MolFromSmiles('NCCc1c[nH]cn1') | |
mp_A = Chem.MolFromSmiles('[NH3+]CCc1c[nH]cn1') | |
mp_B = Chem.MolFromSmiles('NCCc1c[nH]c[nH+]1') | |
mpp = Chem.MolFromSmiles('[NH3+]CCc1c[nH]c[nH+]1') |
This file contains hidden or 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
pm6-dh+ eps=78.4 cycles=200 charge=1 | |
C -1.80630 1 -1.29240 1 -0.04450 1 | |
C -1.07800 1 -0.22540 1 0.75060 1 | |
N -0.23770 1 0.65500 1 -0.15110 1 | |
C 0.26310 1 1.87190 1 0.58650 1 | |
C 0.85450 1 -0.04100 1 -0.93790 1 | |
C 1.87420 1 -0.73340 1 -0.05330 1 | |
H -2.50750 1 -1.82630 1 0.60510 1 |
This file contains hidden or 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
!GAMESS input file for DFTB3/SMD optimization | |
$contrl runtyp=optimize icharg=1 nprint=-5 nzvar=1 $end | |
$system mwords=20 $end | |
$zmat dlc=.t. auto=.t. $end | |
$scf npunch=0 $end | |
$statpt nstep=200 opttol=0.0005 $end | |
$pcm solvnt=water smd=.t. $end | |
$system modio=31 $end | |
$basis gbasis=dftb $end | |
$dftb ndftb=3 dampxh=.t. dampex=4.0 $end |
This file contains hidden or 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
#making a strip plot from a csv file using seaborn | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import pandas as pd | |
import csv | |
import sys | |
filename = sys.argv[1] | |
reader = csv.DictReader(open(filename)) |
This file contains hidden or 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
Hydrogen HCl | |
Helium He | |
Lithium LiCl | |
Beryllium Be | |
Boron B | |
Carbon C | |
Nitrogen N | |
Oxygen O | |
Fluorine F | |
Neon Ne |