Molecular Modeling Software
リビジョン | 95e2fe7e2aa7d778483c37127b5e2e6dbc78564a (tree) |
---|---|
日時 | 2011-10-15 23:00:33 |
作者 | toshinagata1964 <toshinagata1964@a2be...> |
コミッター | toshinagata1964 |
On Windows, Molby::{Mbsf,Resource,Script}Path return slash-separated strings instead of backslash-separated strings.
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@142 a2be9bc6-48de-4e38-9406-05402d4bc13c
@@ -39,11 +39,11 @@ The methods described here are the extension of the standard "Kernel" module. Th | ||
39 | 39 | <div class="method-detail"> |
40 | 40 | <a name="molbyresourcepath"></a> |
41 | 41 | <div class="method-heading"> |
42 | -<span class="method-name">MolbyResourcePath</span> | |
42 | +<span class="method-name">MolbyResourcePath (deprecated)</span> | |
43 | 43 | </div> |
44 | 44 | <div class="method-description"> |
45 | 45 | <p> |
46 | -A String describing the full path of the directory containing <code>Scripts</code> and <code>amber11</code> resources. On Windows, it is something like <code>"C:\\Program Files\\Molby"</code>. On Mac, it is something like <code>"/Applications/Molby/Molby.app/Contents/Resources"</code>. | |
46 | +This constant is now available as <a href="MolbyModule.html#resourcepath">Molby::ResourcePath</a>. | |
47 | 47 | </p> |
48 | 48 | </div> |
49 | 49 | </div> |
@@ -0,0 +1,97 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<!DOCTYPE html | |
3 | + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
5 | + | |
6 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
7 | +<head> | |
8 | +<title>Module: Molby</title> | |
9 | +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
10 | +<meta http-equiv="Content-Script-Type" content="text/javascript" /> | |
11 | +<link rel="stylesheet" href="rdoc-style.css" type="text/css" media="screen" /> | |
12 | +</head> | |
13 | +<body> | |
14 | + | |
15 | +<div id="navi"> | |
16 | +<a href="../index.html">[Molby Document Home]</a> | |
17 | +<a href="../ruby_ref.html">[Contents]</a> | |
18 | +</div> | |
19 | + | |
20 | +<div id="classHeader"> | |
21 | +<table class="header-table"> | |
22 | +<tr> | |
23 | +<td><strong>Module:</strong></td> | |
24 | +<td class="class-name-in-header">Molby</td> | |
25 | +</tr> | |
26 | +</table> | |
27 | +</div> | |
28 | + | |
29 | +<div id="section"> | |
30 | +<h3 class="section-bar">Description</h3> | |
31 | +<p> | |
32 | +<a href="">Molby</a> is the module that bundles Molby-specific classes. Under Molby, the following classes are defined. | |
33 | +</p> | |
34 | +<ul> | |
35 | +<li><a href="AtomRef.html">AtomRef</a></li> | |
36 | +<li><a href="Dialog.html">Dialog</a></li> | |
37 | +<li><a href="DialogItem.html">DialogItem</a></li> | |
38 | +<li><a href="IntGroup.html">IntGroup</a></li> | |
39 | +<li><a href="MDArena.html">MDArena</a></li> | |
40 | +<li><a href="MolEnumerable.html">MolEnumerable</a></li> | |
41 | +<li><a href="Molecule.html">Molecule</a></li> | |
42 | +<li><a href="Parameter.html">Parameter</a></li> | |
43 | +<li><a href="ParameterRef.html">ParameterRef</a></li> | |
44 | +<li><a href="ParEnumerable.html">ParEnumerable</a></li> | |
45 | +<li><a href="Transform.html">Transform</a></li> | |
46 | +<li><a href="Vector3D.html">Vector3D</a></li> | |
47 | +<li><a href="MolbyError.html">MolbyError</a></li> | |
48 | +</ul> | |
49 | + | |
50 | +</div> | |
51 | + | |
52 | +<div id="constants"> | |
53 | +<h3 class="section-bar">Constant</h3> | |
54 | + | |
55 | +<div class="method-detail"> | |
56 | +<a name="mbsfpath"></a> | |
57 | +<div class="method-heading"> | |
58 | +<span class="method-name">MbsfPath</span> | |
59 | +</div> | |
60 | +<div class="method-description"> | |
61 | +<p> | |
62 | +A String describing the full path of the directory containing pre-defined mbsf files. It is equivalent to <code>Molby::ResourcePath + "/Scripts/Mbsf"</code>. | |
63 | +</p> | |
64 | +</div> | |
65 | +</div> | |
66 | + | |
67 | +<div class="method-detail"> | |
68 | +<a name="resourcepath"></a> | |
69 | +<div class="method-heading"> | |
70 | +<span class="method-name">ResourcePath</span> | |
71 | +</div> | |
72 | +<div class="method-description"> | |
73 | +<p> | |
74 | +A String describing the full path of the directory containing <code>Scripts</code> and <code>amber11</code> resources. On Windows, it is something like <code>"C:/Program Files/Molby"</code>. On Mac, it is something like <code>"/Applications/Molby/Molby.app/Contents/Resources"</code>. | |
75 | +</p> | |
76 | +<p> | |
77 | +Note: up to 0.5.6, this constant was defined as <a href="Kernel.html#molbyresourcepath">Kernel::MolbyResourcePath</a>. The old name is still available for backward compatibility. Also up to 0.5.6, the string on Windows contained backslashes instead of slashes. This changed in 0.5.7, to be more consistent with <a href="Molecule.html#M000209">Molecule#dir</a> or <a href="Molecule.html#M000208">Molecule#path</a>. | |
78 | +</p> | |
79 | +</div> | |
80 | +</div> | |
81 | + | |
82 | +<div class="method-detail"> | |
83 | +<a name="scriptpath"></a> | |
84 | +<div class="method-heading"> | |
85 | +<span class="method-name">ScriptPath</span> | |
86 | +</div> | |
87 | +<div class="method-description"> | |
88 | +<p> | |
89 | +A String describing the full path of the directory containing pre-defined Ruby scripts. It is equivalent to <code>Molby::ResourcePath + "/Scripts"</code>. | |
90 | +</p> | |
91 | +</div> | |
92 | +</div> | |
93 | + | |
94 | +</div> | |
95 | + | |
96 | +</body> | |
97 | +</html> | |
\ No newline at end of file |
@@ -8591,7 +8591,7 @@ Molby_startup(const char *script, const char *dir) | ||
8591 | 8591 | p = strrchr(respath, PATH_SEPARATOR); |
8592 | 8592 | if (p != NULL) |
8593 | 8593 | *p = 0; |
8594 | - val = rb_str_new2(respath); | |
8594 | + val = Ruby_NewFileStringValue(respath); | |
8595 | 8595 | rb_define_global_const("MolbyResourcePath", val); |
8596 | 8596 | free(respath); |
8597 | 8597 |
@@ -8600,10 +8600,10 @@ Molby_startup(const char *script, const char *dir) | ||
8600 | 8600 | RubyDialogInitClass(); |
8601 | 8601 | |
8602 | 8602 | rb_define_const(rb_mMolby, "ResourcePath", val); |
8603 | - val = rb_str_new2(dir); | |
8603 | + val = Ruby_NewFileStringValue(dir); | |
8604 | 8604 | rb_define_const(rb_mMolby, "ScriptPath", val); |
8605 | 8605 | asprintf(&p, "%s%c%s", dir, PATH_SEPARATOR, "mbsf"); |
8606 | - val = rb_str_new2(p); | |
8606 | + val = Ruby_NewFileStringValue(p); | |
8607 | 8607 | rb_define_const(rb_mMolby, "MbsfPath", val); |
8608 | 8608 | free(p); |
8609 | 8609 |
@@ -1172,7 +1172,7 @@ class Molecule | ||
1172 | 1172 | end |
1173 | 1173 | return unless ambertools_dialog("resp") |
1174 | 1174 | nc = get_global_settings("antechamber.nc") |
1175 | - ante_dir = MolbyResourcePath + "/amber11/bin" | |
1175 | + ante_dir = Molby::ResourcePath + "/amber11/bin" | |
1176 | 1176 | |
1177 | 1177 | # Create the temporary directory |
1178 | 1178 | dname = create_ante_log_dir((self.path ? File.basename(self.path, ".*") : self.name), "rs") |