- Jonathan Whitmore, PhD
- Data Scientist, SVDS
- @jbwhitmore
| from __future__ import print_function | |
| """ | |
| simulatedtempering.py: Implements simulated tempering | |
| This is part of the OpenMM molecular simulation toolkit originating from | |
| Simbios, the NIH National Center for Physics-Based Simulation of | |
| Biological Structures at Stanford, funded under the NIH Roadmap for | |
| Medical Research, grant U54 GM072970. See https://simtk.org. | 
This is just a quick list of resourses on TDA that I put together for @rickasaurus after he was asking for links to papers, books, etc on Twitter and is by no means an exhaustive list.
Both Carlsson's and Ghrist's survey papers offer a very good introduction to the subject
- Topology and Data by Gunnar Carlsson
- Barcodes: The Persistent Topology of Data by Robert Ghrist
- Extracting insights from the shape of complex data using topology A good introductory paper in Nature on the Mapperalgorithm.
| ffmpeg -i molecule.%5d.ppm -c:v libx264 -preset slow -crf 18 molecule.mkv | |
| # -i input filenames | |
| # -c:v codec (libx264 --> H.264) | |
| # -preset duh | |
| # -crf quality factor, lower = better, 18 = practically lossless | |
| # output filename | |
| # For colors, make sure you're using yuv444 which should be the default in newer ffmpeg | 
| HEADER HEADER | |
| ATOM 1 N LYS 1 38.807 20.601 18.408 1.00 .00 | |
| ATOM 2 H1 LYS 1 39.388 20.210 17.695 1.00 .00 | |
| ATOM 3 H2 LYS 1 37.905 20.169 18.376 1.00 .00 | |
| ATOM 4 H3 LYS 1 39.223 20.439 19.303 1.00 .00 | |
| ATOM 5 CA LYS 1 38.666 22.049 18.184 1.00 .00 | |
| ATOM 6 HA LYS 1 39.651 22.511 18.241 .00 .00 | |
| ATOM 7 CB LYS 1 38.086 22.288 16.784 1.00 .00 | |
| ATOM 8 HB1 LYS X 1 37.069 21.897 16.759 1.00 .00 | |
| ATOM 9 HB2 LYS 1 38.692 21.737 16.068 1.00 .00 | 
| import mdtraj as md | |
| import numpy as np | |
| n_frames = 100 | |
| coords = np.random.multivariate_normal(mean=[0, 0, 0], cov=[[2, 1, 0], [0, 1, 0], [0 ,0, 1]], size=n_frames) | |
| coords = np.reshape(coords, (n_frames, 1, 3)) | |
| with md.XTCTrajectoryFile('output.xtc', 'w') as f: | |
| f.write(coords) | 
Created by Christopher Manning




Created by Christopher Manning




| import time | |
| import random | |
| from IPython import parallel | |
| # create client & view | |
| rc = parallel.Client() | |
| dv = rc[:] | |
| # scatter 'id', so id=0,1,2 on engines 0,1,2 |