• R/O
  • HTTP
  • SSH
  • HTTPS

Molby: コミット

Molecular Modeling Software


コミットメタ情報

リビジョンe9ee338d3f718a77210ed254f71afc6dd2c0af62 (tree)
日時2011-07-21 17:44:49
作者toshinagata1964 <toshinagata1964@a2be...>
コミッターtoshinagata1964

ログメッセージ

Importing frcmod is improved. Import AMBER Lib (in MM/MD->Tools menu) is implemented. Ruby: Molecule#resize_to_fit is implemented. Molecule.open now accepts empty arguments for creating a new untitled document. Kernel.message_box was causing exception when :ok is given; fixed.

git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/molby/trunk@76 a2be9bc6-48de-4e38-9406-05402d4bc13c

変更サマリ

差分

--- a/Documents/src/doc_source.html
+++ b/Documents/src/doc_source.html
@@ -13,13 +13,13 @@
1313 <div class="centered" lang="en">
1414 <h1>Molby</h1>
1515 <h2>An Interactive Molecular Modeling Software<br />with Integrated Ruby Interpreter</h2>
16-<h3>Version 0.5.5 build 20110702</h3> <!-- version -->
16+<h3>Version 0.5.5 build 20110721</h3> <!-- version -->
1717 <h3>Toshi Nagata</h3>
1818 </div>
1919 <div class="centered" lang="ja">
2020 <h1>Molby</h1>
2121 <h2>対話型分子モデリングソフトウェア<br />(Ruby インタプリタ内蔵)</h2>
22-<h3>Version 0.5.5 build 20110702</h3> <!-- version -->
22+<h3>Version 0.5.5 build 20110721</h3> <!-- version -->
2323 <h3>永田 央</h3>
2424 </div>
2525 <hr />
--- a/Documents/src/molby_rb/Molecule.html
+++ b/Documents/src/molby_rb/Molecule.html
@@ -191,13 +191,13 @@ document is open, returns an empry array.
191191 <div id="method-M000190" class="method-detail">
192192 <a name="M000190"></a>
193193 <div class="method-heading">
194+<span class="method-name">new &rarr; (new) <a href="Molecule.html">Molecule</a><br />
194195 <span class="method-name">new(file, *args) &rarr; (new) <a href="Molecule.html">Molecule</a><br />
195196 </span>
196197 </div>
197198 <div class="method-description">
198199 <p>
199-Create a new molecule and call
200-<a href="Molecule.html#M000200">molload</a> method with the same arguments.
200+Create a new molecule. If any arguments are given, call <a href="Molecule.html#M000200">molload</a> method with the same arguments. The created molecule has no associated document window.
201201 </p>
202202 <p>
203203 <i>See Also:</i> <a href="#M000324">Molecule#open</a>, which opens the molecule as a document (i.e. with associated window).
@@ -208,12 +208,13 @@ Create a new molecule and call
208208 <div id="method-M000324" class="method-detail">
209209 <a name="M000324"></a>
210210 <div class="method-heading">
211+<span class="method-name">open &rarr; (new) <a href="Molecule.html">Molecule</a><br />
211212 <span class="method-name">open(file) &rarr; (new) <a href="Molecule.html">Molecule</a><br />
212213 </span>
213214 </div>
214215 <div class="method-description">
215216 <p>
216-Open a molecule from file as a document.
217+Open a molecule from file as a document. If file is not given, an untitled document is created.
217218 </p>
218219 <p>
219220 <i>See Also:</i> <a href="#M000190">Molecule#new</a>, which creates a new Molecule object but does not open as a document (i.e. no associated window is opened).
@@ -2135,6 +2136,19 @@ representing the array of residue names.
21352136 </div>
21362137 </div>
21372138
2139+<div id="method-M000216" class="method-detail">
2140+<a name="resize_to_fit"></a>
2141+<div class="method-heading">
2142+<span class="method-name">resize_to_fit &rarr; self<br />
2143+</span>
2144+</div>
2145+<div class="method-description">
2146+<p>
2147+Resize the model drawing to fit in the window.
2148+</p>
2149+</div>
2150+</div>
2151+
21382152 <div id="method-M000282" class="method-detail">
21392153 <a name="M000282"></a>
21402154 <div class="method-heading">
--- a/MolLib/Ruby_bind/ruby_bind.c
+++ b/MolLib/Ruby_bind/ruby_bind.c
@@ -120,6 +120,19 @@ Ruby_NewFileStringValue(const char *fstr)
120120 #endif
121121 }
122122
123+VALUE
124+Ruby_ObjToStringObj(VALUE val)
125+{
126+ switch (TYPE(val)) {
127+ case T_STRING:
128+ return val;
129+ case T_SYMBOL:
130+ return rb_str_new2(rb_id2name(SYM2ID(val)));
131+ default:
132+ return rb_str_to_str(val);
133+ }
134+}
135+
123136 #pragma mark ====== Message input/output ======
124137
125138 /*
@@ -140,7 +153,7 @@ s_Kernel_MessageBox(int argc, VALUE *argv, VALUE self)
140153 str = StringValuePtr(sval);
141154 title = StringValuePtr(tval);
142155 if (bval != Qnil) {
143- bval = rb_str_to_str(bval);
156+ bval = Ruby_ObjToStringObj(bval);
144157 s = RSTRING_PTR(bval);
145158 if (strncmp(s, "ok", 2) == 0)
146159 buttons = 1;
@@ -150,7 +163,7 @@ s_Kernel_MessageBox(int argc, VALUE *argv, VALUE self)
150163 rb_raise(rb_eMolbyError, "the button specification should be either nil, :ok or :cancel");
151164 } else buttons = 3;
152165 if (ival != Qnil) {
153- ival = rb_str_to_str(ival);
166+ ival = Ruby_ObjToStringObj(ival);
154167 s = RSTRING_PTR(ival);
155168 if (strncmp(s, "info", 4) == 0)
156169 icon = 1;
@@ -1845,8 +1858,8 @@ static VALUE s_ParameterRef_SetWeight(VALUE self, VALUE val) {
18451858 VALUE oldval;
18461859 val = rb_Float(val);
18471860 oldval = s_ParameterRef_GetWeight(self);
1848- oldsrc = up->bond.src;
18491861 up = s_UnionParFromValue(self, &tp, 1);
1862+ oldsrc = up->bond.src;
18501863 if (tp == kElementParType)
18511864 up->atom.weight = NUM2DBL(val);
18521865 else if (tp == kVdwParType)
@@ -4515,26 +4528,38 @@ s_Molecule_Inspect(VALUE self)
45154528
45164529 /*
45174530 * call-seq:
4531+ * open -> Molecule
45184532 * open(file) -> Molecule
45194533 *
4520- * Create a new molecule from file.
4534+ * Create a new molecule from file as a document. If file is not given, an untitled document is created.
45214535 */
45224536 static VALUE
4523-s_Molecule_Open(VALUE self, VALUE fname)
4537+s_Molecule_Open(int argc, VALUE *argv, VALUE self)
45244538 {
4525- const char *p = FileStringValuePtr(fname);
4539+ VALUE fname;
4540+ const char *p;
45264541 Molecule *mp;
45274542 VALUE iflag;
4543+ rb_scan_args(argc, argv, "01", &fname);
4544+ if (NIL_P(fname))
4545+ p = NULL;
4546+ else
4547+ p = FileStringValuePtr(fname);
45284548 iflag = Ruby_SetInterruptFlag(Qfalse);
45294549 mp = MoleculeCallback_openNewMolecule(p);
45304550 Ruby_SetInterruptFlag(iflag);
4531- if (mp == NULL)
4532- rb_raise(rb_eMolbyError, "Cannot open the file %s", p);
4551+ if (mp == NULL) {
4552+ if (p == NULL)
4553+ rb_raise(rb_eMolbyError, "Cannot create untitled document");
4554+ else
4555+ rb_raise(rb_eMolbyError, "Cannot open the file %s", p);
4556+ }
45334557 return ValueFromMolecule(mp);
45344558 }
45354559
45364560 /*
45374561 * call-seq:
4562+ * new -> Molecule
45384563 * new(file, *args) -> Molecule
45394564 *
45404565 * Create a new molecule and call "load" method with the same arguments.
@@ -4544,7 +4569,7 @@ s_Molecule_Initialize(int argc, VALUE *argv, VALUE self)
45444569 {
45454570 if (argc > 0)
45464571 return s_Molecule_Load(argc, argv, self);
4547- else return Qnil;
4572+ else return Qnil; /* An empty molecule (which is prepared in s_Molecule_Alloc()) is returned */
45484573 }
45494574
45504575 static VALUE
@@ -7361,6 +7386,22 @@ s_Molecule_LineMode(int argc, VALUE *argv, VALUE self)
73617386
73627387 /*
73637388 * call-seq:
7389+ * resize_to_fit
7390+ *
7391+ * Resize the model drawing to fit in the window.
7392+ */
7393+static VALUE
7394+s_Molecule_ResizeToFit(VALUE self)
7395+{
7396+ Molecule *mol;
7397+ Data_Get_Struct(self, Molecule, mol);
7398+ if (mol->mview != NULL)
7399+ MainView_resizeToFit(mol->mview);
7400+ return self;
7401+}
7402+
7403+/*
7404+ * call-seq:
73647405 * show_text(string)
73657406 *
73667407 * Show the string in the info text box.
@@ -7934,6 +7975,7 @@ Init_Molby(void)
79347975 rb_define_alias(rb_cMolecule, "show_periodic_image=", "show_periodic_image");
79357976 rb_define_method(rb_cMolecule, "line_mode", s_Molecule_LineMode, -1);
79367977 rb_define_alias(rb_cMolecule, "line_mode=", "line_mode");
7978+ rb_define_method(rb_cMolecule, "resize_to_fit", s_Molecule_ResizeToFit, 0);
79377979 rb_define_method(rb_cMolecule, "show_text", s_Molecule_ShowText, 1);
79387980 rb_define_method(rb_cMolecule, "md_arena", s_Molecule_MDArena, 0);
79397981 rb_define_method(rb_cMolecule, "set_parameter_attr", s_Molecule_SetParameterAttr, 5);
@@ -7947,7 +7989,7 @@ Init_Molby(void)
79477989
79487990 rb_define_singleton_method(rb_cMolecule, "current", s_Molecule_Current, 0);
79497991 rb_define_singleton_method(rb_cMolecule, "[]", s_Molecule_MoleculeAtIndex, -1);
7950- rb_define_singleton_method(rb_cMolecule, "open", s_Molecule_Open, 1);
7992+ rb_define_singleton_method(rb_cMolecule, "open", s_Molecule_Open, -1);
79517993 rb_define_singleton_method(rb_cMolecule, "list", s_Molecule_List, 0);
79527994 rb_define_singleton_method(rb_cMolecule, "ordered_list", s_Molecule_OrderedList, 0);
79537995
--- a/README
+++ b/README
@@ -5,7 +5,7 @@
55 An Interactive Molecular Modeling Software
66 with Integrated Ruby Interpreter
77
8- Version 0.5.5 build 20110702
8+ Version 0.5.5 build 20110721
99
1010 Toshi Nagata
1111
--- a/Scripts/md.rb
+++ b/Scripts/md.rb
@@ -513,7 +513,7 @@ class Molecule
513513 when /^BOND/
514514 state = 2
515515 next
516- when /^ANGLE/
516+ when /^ANGL/
517517 state = 3
518518 next
519519 when /^DIHE/
@@ -534,21 +534,21 @@ class Molecule
534534 name, weight = s.split
535535 wtable[name] = Float(weight)
536536 when 2
537- types, k, r0, com = s.split(/ +/, 4)
537+ types, k, r0, com = s.split(" ", 4)
538538 pp = par.bonds.lookup(types, :local, :missing) || par.bonds.insert
539539 pp.atom_types = types
540540 pp.k = k
541541 pp.r0 = r0
542542 pp.comment = com
543543 when 3
544- types, k, a0, com = s.split(/ +/, 4)
544+ types, k, a0, com = s.split(" ", 4)
545545 pp = par.angles.lookup(types, :local, :missing) || par.angles.insert
546546 pp.atom_types = types
547547 pp.k = k
548548 pp.a0 = a0
549549 pp.comment = com
550550 when 4
551- types, n, k, phi0, period, com = s.split(/ +/, 6)
551+ types, n, k, phi0, period, com = s.split(" ", 6)
552552 pp = par.dihedrals.lookup(types, :local, :missing) || par.dihedrals.insert
553553 pp.atom_types = types
554554 pp.mult = 1
@@ -557,7 +557,7 @@ class Molecule
557557 pp.period = Float(period).round
558558 pp.comment = com
559559 when 5
560- types, k, phi0, period, com = s.split(/ +/, 5)
560+ types, k, phi0, period, com = s.split(" ", 5)
561561 pp = par.impropers.lookup(types, :local, :missing) || par.impropers.insert
562562 pp.atom_types = types
563563 pp.mult = 1
@@ -566,7 +566,7 @@ class Molecule
566566 pp.period = Float(period).round
567567 pp.comment = com
568568 when 6
569- name, r_eq, eps, com = s.split(/ +/, 4)
569+ name, r_eq, eps, com = s.split(" ", 4)
570570 pp = par.vdws.lookup(name, :local, :missing) || par.vdws.insert
571571 pp.atom_type = name
572572 pp.r_eq = r_eq
@@ -583,6 +583,126 @@ class Molecule
583583 }
584584 end
585585
586+ def Molecule.import_amberlib(file)
587+ fp = File.open(file, "r")
588+ raise MolbyError, "Cannot open file #{file}" if fp == nil
589+ mols = Hash.new
590+ while line = fp.gets
591+ if line =~ /^!!index/
592+ while line = fp.gets
593+ break if line =~ /^!/
594+ units = line.scan(/"([^\"]*)"/).flatten
595+ end
596+ elsif line =~ /^!entry\.(\w+)\.unit\.(\w+)\s/
597+ unit = $1
598+ cmd = $2
599+ mol = (mols[unit] ||= Molecule.new)
600+ if cmd == "atoms"
601+ while line = fp.gets
602+ break if line =~ /^!/
603+ line.chomp!
604+ en = line.split
605+ en[0].delete!("\"")
606+ en[1].delete!("\"")
607+ ap = mol.add_atom(en[0], en[1])
608+ elem = Integer(en[6])
609+ if elem > 0
610+ ap.atomic_number = elem
611+ else
612+ ap.element = en[1][0, 1].upcase
613+ end
614+ ap.charge = Float(en[7])
615+ end
616+ elsif cmd == "boundbox"
617+ values = []
618+ 5.times { values.push(Float(fp.gets)) }
619+ mol.set_cell([values[2], values[3], values[4], 90, 90, 90])
620+ line = fp.gets
621+ elsif cmd == "connectivity"
622+ while line = fp.gets
623+ break if line =~ /^!/
624+ line.chomp!
625+ con = line.split
626+ begin
627+ mol.create_bond(Integer(con[0]) - 1, Integer(con[1]) - 1)
628+ rescue
629+ puts "#{$!}: con[0] = #{con[0]}, con[1] = #{con[1]}"
630+ p "natoms = #{mol.natoms}"
631+ raise
632+ end
633+ end
634+ elsif cmd == "positions"
635+ index = 0
636+ while line = fp.gets
637+ break if line =~ /^!/
638+ line.chomp!
639+ pos = line.split
640+ mol.atoms[index].r = [Float(pos[0]), Float(pos[1]), Float(pos[2])]
641+ index += 1
642+ end
643+ elsif cmd == "residues"
644+ resseq = 0
645+ name = nil
646+ n1 = 0
647+ while line = fp.gets
648+ if line =~ /^!/
649+ values[0] = nil
650+ values[3] = mol.natoms + 1
651+ else
652+ values = line.split
653+ values[0].delete!("\"")
654+ values[3] = Integer(values[3])
655+ end
656+ if name
657+ mol.assign_residue(IntGroup[n1..values[3] - 2], sprintf("%s.%d", name, resseq))
658+ end
659+ name = values[0]
660+ n1 = values[3] - 1
661+ resseq += 1
662+ break if name == nil
663+ end
664+ else
665+ while line = fp.gets
666+ break if line =~ /^!/
667+ end
668+ end
669+ end
670+ redo if line
671+ end
672+ fp.close
673+ msg = "Imported unit(s):"
674+ mols.each { |key, val|
675+ mol = Molecule.open
676+ mol.add(val)
677+ if val.cell != nil
678+ mol.set_cell(val.cell)
679+ end
680+ if mol.natoms > 1000
681+ mol.line_mode(true)
682+ end
683+ mol.resize_to_fit
684+ msg += "\n #{key} (#{mol.name})"
685+ if mol.md_arena.prepare(true) == nil
686+ h = Dialog.run("Missing parameters") {
687+ layout(1, item(:text, :title=>"Some parameters are missing for unit \"#{key}\". Do you want to import an frcmod file?"))
688+ }
689+ if (h[:status] == 0)
690+ file = Dialog.open_panel("Select frcmod file", nil, "AMBER frcmod (*.frcmod)|*.frcmod|All Files (*.*)|*.*")
691+ if file
692+ mol.instance_eval { import_frcmod(file) }
693+ end
694+ end
695+ end
696+ }
697+ message_box(msg, "AMBER Lib Import Complete", :ok)
698+ puts msg
699+ end
700+
701+ def Molecule.cmd_import_amberlib
702+ file = Dialog.open_panel("Select AMBER lib file", nil, "AMBER lib file (*.lib)|*.lib|All Files (*.*)|*.*")
703+ import_amberlib(file)
704+ end
705+
586706 def export_ac(acfile)
587707 open(acfile, "w") { |fp|
588708 charge = 0.0
--- a/Scripts/molecule.rb
+++ b/Scripts/molecule.rb
@@ -514,6 +514,8 @@ class Molecule
514514 raise MolbyError, "the solvent box does not have three-dimensional periodicity"
515515 end
516516
517+ show_progress_panel("Adding a solvent box...")
518+
517519 # Calculate the box size
518520 b = self.bounds
519521 bsize = b[1] - b[0]
@@ -536,6 +538,7 @@ class Molecule
536538 solute_natoms = self.natoms
537539
538540 # Add solvents so that the target box is fully covered
541+ set_progress_message("Duplicating the solvent box...")
539542 rtr = sbox.cell_transform.inverse
540543 min = Vector3D[1e30, 1e30, 1e30]
541544 max = Vector3D[-1e30, -1e30, -1e30]
@@ -559,25 +562,32 @@ class Molecule
559562 xv, yv, zv, ov, flags = sbox.box
560563 # puts "xmin = #{xmin}, ymin = #{ymin}, zmin = #{zmin}"
561564 # puts "xmax = #{xmax}, ymax = #{ymax}, zmax = #{zmax}"
565+ newbox = Molecule.new
562566 (xmin..xmax).each do |x|
563567 (ymin..ymax).each do |y|
564568 (zmin..zmax).each do |z|
565- add(sbox)
566- translate(xv * x + yv * y + zv * z, IntGroup[self.natoms - sbox_natoms..self.natoms - 1])
569+ newbox.add(sbox)
570+ newbox.translate(xv * x + yv * y + zv * z, IntGroup[newbox.natoms - sbox_natoms..newbox.natoms - 1])
567571 end
568572 end
569573 end
570574
571575 # Remove out-of-bounds molecules
572- g = atom_group do |ap|
576+ set_progress_message("Removing out-of-bounds molecules...")
577+ g = newbox.atom_group do |ap|
573578 r = ap.r
574579 r.x < -bsize[0] * 0.5 || r.y < -bsize[1] * 0.5 || r.z < -bsize[2] * 0.5 || r.x > bsize[0] * 0.5 || r.y > bsize[1] * 0.5 || r.z > bsize[2] * 0.5
575580 end
576- g = fragment(g) # expand by fragment
577- remove(g)
581+ g = newbox.fragment(g) # expand by fragment
582+ newbox.remove(g)
583+
584+ # Add solvent molecules
585+ self.line_mode(true)
586+ self.add(newbox)
578587 # puts "Removed atoms by bounds: #{g}"
579588
580589 # Find conflicts
590+ set_progress_message("Removing conflicting molecules...")
581591 conf = find_conflicts(limit, IntGroup[0..solute_natoms - 1], IntGroup[solute_natoms..self.natoms - 1])
582592 g = atom_group(conf.map { |c| c[1] } ) # atom group containing conflicting atoms
583593 g = fragment(g) # expand by fragment
@@ -603,6 +613,9 @@ class Molecule
603613 # Set the unit cell information
604614 set_box(bsize[0], bsize[1], bsize[2])
605615
616+ hide_progress_panel
617+ resize_to_fit
618+
606619 return IntGroup[solute_natoms..self.natoms - 1]
607620
608621 end
--- a/Version
+++ b/Version
@@ -1,2 +1,2 @@
11 version = "0.5.5"
2-date = "20110702"
2+date = "20110721"
--- a/msw-build/molby.iss
+++ b/msw-build/molby.iss
@@ -1,6 +1,6 @@
11 [Setup]
22 AppName = Molby
3-AppVerName = Molby (v0.5.5 build 20110702)
3+AppVerName = Molby (v0.5.5 build 20110721)
44 DefaultDirName = {pf}\Molby
55 DefaultGroupName = Molby
66 UninstallDisplayIcon = {app}\Molby.exe
--- a/wxSources/MyApp.cpp
+++ b/wxSources/MyApp.cpp
@@ -81,6 +81,7 @@ BEGIN_EVENT_TABLE(MyApp, wxApp)
8181 // EVT_MENU(myMenuID_ReadParameters, MyApp::OnReadParameters)
8282 EVT_MENU(myMenuID_ViewGlobalParameters, MyApp::OnViewGlobalParameters)
8383 EVT_MENU(myMenuID_ViewParameterFilesList, MyApp::OnViewParameterFilesList)
84+ EVT_MENU(myMenuID_ImportAmberLib, MyApp::OnImportAmberLib)
8485 #if defined(__WXMAC__)
8586 EVT_ACTIVATE(MyApp::OnActivate)
8687 #endif
@@ -396,6 +397,7 @@ MyApp::CreateMenuBar(int kind, wxMenu **out_file_history_menu, wxMenu **out_edit
396397 md_tools_menu->Append(myMenuID_RunAntechamber, _T("Antechamber/parmchk..."));
397398 md_tools_menu->Append(myMenuID_RunResp, _T("GAMESS/RESP..."));
398399 md_tools_menu->Append(myMenuID_CreateSanderInput, _T("Create SANDER input..."));
400+ md_tools_menu->Append(myMenuID_ImportAmberLib, _T("Import AMBER Lib..."));
399401 md_menu->Append(myMenuID_MDTools, _T("Tools"), md_tools_menu);
400402
401403 wxMenu *qc_menu = new wxMenu;
@@ -594,6 +596,12 @@ MyApp::OnViewParameterFilesList(wxCommandEvent &event)
594596 }
595597
596598 void
599+MyApp::OnImportAmberLib(wxCommandEvent &event)
600+{
601+ MolActionCreateAndPerform(NULL, SCRIPT_ACTION(""), "cmd_import_amberlib");
602+}
603+
604+void
597605 MyApp::RegisterScriptMenu(const char *cmd, const char *title)
598606 {
599607 int i;
@@ -722,13 +730,21 @@ MyApp::OnUpdateUI(wxUpdateUIEvent& event)
722730 else if (methodType == 2) /* Class method (with molecule as an only argument) */
723731 event.Enable(true);
724732 }
725- } else if (uid == myMenuID_ExecuteScript || uid == myMenuID_OpenConsoleWindow || uid == myMenuID_ViewParameterFilesList || uid == myMenuID_ViewGlobalParameters) {
726- event.Enable(true);
727733 } else {
728- if (mview == NULL)
729- event.Enable(false);
730- else
731- event.Skip();
734+ switch (uid) {
735+ case myMenuID_ExecuteScript:
736+ case myMenuID_OpenConsoleWindow:
737+ case myMenuID_ViewParameterFilesList:
738+ case myMenuID_ViewGlobalParameters:
739+ case myMenuID_MDTools:
740+ case myMenuID_ImportAmberLib:
741+ event.Enable(true);
742+ return;
743+ default:
744+ if (mview == NULL)
745+ event.Enable(false);
746+ else event.Skip();
747+ }
732748 }
733749 }
734750
--- a/wxSources/MyApp.h
+++ b/wxSources/MyApp.h
@@ -84,6 +84,7 @@ enum {
8484 myMenuID_RunAntechamber = 152,
8585 myMenuID_RunResp = 153,
8686 myMenuID_CreateSanderInput = 154,
87+ myMenuID_ImportAmberLib = 155,
8788 myMenuID_CreateGamessInput = 160,
8889 myMenuID_CreateMOCube = 161,
8990 myMenuID_ExecuteScript = 200,
@@ -146,6 +147,8 @@ class MyApp: public wxApp
146147 void OnViewGlobalParameters(wxCommandEvent &event);
147148 void OnViewParameterFilesList(wxCommandEvent &event);
148149
150+ void OnImportAmberLib(wxCommandEvent &event);
151+
149152 void OnEndProcess(wxProcessEvent &event);
150153 int CallSubProcess(const char *cmdline, const char *procname);
151154
--- a/wxSources/MyDocument.cpp
+++ b/wxSources/MyDocument.cpp
@@ -1283,6 +1283,13 @@ MyDocument::OnUpdateUI(wxUpdateUIEvent& event)
12831283 case myMenuID_ShowPeriodicImage:
12841284 event.Enable(true);
12851285 return;
1286+ case myMenuID_RunAntechamber:
1287+ case myMenuID_RunResp:
1288+ case myMenuID_CreateSanderInput:
1289+ if (mol != NULL && mol->natoms > 0)
1290+ event.Enable(true);
1291+ else event.Enable(false);
1292+ return;
12861293 case myMenuID_CreateGamessInput:
12871294 if (mol != NULL && mol->natoms > 0)
12881295 event.Enable(true);
--- a/wxSources/MyVersion.c
+++ b/wxSources/MyVersion.c
@@ -15,5 +15,5 @@
1515 GNU General Public License for more details.
1616 */
1717
18-const char *gVersionString = "v0.5.5 build 20110702";
18+const char *gVersionString = "v0.5.5 build 20110721";
1919 const char *gCopyrightString = "Copyright (c) 2008-2011 Toshi Nagata";
--- a/xcode-build/Info.plist
+++ b/xcode-build/Info.plist
@@ -36,6 +36,6 @@
3636 <key>CFBundleSignature</key>
3737 <string>????</string>
3838 <key>CFBundleVersion</key>
39- <string>v0.5.5 build 20110702</string>
39+ <string>v0.5.5 build 20110721</string>
4040 </dict>
4141 </plist>
旧リポジトリブラウザで表示