Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

91 lines (70 sloc) 4.734 kb
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>eGFRD documentation</title>
<link rel="stylesheet" href="/css/reset.css" type="text/css"/>
<link rel="stylesheet" href="/css/style.css" type="text/css"/>
<link rel="stylesheet" href="/css/syntax.css" type="text/css"/>
<link rel="stylesheet" href="/css/menu.css" type="text/css"/>
<link rel="stylesheet" href="/css/footer.css" type="text/css"/>
<script src="/html5media/html5media.min.js"></script>
<!--[if lt IE 9]>
<script src="/ie7/IE9.js"></script>
<![endif]-->
</head>
<body>
<div class="documentation">
<div id="globalheader">
<!--googleoff: all-->
<ul id="globalnav">
<li id="gn-home"><a href="/">Home</a></li>
<li id="gn-algorithm"><a href="/algorithm">Algorithm</a></li>
<li id="gn-background"><a href="/background">Background</a></li>
<li id="gn-downloads"><a href="/downloads">Downloads</a></li>
<li id="gn-documentation"><a href="/documentation">Documentation</a></li>
<li id="gn-support"><a href="/support">Support</a></li>
<li class="gn-empty"><a></a></li>
</ul>
<!--googleon: all-->
<div id="lastbutton"> </div>
</div>
</div>
<h1>Documentation</h1>
<div id="container">
<p><em>More documentation coming soon.</em></p>
<h2>Overview</h2>
<ul>
<li>Installation. See the
<a href="http://github.com/gfrd/egfrd/tree/develop/INSTALL">INSTALL</a> file.</li>
<li><a href="/simulation">Running a simulation</a></li>
<li><a href="/visualization">Visualization</a></li>
</ul>
<h2>Getting started is easy</h2>
<div class="highlight"><pre><code class="python"><span class="c"># sample.py</span>
<span class="kn">from</span> <span class="nn">egfrd</span> <span class="kn">import</span> <span class="o">*</span>
<span class="n">s</span> <span class="o">=</span> <span class="n">EGFRDSimulator</span><span class="p">(</span><span class="n">worldSize</span><span class="o">=</span><span class="mf">1e-6</span><span class="p">)</span>
<span class="n">A</span> <span class="o">=</span> <span class="n">Species</span><span class="p">(</span><span class="s">&#39;A&#39;</span><span class="p">,</span> <span class="n">D</span><span class="o">=</span><span class="mf">1e-12</span><span class="p">,</span> <span class="n">radius</span><span class="o">=</span><span class="mf">2.5e-8</span><span class="p">)</span>
<span class="n">B</span> <span class="o">=</span> <span class="n">Species</span><span class="p">(</span><span class="s">&#39;B&#39;</span><span class="p">,</span> <span class="n">D</span><span class="o">=</span><span class="mf">1e-12</span><span class="p">,</span> <span class="n">radius</span><span class="o">=</span><span class="mf">2.5e-8</span><span class="p">)</span>
<span class="n">C</span> <span class="o">=</span> <span class="n">Species</span><span class="p">(</span><span class="s">&#39;C&#39;</span><span class="p">,</span> <span class="n">D</span><span class="o">=</span><span class="mf">1e-12</span><span class="p">,</span> <span class="n">radius</span><span class="o">=</span><span class="mf">2.5e-8</span><span class="p">)</span>
<span class="n">s</span><span class="o">.</span><span class="n">addReaction</span><span class="p">([</span><span class="n">A</span><span class="p">,</span> <span class="n">B</span><span class="p">],</span> <span class="p">[</span><span class="n">C</span><span class="p">],</span> <span class="n">k</span><span class="o">=</span><span class="mf">1e-18</span><span class="p">)</span>
<span class="n">s</span><span class="o">.</span><span class="n">throwInParticles</span><span class="p">(</span><span class="n">A</span><span class="p">,</span> <span class="mf">100</span><span class="p">)</span>
<span class="n">s</span><span class="o">.</span><span class="n">throwInParticles</span><span class="p">(</span><span class="n">B</span><span class="p">,</span> <span class="mf">100</span><span class="p">)</span>
<span class="k">while</span> <span class="n">s</span><span class="o">.</span><span class="n">t</span> <span class="o">&lt;</span> <span class="mf">100</span><span class="p">:</span>
<span class="n">s</span><span class="o">.</span><span class="n">step</span><span class="p">()</span>
</code></pre>
</div>
<h2>Learn more</h2>
<p>More documentation, including Green&rsquo;s functions and pseudocode for the
algorithm can be found in the <a href="http://github.com/gfrd/egfrd/tree/develop/doc" title="">doc</a> directory of
the code.</p>
</div>
<div id="globalfooter">
<p>Copyright &copy; 2010 FOM institute AMOLF</p>
<ul class="piped">
<li><a href="/about">About</a></li>
<li><a href="/credits">Credits</a></li>
</ul>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.