OSDN Git Service

On Windows, Molby::{Mbsf,Resource,Script}Path return slash-separated strings instead...
authortoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Sat, 15 Oct 2011 14:00:33 +0000 (14:00 +0000)
committertoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Sat, 15 Oct 2011 14:00:33 +0000 (14:00 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@142 a2be9bc6-48de-4e38-9406-05402d4bc13c

Documents/src/molby_rb/Kernel.html
Documents/src/molby_rb/MolbyModule.html [new file with mode: 0644]
MolLib/Ruby_bind/ruby_bind.c
Scripts/md.rb

index 9034dc9..6ad9257 100644 (file)
@@ -39,11 +39,11 @@ The methods described here are the extension of the standard "Kernel" module. Th
 <div class="method-detail">
 <a name="molbyresourcepath"></a>
 <div class="method-heading">
-<span class="method-name">MolbyResourcePath</span>
+<span class="method-name">MolbyResourcePath (deprecated)</span>
 </div>
 <div class="method-description">
 <p>
-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>.
+This constant is now available as <a href="MolbyModule.html#resourcepath">Molby::ResourcePath</a>.
 </p>
 </div>
 </div>
diff --git a/Documents/src/molby_rb/MolbyModule.html b/Documents/src/molby_rb/MolbyModule.html
new file mode 100644 (file)
index 0000000..a9669d1
--- /dev/null
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<title>Module: Molby</title>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<meta http-equiv="Content-Script-Type" content="text/javascript" />
+<link rel="stylesheet" href="rdoc-style.css" type="text/css" media="screen" />
+</head>
+<body>
+
+<div id="navi">
+<a href="../index.html">[Molby Document Home]</a>
+<a href="../ruby_ref.html">[Contents]</a>
+</div>
+
+<div id="classHeader">
+<table class="header-table">
+<tr>
+<td><strong>Module:</strong></td>
+<td class="class-name-in-header">Molby</td>
+</tr>
+</table>
+</div>
+
+<div id="section">
+<h3 class="section-bar">Description</h3>
+<p>
+<a href="">Molby</a> is the module that bundles Molby-specific classes. Under Molby, the following classes are defined.
+</p>
+<ul>
+<li><a href="AtomRef.html">AtomRef</a></li>
+<li><a href="Dialog.html">Dialog</a></li>
+<li><a href="DialogItem.html">DialogItem</a></li>
+<li><a href="IntGroup.html">IntGroup</a></li>
+<li><a href="MDArena.html">MDArena</a></li>
+<li><a href="MolEnumerable.html">MolEnumerable</a></li>
+<li><a href="Molecule.html">Molecule</a></li>
+<li><a href="Parameter.html">Parameter</a></li>
+<li><a href="ParameterRef.html">ParameterRef</a></li>
+<li><a href="ParEnumerable.html">ParEnumerable</a></li>
+<li><a href="Transform.html">Transform</a></li>
+<li><a href="Vector3D.html">Vector3D</a></li>
+<li><a href="MolbyError.html">MolbyError</a></li>
+</ul>
+
+</div>
+
+<div id="constants">
+<h3 class="section-bar">Constant</h3>
+
+<div class="method-detail">
+<a name="mbsfpath"></a>
+<div class="method-heading">
+<span class="method-name">MbsfPath</span>
+</div>
+<div class="method-description">
+<p>
+A String describing the full path of the directory containing pre-defined mbsf files. It is equivalent to <code>Molby::ResourcePath + "/Scripts/Mbsf"</code>.
+</p>
+</div>
+</div>
+
+<div class="method-detail">
+<a name="resourcepath"></a>
+<div class="method-heading">
+<span class="method-name">ResourcePath</span>
+</div>
+<div class="method-description">
+<p>
+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>.
+</p>
+<p>
+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>.
+</p>
+</div>
+</div>
+
+<div class="method-detail">
+<a name="scriptpath"></a>
+<div class="method-heading">
+<span class="method-name">ScriptPath</span>
+</div>
+<div class="method-description">
+<p>
+A String describing the full path of the directory containing pre-defined Ruby scripts. It is equivalent to <code>Molby::ResourcePath + "/Scripts"</code>.
+</p>
+</div>
+</div>
+
+</div>
+
+</body>
+</html>
\ No newline at end of file
index 7e34960..d1043e8 100644 (file)
@@ -8591,7 +8591,7 @@ Molby_startup(const char *script, const char *dir)
                p = strrchr(respath, PATH_SEPARATOR);
        if (p != NULL)
                *p = 0;
-       val = rb_str_new2(respath);
+       val = Ruby_NewFileStringValue(respath);
        rb_define_global_const("MolbyResourcePath", val);
        free(respath);
 
@@ -8600,10 +8600,10 @@ Molby_startup(const char *script, const char *dir)
        RubyDialogInitClass();
 
        rb_define_const(rb_mMolby, "ResourcePath", val);
-       val = rb_str_new2(dir);
+       val = Ruby_NewFileStringValue(dir);
        rb_define_const(rb_mMolby, "ScriptPath", val);
        asprintf(&p, "%s%c%s", dir, PATH_SEPARATOR, "mbsf");
-       val = rb_str_new2(p);
+       val = Ruby_NewFileStringValue(p);
        rb_define_const(rb_mMolby, "MbsfPath", val);    
        free(p);
        
index e16a15b..ec980de 100755 (executable)
@@ -1172,7 +1172,7 @@ class Molecule
        end
        return unless ambertools_dialog("resp")
        nc = get_global_settings("antechamber.nc")
-       ante_dir = MolbyResourcePath + "/amber11/bin"
+       ante_dir = Molby::ResourcePath + "/amber11/bin"
 
        #  Create the temporary directory
        dname = create_ante_log_dir((self.path ? File.basename(self.path, ".*") : self.name), "rs")