mathjax-yard 0.1.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.yardopts +1 -1
- data/Rakefile +1 -0
- data/doc/MathJaxYard.html +141 -0
- data/doc/MathJaxYard/Command.html +1017 -0
- data/doc/_index.html +149 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.Home.html +86 -0
- data/doc/file.README.html +144 -0
- data/doc/file.README_ja.html +162 -0
- data/doc/file.atom.html +211 -0
- data/doc/file.potential2.html +196 -0
- data/doc/file_list.html +72 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +144 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +129 -0
- data/doc/top-level-namespace.html +158 -0
- data/lib/mathjax-yard.rb +48 -61
- data/lib/mathjax-yard/script.rb +20 -0
- data/lib/mathjax-yard/version.rb +1 -1
- data/mathjax-yard.gemspec +3 -1
- data/mathjax.yml +3 -3
- data/mathjax.yml.bk +28 -0
- metadata +40 -7
- data/docs/README_ja.md +0 -77
- data/docs/atom.md +0 -121
- data/docs/potential2.md +0 -103
data/doc/file.Home.html
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<script type="text/x-mathjax-config">
|
6
|
+
MathJax.Hub.Config({
|
7
|
+
tex2jax:{
|
8
|
+
inlineMath: [ ['$','$'], ["\(","\)"] ],
|
9
|
+
displayMath: [ ['$$','$$'], ["\[","\]"] ]
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<script type="text/javascript"
|
14
|
+
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
15
|
+
</script>
|
16
|
+
<meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE7" />
|
17
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
18
|
+
<title>
|
19
|
+
File: Home
|
20
|
+
|
21
|
+
— Documentation by YARD 0.8.7.6
|
22
|
+
|
23
|
+
</title>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
26
|
+
|
27
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
28
|
+
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
hasFrames = window.top.frames.main ? true : false;
|
31
|
+
relpath = '';
|
32
|
+
framesUrl = "frames.html#!file.Home.html";
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
39
|
+
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id="header">
|
44
|
+
<div id="menu">
|
45
|
+
|
46
|
+
<a href="_index.html">Index</a> »
|
47
|
+
<span class="title">File: Home</span>
|
48
|
+
|
49
|
+
|
50
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="search">
|
54
|
+
|
55
|
+
<a class="full_list_link" id="class_list_link"
|
56
|
+
href="class_list.html">
|
57
|
+
Class List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
<a class="full_list_link" id="method_list_link"
|
61
|
+
href="method_list.html">
|
62
|
+
Method List
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<a class="full_list_link" id="file_list_link"
|
66
|
+
href="file_list.html">
|
67
|
+
File List
|
68
|
+
</a>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<iframe id="search_frame"></iframe>
|
75
|
+
|
76
|
+
<div id="content"><div id='filecontents'><p>Welcome to the mathjax-yard wiki!</p>
|
77
|
+
</div></div>
|
78
|
+
|
79
|
+
<div id="footer">
|
80
|
+
Generated on Thu Jun 23 14:03:52 2016 by
|
81
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
82
|
+
0.8.7.6 (ruby-2.2.2).
|
83
|
+
</div>
|
84
|
+
|
85
|
+
</body>
|
86
|
+
</html>
|
@@ -0,0 +1,144 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<script type="text/x-mathjax-config">
|
6
|
+
MathJax.Hub.Config({
|
7
|
+
tex2jax:{
|
8
|
+
inlineMath: [ ['$','$'], ["\(","\)"] ],
|
9
|
+
displayMath: [ ['$$','$$'], ["\[","\]"] ]
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<script type="text/javascript"
|
14
|
+
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
15
|
+
</script>
|
16
|
+
<meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE7" />
|
17
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
18
|
+
<title>
|
19
|
+
File: README
|
20
|
+
|
21
|
+
— Documentation by YARD 0.8.7.6
|
22
|
+
|
23
|
+
</title>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
26
|
+
|
27
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
28
|
+
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
hasFrames = window.top.frames.main ? true : false;
|
31
|
+
relpath = '';
|
32
|
+
framesUrl = "frames.html#!file.README.html";
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
39
|
+
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id="header">
|
44
|
+
<div id="menu">
|
45
|
+
|
46
|
+
<a href="_index.html">Index</a> »
|
47
|
+
<span class="title">File: README</span>
|
48
|
+
|
49
|
+
|
50
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="search">
|
54
|
+
|
55
|
+
<a class="full_list_link" id="class_list_link"
|
56
|
+
href="class_list.html">
|
57
|
+
Class List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
<a class="full_list_link" id="method_list_link"
|
61
|
+
href="method_list.html">
|
62
|
+
Method List
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<a class="full_list_link" id="file_list_link"
|
66
|
+
href="file_list.html">
|
67
|
+
File List
|
68
|
+
</a>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<iframe id="search_frame"></iframe>
|
75
|
+
|
76
|
+
<div id="content"><div id='filecontents'><h1>MathJaxYard</h1>
|
77
|
+
|
78
|
+
<p>mathjax-yard is a mathjax extension for markdown in yard.</p>
|
79
|
+
|
80
|
+
<h2>Installation</h2>
|
81
|
+
|
82
|
+
<p>Add this line to your application's Gemfile:</p>
|
83
|
+
|
84
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span>
|
85
|
+
</code></pre>
|
86
|
+
|
87
|
+
<p>And then execute:</p>
|
88
|
+
|
89
|
+
<pre class="code ruby"><code class="ruby">$ bundle
|
90
|
+
</code></pre>
|
91
|
+
|
92
|
+
<p>Or install it yourself as:</p>
|
93
|
+
|
94
|
+
<pre class="code ruby"><code class="ruby">$ gem install mathjax-yard
|
95
|
+
</code></pre>
|
96
|
+
|
97
|
+
<h2>Usage</h2>
|
98
|
+
|
99
|
+
<p>mathjax-yard is intended to be a command line tool, using in Rakefile as follows.</p>
|
100
|
+
|
101
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents by yard</span><span class='tstring_end'>"</span></span>
|
102
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:yard</span> <span class='kw'>do</span>
|
103
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
104
|
+
<span class='const'>YARD</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>YardocTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
105
|
+
<span class='kw'>end</span>
|
106
|
+
|
107
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents with yardmath</span><span class='tstring_end'>"</span></span>
|
108
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:mathjax</span> <span class='kw'>do</span>
|
109
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard --post</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
110
|
+
<span class='kw'>end</span>
|
111
|
+
</code></pre>
|
112
|
+
|
113
|
+
<p>mathjax-yard search ./<em>/</em>.md and replace '$...$' or '$$...$$' to $MATHJAX*<em>$ tags, and make 'mathjax.yml' for storing these relations. After the normal YARD operation has done, 'mathjax-yard --post' replacement will be done on 'doc/file.</em>.html'. The yard options are</p>
|
114
|
+
|
115
|
+
<pre class="code ruby"><code class="ruby">-t mathjax -p templates
|
116
|
+
-
|
117
|
+
spec/*.md
|
118
|
+
</code></pre>
|
119
|
+
|
120
|
+
<p>The mathjax layout should be included in yard layout.</p>
|
121
|
+
|
122
|
+
<h2>Development</h2>
|
123
|
+
|
124
|
+
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake spec</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment. Run <code>bundle exec mathjax-yard</code> to use the gem in this directory, ignoring other installed copies of this gem.</p>
|
125
|
+
|
126
|
+
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
127
|
+
|
128
|
+
<h2>Contributing</h2>
|
129
|
+
|
130
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/%5BUSERNAME%5D/mathjax-yard">https://github.com/[USERNAME]/mathjax-yard</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
131
|
+
|
132
|
+
<h2>License</h2>
|
133
|
+
|
134
|
+
<p>The gem is available as open source under the terms of the <a href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
|
135
|
+
</div></div>
|
136
|
+
|
137
|
+
<div id="footer">
|
138
|
+
Generated on Thu Jun 23 14:03:52 2016 by
|
139
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
140
|
+
0.8.7.6 (ruby-2.2.2).
|
141
|
+
</div>
|
142
|
+
|
143
|
+
</body>
|
144
|
+
</html>
|
@@ -0,0 +1,162 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<script type="text/x-mathjax-config">
|
6
|
+
MathJax.Hub.Config({
|
7
|
+
tex2jax:{
|
8
|
+
inlineMath: [ ['$','$'], ["\(","\)"] ],
|
9
|
+
displayMath: [ ['$$','$$'], ["\[","\]"] ]
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<script type="text/javascript"
|
14
|
+
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
15
|
+
</script>
|
16
|
+
<meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE7" />
|
17
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
18
|
+
<title>
|
19
|
+
File: README_ja
|
20
|
+
|
21
|
+
— Documentation by YARD 0.8.7.6
|
22
|
+
|
23
|
+
</title>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
26
|
+
|
27
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
28
|
+
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
hasFrames = window.top.frames.main ? true : false;
|
31
|
+
relpath = '';
|
32
|
+
framesUrl = "frames.html#!file.README_ja.html";
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
39
|
+
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id="header">
|
44
|
+
<div id="menu">
|
45
|
+
|
46
|
+
<a href="_index.html">Index</a> »
|
47
|
+
<span class="title">File: README_ja</span>
|
48
|
+
|
49
|
+
|
50
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="search">
|
54
|
+
|
55
|
+
<a class="full_list_link" id="class_list_link"
|
56
|
+
href="class_list.html">
|
57
|
+
Class List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
<a class="full_list_link" id="method_list_link"
|
61
|
+
href="method_list.html">
|
62
|
+
Method List
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<a class="full_list_link" id="file_list_link"
|
66
|
+
href="file_list.html">
|
67
|
+
File List
|
68
|
+
</a>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<iframe id="search_frame"></iframe>
|
75
|
+
|
76
|
+
<div id="content"><div id='filecontents'><h1>MathJaxYard</h1>
|
77
|
+
|
78
|
+
<p>mathjax-yardはyardによるmarkdown変換においてmathjaxを使えるようにする拡張機能です.</p>
|
79
|
+
|
80
|
+
<h2>Installation</h2>
|
81
|
+
|
82
|
+
<p>Add this line to your application's Gemfile:</p>
|
83
|
+
|
84
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_gem'>gem</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span>
|
85
|
+
</code></pre>
|
86
|
+
|
87
|
+
<p>And then execute:</p>
|
88
|
+
|
89
|
+
<pre class="code ruby"><code class="ruby">$ bundle
|
90
|
+
</code></pre>
|
91
|
+
|
92
|
+
<p>Or install it yourself as:</p>
|
93
|
+
|
94
|
+
<pre class="code ruby"><code class="ruby">$ gem install mathjax-yard
|
95
|
+
</code></pre>
|
96
|
+
|
97
|
+
<h2>Usage</h2>
|
98
|
+
|
99
|
+
<p>mathjax-yardはcommand line toolとしての使用を意図して作られています.例えば,Rakefileでの使用例は次の通りです.</p>
|
100
|
+
|
101
|
+
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents by yard</span><span class='tstring_end'>"</span></span>
|
102
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:yard</span> <span class='kw'>do</span>
|
103
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
104
|
+
<span class='const'>YARD</span><span class='op'>::</span><span class='const'>Rake</span><span class='op'>::</span><span class='const'>YardocTask</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
105
|
+
<span class='kw'>end</span>
|
106
|
+
|
107
|
+
<span class='id identifier rubyid_desc'>desc</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>make documents with yardmath</span><span class='tstring_end'>"</span></span>
|
108
|
+
<span class='id identifier rubyid_task'>task</span> <span class='symbol'>:mathjax</span> <span class='kw'>do</span>
|
109
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>mathjax-yard --post</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
110
|
+
<span class='kw'>end</span>
|
111
|
+
</code></pre>
|
112
|
+
|
113
|
+
<p>yardのデフォルトでの動作をなぞって,動作するように作られています.</p>
|
114
|
+
|
115
|
+
<ul>
|
116
|
+
<li>mathjax-yardは./<em>/</em>.mdを探索し,それらの中に'\$\$'あるいは'\$\$..\$\$'があると\$MATHJAX20\$などというタグに付け替え,</li>
|
117
|
+
<li><em>.md.backとしたファイルに元ファイルのバックアップを取り,</em>.mdにタグ付け替えした内容を保存します.
|
118
|
+
*また,同時に, 'mathjax.yml'にそれらのhash関係をyaml形式で保存します.</li>
|
119
|
+
<li>通常のrake yardで変換したのち,</li>
|
120
|
+
<li>'mathjax-yard --post'によって,'doc/file.*.html'に残されたtagを元に戻します.</li>
|
121
|
+
<li>また同時に,backファイルを元に戻します.</li>
|
122
|
+
</ul>
|
123
|
+
|
124
|
+
<p>yardのoptionは,.yardoptsに</p>
|
125
|
+
|
126
|
+
<pre class="code ruby"><code class="ruby">-t mathjax -p templates
|
127
|
+
-
|
128
|
+
spec/*.md
|
129
|
+
</code></pre>
|
130
|
+
|
131
|
+
<p>としています.また,htmlのhead部分にmathjaxのscriptを埋め込んだlayoutを用意しています.</p>
|
132
|
+
|
133
|
+
<pre class="code csh"><code class="csh">bob% bundle exec exe/mathjax-yard --help
|
134
|
+
Usage: yardmath [options] [DIRECTORY]
|
135
|
+
-v, --version show program Version.
|
136
|
+
-r, --revert revert mjx file to orig file.
|
137
|
+
-p, --post post operation.
|
138
|
+
</code></pre>
|
139
|
+
|
140
|
+
<h2>Development</h2>
|
141
|
+
|
142
|
+
<p>After checking out the repo, run <code>bin/setup</code> to install dependencies. Then, run <code>rake spec</code> to run the tests. You can also run <code>bin/console</code> for an interactive prompt that will allow you to experiment. Run <code>bundle exec mathjax-yard</code> to use the gem in this directory, ignoring other installed copies of this gem.</p>
|
143
|
+
|
144
|
+
<p>To install this gem onto your local machine, run <code>bundle exec rake install</code>. To release a new version, update the version number in <code>version.rb</code>, and then run <code>bundle exec rake release</code>, which will create a git tag for the version, push git commits and tags, and push the <code>.gem</code> file to <a href="https://rubygems.org">rubygems.org</a>.</p>
|
145
|
+
|
146
|
+
<h2>Contributing</h2>
|
147
|
+
|
148
|
+
<p>Bug reports and pull requests are welcome on GitHub at <a href="https://github.com/%5BUSERNAME%5D/mathjax-yard">https://github.com/[USERNAME]/mathjax-yard</a>. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the <a href="http://contributor-covenant.org">Contributor Covenant</a> code of conduct.</p>
|
149
|
+
|
150
|
+
<h2>License</h2>
|
151
|
+
|
152
|
+
<p>The gem is available as open source under the terms of the <a href="http://opensource.org/licenses/MIT">MIT License</a>.</p>
|
153
|
+
</div></div>
|
154
|
+
|
155
|
+
<div id="footer">
|
156
|
+
Generated on Thu Jun 23 14:03:52 2016 by
|
157
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
158
|
+
0.8.7.6 (ruby-2.2.2).
|
159
|
+
</div>
|
160
|
+
|
161
|
+
</body>
|
162
|
+
</html>
|
data/doc/file.atom.html
ADDED
@@ -0,0 +1,211 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
+
<head>
|
5
|
+
<script type="text/x-mathjax-config">
|
6
|
+
MathJax.Hub.Config({
|
7
|
+
tex2jax:{
|
8
|
+
inlineMath: [ ['$','$'], ["\(","\)"] ],
|
9
|
+
displayMath: [ ['$$','$$'], ["\[","\]"] ]
|
10
|
+
}
|
11
|
+
});
|
12
|
+
</script>
|
13
|
+
<script type="text/javascript"
|
14
|
+
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML">
|
15
|
+
</script>
|
16
|
+
<meta http-equiv="X-UA-Compatible" CONTENT="IE=EmulateIE7" />
|
17
|
+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
18
|
+
<title>
|
19
|
+
File: atom
|
20
|
+
|
21
|
+
— Documentation by YARD 0.8.7.6
|
22
|
+
|
23
|
+
</title>
|
24
|
+
|
25
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
26
|
+
|
27
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
28
|
+
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
hasFrames = window.top.frames.main ? true : false;
|
31
|
+
relpath = '';
|
32
|
+
framesUrl = "frames.html#!file.atom.html";
|
33
|
+
</script>
|
34
|
+
|
35
|
+
|
36
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
37
|
+
|
38
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
39
|
+
|
40
|
+
|
41
|
+
</head>
|
42
|
+
<body>
|
43
|
+
<div id="header">
|
44
|
+
<div id="menu">
|
45
|
+
|
46
|
+
<a href="_index.html">Index</a> »
|
47
|
+
<span class="title">File: atom</span>
|
48
|
+
|
49
|
+
|
50
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
51
|
+
</div>
|
52
|
+
|
53
|
+
<div id="search">
|
54
|
+
|
55
|
+
<a class="full_list_link" id="class_list_link"
|
56
|
+
href="class_list.html">
|
57
|
+
Class List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
<a class="full_list_link" id="method_list_link"
|
61
|
+
href="method_list.html">
|
62
|
+
Method List
|
63
|
+
</a>
|
64
|
+
|
65
|
+
<a class="full_list_link" id="file_list_link"
|
66
|
+
href="file_list.html">
|
67
|
+
File List
|
68
|
+
</a>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="clear"></div>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<iframe id="search_frame"></iframe>
|
75
|
+
|
76
|
+
<div id="content"><div id='filecontents'><h1>概要</h1>
|
77
|
+
|
78
|
+
<h1>EAM</h1>
|
79
|
+
|
80
|
+
<p>EAM(Embedded atom method)は1980年代以降に,盛んに使われるようになった経験的原子間ポテンシャルである.</p>
|
81
|
+
|
82
|
+
<h2>エネルギー表記</h2>
|
83
|
+
|
84
|
+
<p>EAMは原子$i$のエネルギーを</p>
|
85
|
+
|
86
|
+
<p>$$E_i = \sum_j\phi \left( r_j \right) + f(\rho)
|
87
|
+
$$
|
88
|
+
と表記する.右辺第1項は単なる2体間の相互作用を表わす.
|
89
|
+
右辺第2項が多体項と呼ばれるEAMに特徴的な項である.
|
90
|
+
この工夫によって原子空孔を初め多くの金属物性を
|
91
|
+
うまく表現することが可能となった.詳しくは西谷・赤本参照.</p>
|
92
|
+
|
93
|
+
<p>さて,$r_j$はこの場合原子$j$との距離を意味しており,$E_i$は原子$i$の周りの原子との和によって求まる.多体項は,一般的に</p>
|
94
|
+
|
95
|
+
<p>$$f(\rho) =\sqrt{\rho}=\sqrt{\sum_j h^2 \left( r_j \right) }
|
96
|
+
$$
|
97
|
+
によって求められる.$\rho$は強結合(tight binding)理論の2次モーメント近似と捉えると,電子密度を表わすとされている.</p>
|
98
|
+
|
99
|
+
<h2>具体例</h2>
|
100
|
+
|
101
|
+
<h3>for phi(r0)=-3.39, Ev=0.8, p=3.0 at r0=2.8577</h3>
|
102
|
+
|
103
|
+
<pre class="code maple"><code class="maple">
|
104
|
+
A0,B0,P,POQ,Q:=69.1378255, 12.47431958,
|
105
|
+
2.148157653, 2.893854749, 0.7423170267;
|
106
|
+
|
107
|
+
-3.39*32;
|
108
|
+
-108.48
|
109
|
+
</code></pre>
|
110
|
+
|
111
|
+
<pre class="code ruby"><code class="ruby">n:=12;
|
112
|
+
ene:=r->n*A0*exp(-P*r);
|
113
|
+
h:=r->B0*exp(-Q*r);
|
114
|
+
rho:=r->12*h(r)^2;
|
115
|
+
plot(ene(r)-sqrt(rho(r)),r=2..4);
|
116
|
+
</code></pre>
|
117
|
+
|
118
|
+
<p><img src="eam_ev_plot.gif" alt=""></p>
|
119
|
+
|
120
|
+
<pre class="code ruby"><code class="ruby">r0:=fsolve(diff(ene(r)-sqrt(rho(r)),r),r=3);
|
121
|
+
2.857701344
|
122
|
+
evalf(subs(r=r0,ene(r)-sqrt(rho(r))));
|
123
|
+
-3.390000002
|
124
|
+
</code></pre>
|
125
|
+
|
126
|
+
<pre class="code math"><code class="math">E_i = \sum _ j\phi \left( r_{{j}} \right) + \h \left( r_{{j}} \right)
|
127
|
+
</code></pre>
|
128
|
+
|
129
|
+
<h1>LJ</h1>
|
130
|
+
|
131
|
+
<p>LJ(Lennard-Jones)はもっとも簡単な2体のポテンシャル.</p>
|
132
|
+
|
133
|
+
<h2>エネルギー表記</h2>
|
134
|
+
|
135
|
+
<h2>具体例</h2>
|
136
|
+
|
137
|
+
<pre class="code maple"><code class="maple">A0:=1.587401051*0.7071067812/2.857701314;
|
138
|
+
E0:=-1*4.0/12.0;
|
139
|
+
|
140
|
+
A:=18.19007708;
|
141
|
+
B:=89.22765864;
|
142
|
+
phi:=r-> 12*(-A*(1/r**3)+B*(1/r**5));
|
143
|
+
r0:=fsolve(diff(phi(r),r),r=3);
|
144
|
+
2.859281101
|
145
|
+
phi(r0);
|
146
|
+
-3.735125644
|
147
|
+
</code></pre>
|
148
|
+
|
149
|
+
<p><img src="lj_ev_plot.gif" alt=""></p>
|
150
|
+
|
151
|
+
<h1>EAM fitting</h1>
|
152
|
+
|
153
|
+
<p>EAM potentialの種々の構築手法を詳解する.</p>
|
154
|
+
|
155
|
+
<h2>background</h2>
|
156
|
+
|
157
|
+
<p>MCにおいて$NPT$一定の計算がうまくいっていない.</p>
|
158
|
+
|
159
|
+
<ul>
|
160
|
+
<li>覚埜式の$E-V$プロットをすると小体積でのエネルギの上がりが低い.</li>
|
161
|
+
<li>$T=0.1$[eV]で融けているよう
|
162
|
+
なので,もう少し精密にEAMポテンシャルを構築してみる.</li>
|
163
|
+
</ul>
|
164
|
+
|
165
|
+
<h2>poq fixed</h2>
|
166
|
+
|
167
|
+
<p>EAM potentialにおいて単原子空孔の生成エネルギ$E_v$は</p>
|
168
|
+
|
169
|
+
<p>$$E_v = -\frac{E_c}{2} \frac{2-poq}{1-poq}
|
170
|
+
$$
|
171
|
+
の関係がある.したがって,</p>
|
172
|
+
|
173
|
+
<pre class="code maple"><code class="maple">Ev:=0.8;
|
174
|
+
Ec:=3.39;
|
175
|
+
eq1:=Ev=Ec/2*(2-poq)/(1-poq);
|
176
|
+
solve(eq1,poq);
|
177
|
+
2.893854749
|
178
|
+
</code></pre>
|
179
|
+
|
180
|
+
<p>さらにこの値を使ってポテンシャルのパラメータを求めるのは以下の通り.ここで,$q$を設定している.</p>
|
181
|
+
|
182
|
+
<pre class="code ruby"><code class="ruby">phi:=r->12.0*A*exp(-p*r)-sqrt(12.0*(B*exp(-q*r))^2);
|
183
|
+
poq:=2.893854749;
|
184
|
+
q:=3.00*0.2474390089;
|
185
|
+
a0:=8.0828/2;
|
186
|
+
r0:=evalf(a0*sqrt(2)/2.0); #2.857701345
|
187
|
+
eq1:=phi(r0)=-3.39;
|
188
|
+
s2:=solve(eq1,A);
|
189
|
+
p:=poq*q; #2.148157653
|
190
|
+
eq2:=subs(r=r0,diff(phi(r),r));
|
191
|
+
#plot(subs(A=s2,eq2),B=0..20);
|
192
|
+
b0:=fsolve(subs(A=s2,eq2),B=10);
|
193
|
+
a0:=subs(B=b0,s2);
|
194
|
+
phi0:=unapply(subs({A=a0,B=b0},phi(r)),r);
|
195
|
+
plot(phi0(r),r=2..5);
|
196
|
+
phi0(r0);
|
197
|
+
a0,b0,p,poq,q;
|
198
|
+
#69.1378255, 12.47431958, 2.148157653, 2.893854749, 0.7423170267
|
199
|
+
</code></pre>
|
200
|
+
|
201
|
+
<p><img src="eam_ev.png" alt=""></p>
|
202
|
+
</div></div>
|
203
|
+
|
204
|
+
<div id="footer">
|
205
|
+
Generated on Thu Jun 23 14:03:52 2016 by
|
206
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
207
|
+
0.8.7.6 (ruby-2.2.2).
|
208
|
+
</div>
|
209
|
+
|
210
|
+
</body>
|
211
|
+
</html>
|