Skip to content

Instantly share code, notes, and snippets.

# -*- coding: utf-8 -*-
import numpy
data = []
x = numpy.linspace(0.0, 10.0, 100)
data.extend([numpy.sin(x) + numpy.random.uniform(-0.5, 0.5, 100) for _ in range(5)])
data.extend([numpy.cos(x) + numpy.random.uniform(-0.5, 0.5, 100) for _ in range(5)])
numpy.random.shuffle(data)
import matplotlib.pylab as pylab

Windows 7 (64bit)上でE-Cell4のPython拡張をビルドする

準備

E-Cell4はwin32ブランチをチェックアウトして用いる. 必要なら各自Gitをインストールして使う: https://github.com/ecell/ecell4

以下がビルドに利用したもの:

diff --git a/ecell4/bd/functions3d.cpp b/ecell4/bd/functions3d.cpp
index f2a94c7..a1a4692 100644
--- a/ecell4/bd/functions3d.cpp
+++ b/ecell4/bd/functions3d.cpp
@@ -64,11 +64,11 @@ Real Igbd_r_3d(Real r, Real sigma, Real t, Real D)
const Real sigmasq(sigma * sigma);
const Real sigmacb(sigmasq * sigma);
- const Real rcb(gsl_pow_3(r));
+ const Real rcb(gsl_pow_int(r, 3));
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kaizu
kaizu / gfrd.md
Last active August 29, 2015 14:22

1、粒子の初期位置を原点として、 2、適当なシェルの半径(吸収境界条件の位置a)を決めてdrawTimeする 3、もしdrawTimeした時間と現在時刻の和がシミュレーション終了時刻より以前ならば   4、平面状での角度(0-2pi)を乱数で決定   5、シェルの半径と角度から現在位置からのdisplacementを得て、位置を更新する   6、時間をdrawTimeで得た時刻だけ進める   7、2に戻る (edited) 3、もしdrawTimeした時間と現在時刻の和がシミュレーション終了時刻よりも後ならば   4、シミュレーション終了時刻引く現在時刻で得た時間幅(drawTimeで得た時刻より手前なはず)でdrawRする   5、平面状での角度を乱数で決定

This file has been truncated, but you can view the full file.
[
{
"EcoGene": "EG11277",
"GeneID": "944742",
"name": "thrL",
"synonyms": [
"thrL",
"b0001",
"ECK0001",
"JW4367",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.