if natoms == 0
new_unit = true
- # raise MolbyError, "cannot load crd; the molecule is empty"
else
new_unit = false
end
- save_undo_enabled = self.undo_enabled?
- self.undo_enabled = false
+# save_undo_enabled = self.undo_enabled?
+# self.undo_enabled = false
self.update_enabled = false
+ show_progress_panel("Loading GAMESS log file...")
begin
fp = open(filename, "rb")
if nframes > 0
end
end
ensure
- self.undo_enabled = save_undo_enabled
+# self.undo_enabled = save_undo_enabled
+ hide_progress_panel
self.update_enabled = true
end
+ if nframes > 0
+ select_frame(nframes - 1)
+ end
(n > 0 ? true : false)
end
def loadxyz(filename)
- save_undo_enabled = self.undo_enabled?
- self.undo_enabled = false
+# save_undo_enabled = self.undo_enabled?
+# self.undo_enabled = false
fp = open(filename, "rb")
n = 0
coords = []
# end
# }
# }
- self.undo_enabled = save_undo_enabled
+# self.undo_enabled = save_undo_enabled
(n > 0 ? true : false)
end
else
new_unit = false
end
- save_undo_enabled = undo_enabled?
- self.undo_enabled = false
+# save_undo_enabled = undo_enabled?
+# self.undo_enabled = false
fp = open(filename, "rb")
if nframes > 0
create_frame
n = 0
nf = 0
use_input_orientation = false
+ show_progress_panel("Loading Gaussian out file...")
while 1
line = fp.gets
if line == nil
nf += 1
end
end
- self.undo_enabled = save_undo_enabled
+ hide_progress_panel
+# self.undo_enabled = save_undo_enabled
(n > 0 ? true : false)
end
def loadcom(filename)
- save_undo_enabled = self.undo_enabled?
- self.undo_enabled = false
+# save_undo_enabled = self.undo_enabled?
+# self.undo_enabled = false
self.remove(All)
fp = open(filename, "rb")
section = 0
end
end
fp.close
- self.undo_enabled = save_undo_enabled
+# self.undo_enabled = save_undo_enabled
return true
end
def loadinp(filename)
- save_undo_enabled = self.undo_enabled?
- self.undo_enabled = false
+# save_undo_enabled = self.undo_enabled?
+# self.undo_enabled = false
self.remove(All)
fp = open(filename, "rb")
section = 0
end
fp.close
guess_bonds
- self.undo_enabled = save_undo_enabled
+# self.undo_enabled = save_undo_enabled
return true
end
if (dialog->ShowModal() == wxID_OK) {
char *p = strdup((const char *)(dialog->GetPath().mb_str(wxConvFile)));
MoleculeLock(mol);
- MolActionCallback_setUndoRegistrationEnabled(mol, 0);
+// MolActionCallback_setUndoRegistrationEnabled(mol, 0);
MolActionCreateAndPerform(mol, SCRIPT_ACTION("s"), "molload", p);
- MolActionCallback_setUndoRegistrationEnabled(mol, 1);
+// MolActionCallback_setUndoRegistrationEnabled(mol, 1);
MoleculeUnlock(mol);
free(p);
}
Molby_showError(status);
return;
}
-
+ fix_dosish_path(ante_dir);
+ fix_dosish_path(log_dir);
+
/* Prepare the log directory */
- wxString dirname(log_dir, wxConvUTF8);
+ wxString dirname(log_dir, wxConvFile);
if (!wxFileName::Mkdir(dirname, 0777, wxPATH_MKDIR_FULL)) {
MyAppCallback_errorMessageBox("Cannot create log directory '%s'", log_dir);
return;
snprintf(buf, sizeof buf, "-nc %d -c bcc", net_charge);
} else buf[0] = 0;
- asprintf(&p, "%s/antechamber -i mol.pdb -fi pdb -o mol.ac -fo ac %s", ante_dir, buf);
+ asprintf(&p, "\"%s/antechamber\" -i mol.pdb -fi pdb -o mol.ac -fo ac %s", ante_dir, buf);
status = MyAppCallback_callSubProcess(p, "antechamber");
if (status == 0) {
- asprintf(&p, "%s/parmchk -i mol.ac -f ac -o frcmod", ante_dir);
+ asprintf(&p, "\"%s/parmchk\" -i mol.ac -f ac -o frcmod", ante_dir);
status = MyAppCallback_callSubProcess(p, "parmchk");
}
}
}
}
+ wxFileName::SetCwd(cwd);
+
/* Erase log files */
bool success = true;
wxString dir2;
((MoleculeView *)GetFirstView())->GetListCtrl()->Update();
MyAppCallback_messageBox("Antechamber succeeded.", "Success", 0, 0);
}
-
- wxFileName::SetCwd(cwd);
}
void