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 | |
""" Combines multiple PDB files into one """ | |
import sys | |
import glob | |
if len(sys.argv) < 2: | |
print "model.py *.pdb > model.pdb" | |
sys.exit() |
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 numpy as np | |
def usage(): | |
print """ | |
This script calculates C-alpha RMSD between 2 PDB structures, | |
and gererates optimal superposition of the 2nd structure to the | |
1st structure. | |
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
from pymol import cmd | |
from pymol.cgo import * | |
from math import * | |
# | |
# Some functions to allow drawing arrows (vectors) in Pymol | |
# In need of proper documentation... | |
# | |
# Please don't distribute (parts of) this file, without credits | |
# |
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 subprocess as sp | |
pid = sp.Popen(['ssh', 'purdue', 'tail -f work/glycan/benchmarks/rexmd/aarex/server.log'], stdin=sp.PIPE, stdout=sp.PIPE, close_fds=True) | |
stdin, stdout = pid.stdin, pid.stdout | |
while 1: | |
print stdout.readline() |
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 argparse | |
import re | |
import sys | |
_s = re.compile('\s+') | |
def parse_psf(psffile): | |
psf = open(psffile) | |
psf.readline(); psf.readline() | |
ntitle = int(psf.readline().strip().split()[0]) |
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
# configuration for replica exchange scripts | |
# run simulation: | |
# mkdir output | |
# (cd output; mkdir 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15) | |
# mpirun -np 16 -hostfile hostfile $bindir/namd2 +replicas 16 job0.conf +stdout output/%d/job0.%d.log | |
# the number of MPI ranks (-np) must be a multiple of the number of replicas (+replicas) | |
# to continue: | |
# mpirun -np 16 -hostfile hostfile $bindir/namd2 +replicas 16 job1.conf +stdout output/%d/job1.%d.log |
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 sys | |
import numpy as np | |
debug = False | |
if len(sys.argv) > 1: debug = True | |
input = sys.stdin | |
pmf_filename = input.readline().strip() # stores pmf | |
rho_filename = input.readline().strip() # stores average density | |
bia_filename = input.readline().strip() # stores biased distribution |
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/sh | |
if [[ "${1}" == "http"* ]] ; then | |
doi="${1}" | |
else | |
doi="http://dx.doi.org/${1}" | |
fi | |
# Stopped working around 2015-10-04. | |
# curl -sLH "Accept: text/bibliography; style=bibtex" "${doi}" | sed 's/^ *//' |
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 argparse | |
from pathlib import Path | |
import re | |
import sys | |
from multiprocessing import Pool | |
from functools import partial | |
from tqdm import tqdm | |
import mdtraj as md | |
import numpy as np |
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 argparse | |
import re | |
import base64 | |
from io import BytesIO | |
import cairosvg | |
from rdkit import Chem | |
from rdkit.Chem import AllChem | |
from rdkit.Chem.Draw import rdMolDraw2D | |
from rdkit.Chem.Draw.MolDrawing import MolDrawing, DrawingOptions #Only needed if modifying defaults |
OlderNewer