Created
November 5, 2016 08:33
-
-
Save jhjensen2/a6237b49ea81c3d61ad0cb2858a68d40 to your computer and use it in GitHub Desktop.
List containing a SMILE string for a closed shell molecules for each element + program that converts the list to a set of sdf files
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 | |
Sodium NaCl | |
Magnesium Mg | |
Aluminum Al | |
Silicon Si | |
Phosphorus P | |
Sulfur S | |
Chlorine Cl | |
Argon Ar | |
Potassium KCl | |
Calcium ClCaCl | |
Scandium Cl[Sc](Cl)Cl | |
Titanium Cl[Ti](Cl)(Cl)Cl | |
Zinc ClZnCl | |
Gallium Ga | |
Germanium Ge | |
Arsenic As | |
Selenium Se | |
Bromine Br | |
Krypton Kr | |
Rubidium [Rb]Cl | |
Strontium Cl[Sr]Cl | |
Yttrium Cl[Y](Cl)Cl | |
Zirconium Cl[Zr](Cl)(Cl)Cl | |
Palladium Pd | |
Cadmium Cl[Cd]Cl | |
Indium [In] | |
Tin [Sn] | |
Antimony [Sb] | |
Tellurium [Te] | |
Iodine I | |
Xenon Xe | |
Cesium [Cs]Cl | |
Barium Cl[Ba]Cl | |
Lanthanum Cl[La](Cl)Cl | |
Hafnium Cl[Hf](Cl)(Cl)Cl | |
Mercury Cl[Hg] | |
Thallium Tl | |
Lead [Pb] | |
Bismuth [Bi] | |
Polonium [Po] | |
Astatine [At] | |
Radon [Rn] |
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] | |
file = open(filename, "r+") | |
for line in file: | |
words = line.split() | |
name = words[0] | |
smiles = words[1] | |
smiles = smiles.replace("#","%23") | |
smiles = smiles.replace("[","%5B") | |
smiles = smiles.replace("]","%5D") | |
sdffile = name+".sdf" | |
url="https://cactus.nci.nih.gov/chemical/structure/"+smiles+"/sdf" | |
subprocess.call(['curl',url, '-o',sdffile]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment