OSDN Git Service

GAMESS log containing F and G type orbitals can now be imported. (MO calculation...
authortoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Mon, 21 Jan 2013 08:36:19 +0000 (08:36 +0000)
committertoshinagata1964 <toshinagata1964@a2be9bc6-48de-4e38-9406-05402d4bc13c>
Mon, 21 Jan 2013 08:36:19 +0000 (08:36 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@350 a2be9bc6-48de-4e38-9406-05402d4bc13c

Documents/src/doc_source.html
MolLib/Molecule.c
MolLib/Molecule.h
README
Scripts/gamess.rb
Scripts/loadsave.rb
wxSources/MyVersion.c
xcode-build/English.lproj/InfoPlist.strings

index f42056f..680461f 100644 (file)
@@ -203,7 +203,7 @@ Molbyフォルダの中にアンインストーラがあります。「スター
 Molby is a copyrighted product of Toshi Nagata.
 </p>
 <p>
-Copyright (C) 2008-2012 Toshi Nagata <!-- copyright -->
+Copyright (C) 2008-2013 Toshi Nagata <!-- copyright -->
 </p>
 <p>
 Molby includes the following softwares, which are copyrighted products as described below:
@@ -235,7 +235,7 @@ Molby is distributed under the GNU General Public License (version 2).
 Molby: An Interactive Molecular Modeling Software with Integrated Ruby Interpreter
 </p>
 <p>
-Copyright (C) 2008-2012 Toshi Nagata <!-- copyright -->
+Copyright (C) 2008-2013 Toshi Nagata <!-- copyright -->
 </p>
 <p>
 This program is free software; you can redistribute it and/or modify
@@ -258,7 +258,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 Molby の著作権は永田 央が保持しています。
 </p>
 <p>
-Copyright (C) 2008-2012 Toshi Nagata <!-- copyright -->
+Copyright (C) 2008-2013 Toshi Nagata <!-- copyright -->
 </p>
 <p>
 Molby は以下のソフトウェアを含んでいます。それぞれの著作権表示は下の通りです。
@@ -290,7 +290,7 @@ Molby は <a href="../etc/gpl.txt">GNU General Public License (GNU 一般公衆
 Molby: 対話型分子モデルソフトウェア(Ruby インタプリタ内蔵)
 </p>
 <p>
-Copyright (C) 2008-2012 Toshi Nagata <!-- copyright -->
+Copyright (C) 2008-2013 Toshi Nagata <!-- copyright -->
 </p>
 <p>
 このプログラムはフリーソフトウェアです。あなたはこれを、フリーソフトウェア財団によって発行された GNU 一般公衆利用許諾契約書(バージョン2か、希望によってはそれ以降のバージョンのうちどれか)の定める条件の下で再頒布または改変することができます。
index 5594f95..3b02d83 100755 (executable)
@@ -2341,9 +2341,10 @@ MoleculeAddGaussianOrbitalShell(Molecule *mol, Int sym, Int nprims, Int a_idx)
                case -1: shellp->sym = kGTOType_SP; shellp->ncomp = 4; break;
                case 2:  shellp->sym = kGTOType_D;  shellp->ncomp = 6; break;
                case -2: shellp->sym = kGTOType_D5; shellp->ncomp = 5; break;
-                       /*  TODO: Support F/F7 type orbitals  */
-                       /*      case 3: sp->sym = kGTOtype_F;  sp->ncomp = 10; break;
-                        case -3: sp->sym = kGTOType_F7; sp->ncomp = 7; break; */
+               case 3:  shellp->sym = kGTOType_F;  shellp->ncomp = 10; break;
+               case -3: shellp->sym = kGTOType_F7; shellp->ncomp = 7; break;
+               case 4:  shellp->sym = kGTOType_G;  shellp->ncomp = 15; break;
+               case -4: shellp->sym = kGTOType_G9; shellp->ncomp = 9; break;
                default:
                        return -3;  /* Unsupported shell type  */
        }
@@ -2583,6 +2584,7 @@ sSetupGaussianCoefficients(BasisSet *bset)
                                        dp[3] = d * 1.425410941;
                                        dp += 5;
                                        break;
+                               /*  TODO: Support F/F7 and G/G9 type orbitals  */
                        }
                }
        }
@@ -2801,9 +2803,10 @@ MoleculeLoadGaussianFchkFile(Molecule *mp, const char *fname, char **errbuf)
                                        case -1: sp->sym = kGTOType_SP; sp->ncomp = 4; break;
                                        case 2:  sp->sym = kGTOType_D;  sp->ncomp = 6; break;
                                        case -2: sp->sym = kGTOType_D5; sp->ncomp = 5; break;
-                                               /*  TODO: Support F/F7 type orbitals  */
-                                               /*      case 3: sp->sym = kGTOtype_F;  sp->ncomp = 10; break;
-                                                case -3: sp->sym = kGTOType_F7; sp->ncomp = 7; break; */
+                                       case 3:  sp->sym = kGTOType_F;  sp->ncomp = 10; break;
+                                       case -3: sp->sym = kGTOType_F7; sp->ncomp = 7; break;
+                                       case 4:  sp->sym = kGTOType_G;  sp->ncomp = 15; break;
+                                       case -4: sp->sym = kGTOType_G9; sp->ncomp = 9; break;
                                        default:
                                                s_append_asprintf(errbuf, "Line %d: unsupported shell type %d", lineNumber, iary[i]);
                                                retval = 2;
@@ -10541,6 +10544,7 @@ sCalcMOPoint(const BasisSet *bset, Int index, const Vector *vp, Double *tmp)
                                val += d0 + d1p + d1n + d2p + d2n;
                                break;
                        }
+                       /*  TODO: Support F/F7 and G/G9 type orbitals  */
                }
        }
        return val;
index 6d024d2..7c8e442 100755 (executable)
@@ -196,8 +196,10 @@ enum {
        kGTOType_P,
        kGTOType_D,
        kGTOType_D5,
-       kGTOtype_F,
+       kGTOType_F,
        kGTOType_F7,
+       kGTOType_G,
+       kGTOType_G9,
        kGTOType_UU
 };
 
diff --git a/README b/README
index 2e976c6..b6d2dcb 100644 (file)
--- a/README
+++ b/README
@@ -29,7 +29,7 @@ Molby runs on Mac OS X (10.4 and later) and Microsoft Windows (XP and later). Ex
 
 Molby is a copyrighted product of Toshi Nagata.
 
-       Copyright (C) 2008-2012 Toshi Nagata
+       Copyright (C) 2008-2013 Toshi Nagata
 
 Molby includes (more technically: is statically linked to) the following softwares, which are copyrighted products as described below:
 
index aede574..6f6c32e 100755 (executable)
@@ -232,6 +232,10 @@ class Molecule
     File.open(fname, "wb") { |fp|
          fp.print "!  GAMESS input\n"
          fp.print "!  Generated by Molby at #{now}\n"
+         fp.print "!  Basis set: " + $gamess_basis_desc[bssname] + "\n"
+         if use_2nd
+           fp.print "!  [" + element2.join(", ") + "]: " + $gamess_basis_desc[bssname2] + "\n"
+         end
          controls = reorder_array(hash.keys.select { |k| hash[k].is_a?(Hash) },
                ["CONTRL", "SCF", "STATPT", "SYSTEM", "GUESS", "BASIS", "ZMAT", "ELPOT", "PDC"])
          controls.each { |k|
index 24ce6f7..fcdca14 100755 (executable)
@@ -244,6 +244,10 @@ class Molecule
                                                  sym = -1; n = 4
                                                when "D"
                                                  sym = 2; n = 6
+                                               when "F"
+                                                 sym = 3; n = 10
+                                               when "G"
+                                                 sym = 4; n = 15
                                                else
                                                  raise MolbyError, "Unknown gaussian shell type at line #{fp.lineno}"
                                                end
@@ -300,8 +304,12 @@ class Molecule
                                        mo = mo_labels.map { [] }    #  array of *independent* empty arrays
                                        while (line = fp.gets) != nil
                                                break unless line =~ /^\s*\d/
-                                               line[14..-1].split.each_with_index { |s, i|
-                                                       mo[i].push(Float(s))
+                                               5.times { |i|
+                                                 s = line[15 + 11 * i, 11].chomp
+                                                 break if s =~ /^\s*$/
+                                                 mo[i].push(Float(s)) rescue print "line = #{line}, s = #{s}"
+                                               # line[15..-1].split.each_with_index { |s, i|
+                                               #       mo[i].push(Float(s))
                                                }
                                        end
                                        mo.each_with_index { |m, i|
index 3fc022e..9b09891 100644 (file)
@@ -3,7 +3,7 @@
  *  Molby
  *
  *  Created by Toshi Nagata on 09/10/16.
- *  Copyright 2008-2012 Toshi Nagata. All rights reserved.
+ *  Copyright 2008-2013 Toshi Nagata. All rights reserved.
  *
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
  */
 
 const char *gVersionString = "v0.6.4";
-const char *gCopyrightString = "Copyright (c) 2008-2012 Toshi Nagata";
+const char *gCopyrightString = "Copyright (c) 2008-2013 Toshi Nagata";
 /*  The following are now defined in build/buildInfo.c, generated by record_build_date.sh  */
 /*int gRevisionNumber = 0;
 char *gLastBuildString = (char *)0; */
index 7947b69..14deb15 100755 (executable)
Binary files a/xcode-build/English.lproj/InfoPlist.strings and b/xcode-build/English.lproj/InfoPlist.strings differ