See http://nmr.mgh.harvard.edu/~koen/.