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
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
#reactant_smiles = "C12=CC=CC=CC1CC=C2" | |
#reactant_smiles = "N#CC1(C#N)C2C=CC=CC=C2C=C1C3=CC=CC=C3" | |
reactant_smiles = "N#CC1(C#N)C2C=CC=C(C=CC=C3)C3=C2C=C1C4=CC=CC=C4" | |
reactant = Chem.MolFromSmiles(reactant_smiles) | |
print Chem.MolToSmiles(reactant) | |
Chem.Kekulize(reactant,clearAromaticFlags=True) |
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
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
parent_smiles = 'c1ccccc1' | |
rxn_smarts_list = ['[cX3;H1:1]>>[*:1]F','[cX3;H1:1]>>[*:1]O'] | |
molecule_substitutions = {} | |
molecules = [] | |
mol = Chem.MolFromSmiles(parent_smiles) | |
molecule_substitutions[0] = [mol] | |
molecules.append(mol) |
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 | |
sys.path.append("/usr/local/lib/python2.7/site-packages/") | |
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
from rdkit.Chem import Draw | |
from rdkit.sping import PIL | |
filename = sys.argv[1] | |
file = open(filename, "r+") |
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
Hydrogen HCl | |
Helium He | |
Lithium LiCl | |
Beryllium Be | |
Boron B | |
Carbon C | |
Nitrogen N | |
Oxygen O | |
Fluorine F | |
Neon Ne |
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
#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 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 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 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 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 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)] |