Skip to content

Instantly share code, notes, and snippets.

View larsbratholm's full-sized avatar

Lars Andersen Bratholm larsbratholm

View GitHub Profile
@stober
stober / gp.py
Created February 16, 2013 00:17
Gaussian Process in Python
#!/usr/bin/python
"""
Author: Jeremy M. Stober
Program: GP.PY
Date: Thursday, July 17 2008
Description: Example of Gaussian Process Regression.
"""
from numpy import *
import pylab
@andersx
andersx / pbconstraint.py
Created December 4, 2013 09:33
Constraint optimization in Python with Open Babel
import openbabel as ob
# Standard openbabel molecule load
conv = ob.OBConversion()
conv.SetInAndOutFormats('xyz','xyz')
mol = obOBMol()
conv.ReadFile(mol,'my_mol.xyz')
# Define constraints
constraints = ob.OBFFConstraints()
@SamKChang
SamKChang / parallelize.py
Last active June 23, 2016 13:03
python parallel wrapper
#!/usr/bin/env python
# python parallel wrapper for simply defined functions
# it returns a list of output corresponding to each input entry
import multiprocessing as mp
import operator
from compiler.ast import flatten
import numpy as np
import sys, os
import copy_reg
@andersx
andersx / gist:78ca03544aa60b7f537f486812dd4f8a
Created January 26, 2017 11:47
NMR + NBO calculation in G09
Entering Gaussian System, Link 0=/home/andersx/opt/g09/g09
Input=test.com
Output=test.log
Initial command:
/home/andersx/opt/g09/l1.exe "/home/andersx/scr/g09_dd8b31fe-e3b8-11e6-8ccf-c75eea5d46d6/Gau-11929.inp" -scrdir="/home/andersx/scr/g09_dd8b31fe-e3b8-11e6-8ccf-c75eea5d46d6/"
Entering Link 1 = /home/andersx/opt/g09/l1.exe PID= 11938.
Copyright (c) 1988,1990,1992,1993,1995,1998,2003,2009,2013,
Gaussian, Inc. All Rights Reserved.