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
#!/usr/bin/env python | |
import sys, os | |
from openbabel import openbabel as ob | |
from openbabel import pybel | |
# syntax: | |
# molml.py [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
auto graph = m_molecule->graph(); | |
for (Index i = 0; i < m_molecule->atomCount(); ++i) | |
{ | |
// print the symbol for the atom | |
Core::Atom atom = m_molecule->atom(i); | |
std::string atomType = Core::Elements::symbol(atom.atomicNumber()); | |
std::cout << "Atom " << atomType << " (" << i << ")" << std::endl; | |
// check neighbors |
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
#!/usr/bin/env python | |
import sys | |
import json | |
import subprocess | |
# example molecule for testing | |
water = { | |
"chemicalJson": 1, | |
"atoms": { |
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
#!/usr/bin/python | |
import json | |
import socket | |
import struct | |
import glob | |
import tempfile | |
import os | |
import time |
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
element_symbols = [ | |
"Xx", "H", "He", "Li", "Be", "B", "C", "N", "O", "F", | |
"Ne", "Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", | |
"Ca", "Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", | |
"Zn", "Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", | |
"Zr", "Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", | |
"Sn", "Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", | |
"Nd", "Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", | |
"Yb", "Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", |
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
#!/usr/bin/env python | |
import sys | |
import os | |
import cclib | |
from cclib.parser import ccopen | |
from rdkit import Chem | |
try: |
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
#!/usr/bin/env python | |
from __future__ import print_function | |
import sys | |
import os | |
import math | |
import random | |
import pybel |
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
#!/usr/bin/python | |
import json | |
import socket | |
import struct | |
import glob | |
import tempfile | |
import os | |
class Connection: |
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
# Calculate nConf20 - from https://pubs.acs.org/doi/10.1021/acs.jcim.6b00565 | |
# Jerome G. P. Wicker and Richard I. Cooper J. Chem. Inf. Model. 2016 56(12) pp. 2347-2352 | |
# reformatted for Python3 by Geoffrey R. Hutchison https://hutchison.chem.pitt.edu | |
from collections import OrderedDict | |
import fileinput | |
import numpy as np | |
from rdkit import Chem |
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
#!/usr/bin/env python | |
import sys, os | |
import pybel | |
ob = pybel.ob | |
# read through multiple files on command-line | |
for argument in sys.argv[1:]: |
NewerOlder