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
/*
USAGE: ./09cent 03_V2.log str2 str3
str2: RESIDUE NUMBER ( "105" "114" etc )
str3: COEFFICIENT OF SIGMA ( "2" "0" etc )
Especially "0" is selected as a coefficient, then all data of group are putout
INPUT: ./pdbtmp/...
OUTPUT: ./result/...
*/
#include<stdio.h>
#include<string.h>
#!/bin/sh
cmake /home/jykang/hnishi/gromacs-4.6.6 \
-DGMX_BUILD_OWN_FFTW=on \
-DCMAKE_INSTALL_PREFIX=/home/jykang/hnishi/programs/gromacs-4.6.6_serial \
-DGMX_DOUBLE=ON \
-DBUILD_SHARED_LIBS=off \
-DCMAKE_C_COMPILER=/opt/intel/composer_xe_2011_sp1.6.233/bin/intel64/icc \
-DCMAKE_CXX_COMPILER=/opt/intel/composer_xe_2011_sp1.6.233/bin/intel64/icc \
-DGMX_FFT_LIBRARY=mkl \
function ncalc(){
command echo "$1" | bc -l | sed -e 's/^\./0\./' -e 's/-\./-0\./'
}
# source ncalc.bash or copy into ~/.bashrc
# and you can use ncalc command
# ncalc 60*2/3
@hnishi
hnishi / do_trjconv.sh
Created May 2, 2016 14:01
formatted pdb trajectory
trjconv_mpi_d -f npt.trr -s ../00_add_cl/form3.pdb -o traj_out.pdb
title = main_MD
define = -DPOSRES_MG ; position restraint
integrator = md ; md: leap-frog
tinit = 0.0 ;
dt = 0.002 ; ps
nsteps = 10000000 ; maximum step (ps), -1 means no limit
comm-mode = Linear ; com, Linear: translation, Angular: trans. and rotation, None
nstcomm = 5 ;frequency for com motion removal
ls |grep -v trr|xargs -I{} cp -r {} ../51_norest/
set terminal png
#set terminal postscript eps color enhanced
#set terminal pdf # not work
set nokey
set xlabel "Potential energy (kcal/mol)"
set ylabel "ln(P)"
set yrange [-20:0]
#set xrange [110:130]
#set term pngcairo transparent
#set output "trjpc.png"
set term svg enhanced font "Arial, 12" # in svg, 100=1inch
set output "output.svg"
set encoding iso_8859_1
#set title "Free energy landscape"
#set nokey
set grid
import sys
import numpy as np
f = open('whole.fort.12', 'r')
rgas = 8.31451/4.184/1000
energy = []
lnnE = []
# 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():