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 | |
#SBATCH --partition=normal | |
#SBATCH --job-name=ip_engine | |
#SBATCH --output=ip_engine.out | |
#SBATCH --time=7-00:00:00 | |
#SBATCH --time-min=02:00:00 | |
#SBATCH --qos=normal | |
#SBATCH --nodes=1 | |
#SBATCH --mem=64000 |
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
set mol [mol new {traj_fn} waitfor all] | |
mol addfile {top_fn} waitfor all | |
# Open data file | |
set sel [atomselect $mol all] | |
set nf [molinfo $mol get numframes] | |
set fp [open {dat_fn} r] | |
set line "" | |
# Each line of the data file corresponds to a frame |
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
alias ss='squeue --format="%.7i %9P %9j %9u %.13L %.13l %.16S %.2t %.5D %.5C %15R " --sort="t,-S"' | |
alias ssr='ss --states=R' | |
alias ssp='ss --states=PD' |
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
ATOM 14902 C12 MY 1 -25.136 10.163 9.358 1.00 0.00 MEMB | |
ATOM 14942 C13 MY 1 -24.372 9.630 8.213 1.00 0.00 MEMB | |
ATOM 14945 C14 MY 1 -25.074 9.701 6.922 1.00 0.00 MEMB | |
ATOM 14948 C15 MY 1 -25.460 8.518 6.468 1.00 0.00 MEMB | |
ATOM 14951 C16 MY 1 -26.583 8.386 5.816 1.00 0.00 MEMB | |
ATOM 14954 C17 MY 1 -27.221 6.099 4.694 1.00 0.00 MEMB | |
ATOM 14957 C18 MY 1 -28.077 5.983 3.677 1.00 0.00 MEMB | |
ATOM 14960 C19 MY 1 -28.644 4.770 3.859 1.00 0.00 MEMB | |
ATOM 14963 C110 MY 1 -27.454 3.698 4.032 1.00 0.00 MEMB | |
ATOM 14966 C111 MY 1 -26.798 3.485 2.647 1.00 0.00 MEMB |
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 | |
#SBATCH --partition=long # or short, defq | |
#SBATCH --job-name=whatever | |
#SBATCH --output=whatever.%j.out | |
#SBATCH --time=5-00:00:00 | |
#SBATCH --nodes=1 | |
#SBATCH --mail-type=ALL | |
#SBATCH --mail-user=email@email.com | |
#SBATCH --ntasks=12 # or however many |
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 mdtraj.formats.dcd import DCDTrajectoryFile | |
from mdtraj.formats.prmtop import load_prmtop | |
km = KMedoids(...) | |
# "centers" is a pandas DataFrame with metadata about each trajectory | |
# from which we are pulling structures | |
def get_top(struc): | |
return centers.query("structure == @struc")['top_fn'].iloc[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
from __future__ import print_function | |
import simtk.openmm as mm | |
import simtk.openmm.app as app | |
d = dict(base_dir="RUN2", | |
state='state.xml') | |
with open("{base_dir}/system.xml".format(**d)) as f: | |
system = mm.XmlSerializer.deserialize(f.read()) |
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
# Basic usage / workflow | |
ds = dataset("**/*.dcd") | |
dihed = ds.derive('dihed', fmt='dir-npy') | |
dihed += DihedralFeaturizer().fit_transform(ds) | |
tica = dihed.derive('tica', fmt='hdf5') | |
tica += tICA().fit_transform(dihed) | |
clusters = tica.derive('clusters', fmt='hdf5') |
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
ds = dataset("**/*.dcd", top='struct.pdb') | |
diheds = ds.fit_transform_with(DihedralFeaturizer(), 'diheds') | |
ticas = diheds.fit_transform_with(tICA(), 'ticas') | |
kmeans = KMeans(n_clusters=8) | |
clusters = ticas.fit_transform_with(kmeans, 'clusters') | |
msm = MSM().fit(clusters) | |
dump(msm, 'msm.pkl') |
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
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 |
OlderNewer