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
# OpenDX density file written by | |
# $Id: sitemap.py 1706 2008-04-09 21:14:48Z oliver $ | |
# File format: http://opendx.sdsc.edu/docs/html/pages/usrgu068.htm#HDREDF | |
# Data are embedded in the header and tied to the grid positions. | |
# Unit of length is Angstrom. | |
# Unit of density is TIP3P-based. | |
# Data is written in C array order: In grid[x,y,z] the axis z is fastest | |
# varying, then y, then finally x, i.e. z is the innermost loop. | |
# Meta data stored with the python Grid object: | |
# totaltime = 19998.998 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# test assert vs assert_ | |
# run with | |
# python assert_test.py | |
# and | |
# python -O assert_test.py | |
# | |
# to see that assert is optimized away by -O | |
from numpy.testing import assert_ |
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
#!/bin/bash | |
# get test data from https://www.dropbox.com/sh/jp1n4zc7q5nxvzf/AABrM8iEypZE-g2gOFfOgahRa?dl=0 | |
# see https://github.com/Becksteinlab/hop/wiki/Testing#manual-tests | |
TESTDIR=analysis | |
PSF=ifabp_water.psf | |
DCD=rmsfit_ifabp_water_1.dcd | |
CUTOFF=1.3 |
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 numpy as np | |
import MDAnalysis as mda | |
u = mda.Universe("topol.tpr", "trj.xtc") | |
ca = u.select_atoms("name CA") | |
means = np.zeros((len(ca), 3)) | |
sumsq = np.zeros_like(means) | |
for k, ts in enumerate(u.trajectory): | |
sumsq += (k/(k+1.0)) * (ca.positions - means)**2 | |
means[:] = (k*means + ca.positions)/(k+1.0) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python2.7 | |
import MDAnalysis as mda | |
import MDAnalysis.analysis.hbonds | |
def select_monomers(u, nmer=4): | |
protein = u.select_atoms("protein") | |
# note: bynum is 1-based so range starts at 1 | |
monomers = [u.select_atoms("protein and bynum " + str(i1) + ":" + str(i2)) for i1 in range(1, protein.n_atoms, protein.n_atoms/nmer) for i2 in [i1+protein.n_atoms/nmer - 1]] |
OlderNewer