Skip to content

Instantly share code, notes, and snippets.

View hnishi's full-sized avatar
🏠
Working from home

hnishi hnishi

🏠
Working from home
View GitHub Profile
print "pymol_view.py v1.2.0"
#try:
from pymol.cmd import *
#except:
import glob
fff = glob.glob('*.pdb')
print fff
func = lambda a:a.split('.')[0]
fff = map(func,fff)
print fff
@hnishi
hnishi / np_std.py
Created March 9, 2016 09:15
calculate standard deviation
import numpy as np
data = np.loadtxt("list")
len(data)
import sys
import os
#os.system("head zzz")
data2 = []
for i,j in enumerate(data):
#print i[4]
#print j
@hnishi
hnishi / out_pmf.dat
Last active March 11, 2016 02:59
gnuplot plot_out_pmd.plt
-15.000 -15.000 5
-14.600 -15.000 5
-14.200 -15.000 5
-13.800 -15.000 5
-13.400 -15.000 5
-13.000 -15.000 5
-12.600 -15.000 5
-12.200 -15.000 5
-11.800 -15.000 5
-11.400 -15.000 5
#set terminal png
#set terminal pngcairo font "Arial,12"
set terminal pngcairo font "Times-Roman,12"
set xrange[0:1500]
#set yrange[0:5]
set xlabel "Time (ps)"
set ylabel "RMSD (\305)"
#!/bin/bash
#python prjnishi.py \
# --i-trj coord.dat \
# --i-ave aveq.dat \
# --i-egv e1.dat \
# --o-pcc c1.dat
for i in {1..3}
do
# prjnishi.py v 1.0
# projection into PC space with a PCA eigenvector and average.
import sys
import numpy as np
from optparse import OptionParser
############ argument ##############
parser = OptionParser
def get_options():
#!/usr/bin/python2.7 -i
import sys, os
### autocompletion
import readline
import rlcompleter
readline.parse_and_bind('tab: complete')
### pymol environment
@hnishi
hnishi / argu.sh
Last active March 11, 2016 02:40
#!/bin/bash
comm=ls #コマンド
echo "ARGUMENTS:" $@ #"$@"には引数全部のリストみたいなのが入っている
echo "NUM OF ARGUMENTS:" $# #"$#"には引数の数が入っている
###引数がない場合に終了する処理
if [ 0 == $# ];then #もし引数の数が0なら終了
echo "No argument, exit"
export PS1="[\u@hn \W]\\$ "
#scripting log. to see, less -r (-R)
script -af /home/hnishi/LogArchive/$(date +%Y%m%d_%H:%M:%S)_$(whoami).log
test -r ~/.bashrc && . ~/.bashrc
#!/bin/sh
#sudo sshfs hnishi@mm00:/work1/hnishi /mnt/mm00
sudo sshfs -o allow_other -o kernel_cache -o auto_cache -o reconnect \
-o compression=no -o cache_timeout=600 -o ServerAliveInterval=15 \
hnishi@192.168.39.81:/work01/hnishi /mnt/n01
ln -s /mnt/n01 .
#sudo umount /mnt/mm00