This file contains hidden or 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
| #pragma once | |
| #include "mvector3.hpp" | |
| #define INLINE __host__ __device__ __forceinline__ | |
| struct __builtin_align__(16) flt4{ | |
| float x,y,z,w; | |
| //constructors |
This file contains hidden or 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
| !!! .Xmodmap | |
| remove control = Control_R | |
| remove mod1 = Alt_L | |
| keycode 100 = Control_R | |
| keycode 102 = Alt_L | |
| add control = Control_L | |
| add mod1 = Alt_L |
This file contains hidden or 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
| options(digits=10) | |
| srate <- "0.090" | |
| slicelen <- 0.25 | |
| rootdir <- paste("./emb/s", srate, sep = "") | |
| vxmean <- read.table(paste(rootdir, "/vxmean.txt", sep = "") ) | |
| vxmean <- data.matrix(vxmean) | |
| z <- vxmean[,1] | |
| vx <- vxmean[,2] | |
| Lz <- length(z) * slicelen | |
| hLz <- 0.5 * Lz |
This file contains hidden or 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 | |
| import sys, datetime, math | |
| import numpy as np | |
| def ReadLinePDBform(line): | |
| ##01234567890123456789012345678901234567890123456789012345678901234567890123456789 | |
| ##ATOM 1 N DOPC 1 -5.364 -3.265 20.254 1.00 0.00 MEMB | |
| line_type = str(line[0:6].strip()) | |
| ret = [] | |
| if line_type == "ATOM" or line_type == "HETATM": |
This file contains hidden or 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/gnuplot | |
| set print 'PARA.par' | |
| region = "[3000:4600]" | |
| list = system ('ls sample*/area_elem.txt') | |
| do for [ i = 1 : words( list )] { | |
| EXPR = "f(x) = a * x + b" | |
| eval (EXPR) | |
| fitting = sprintf( "fit %s f(x) '%s' using ($1*0.005):($3-$2) via a,b", region, word( list, i )) | |
| eval ( fitting ) | |
| print word(list, i), " ", a |
This file contains hidden or 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
| #include <iostream> | |
| #include <sstream> | |
| #include <cstdlib> | |
| #include <mpi.h> | |
| int main(int argc, char* argv[]) { | |
| MPI_Init(&argc, &argv); | |
| if (argc < 2) { | |
| std::cerr << "# of arguments should be >= 2.\n"; |
This file contains hidden or 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 | |
| # -*- coding: utf-8 -*- | |
| class Hoge(object): | |
| def func(self): | |
| print "func" | |
| hoge = Hoge() | |
| hoge.__dict__ #名前空間内にfuncが見当たらない。 |
This file contains hidden or 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
| # We do not use emacs frames. | |
| set -x TERM xterm-256color | |
| alias emacs 'emacs -nw' | |
| set -x EDITOR emacs | |
| alias rm 'rm -i' | |
| # settings for gromacs | |
| set -x GMX_MAXBACKUP '-1' # We do not need backup files. | |
| set -x GMXBIN /usr/local/gromacs/bin |
This file contains hidden or 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
| #include <iostream> | |
| #include <string> | |
| #include <thrust/device_vector.h> | |
| #include <thrust/sort.h> | |
| #include <thrust/sequence.h> | |
| void print_array(const thrust::device_vector<int>& val, | |
| const std::string tag, | |
| const int size) { | |
| std::cout << tag; |
This file contains hidden or 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
| #include <iostream> | |
| #include <algorithm> | |
| #include <random> | |
| #include <numeric> | |
| constexpr int Nx = 512; | |
| typedef double Dtype; | |
| // typedef int Dtype; | |
| // typedef float Dtype; |