Skip to content

Commit

Permalink
Fix the GUI computation folder issues
Browse files Browse the repository at this point in the history
  • Loading branch information
KristapsE committed May 7, 2020
1 parent b8d8702 commit 0e074b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions MacroModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def SetupMacroModel(settings):
MacroModelInputs.append(f + '.mae')

#Copy default com file to directory
shutil.copyfile(scriptdir + '/default.com', cwd + '/' + f + '.com')
shutil.copyfile(settings.ScriptDir + '/default.com', cwd + '/' + f + '.com')
#Change input and output file names in com file
comf = open(f + '.com', 'r+')
com = comf.readlines()
Expand Down Expand Up @@ -100,7 +100,7 @@ def SetupMacroModel(settings):
MacroModelInputs.append(f + 'rot.mae')

#Copy default com file to directory
shutil.copyfile(scriptdir + '/default.com', cwd + '/' + f +
shutil.copyfile(settings.ScriptDir + '/default.com', cwd + '/' + f +
'rot.com')
#Change input and output file names in com file
comf = open(f + 'rot.com', 'r+')
Expand Down
1 change: 1 addition & 0 deletions PyDP4.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def main(settings):
print("Distributed under MIT license")
print("==========================\n\n")

print("Current working directory: " + os.getcwd())
print("Initial input files: " + str(settings.InputFiles))
print("NMR file: " + str(settings.NMRsource))
print("Workflow: " + str(settings.Workflow))
Expand Down
8 changes: 4 additions & 4 deletions PyDP4_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ def MMtoggle(self, state):
if (self.MM_rb.isDown() == False) & (self.Tinker_rb.isDown() == False):
self.MM_rb.toggle()


else:
self.solvent_drop.setEnabled(False)
self.Solvent_yn.setChecked(False)
Expand All @@ -839,8 +838,6 @@ def rb_toggle(self,state):
self.solvent_drop.setEnabled(False)




def Energytoggle(self, state):

if state > 0:
Expand Down Expand Up @@ -1999,8 +1996,11 @@ class PyDP4WorkerObject(QtCore.QObject):
finished = QtCore.pyqtSignal()

def runPyDP4(self):
launchdir = os.getcwd()
print('0:' + ui.table_widget.Tab1.Output_list.item(0).text())
os.chdir(ui.table_widget.Tab1.Output_list.item(0).text())
self.NMRData, self.Isomers, self.settings, self.DP4Data = PyDP4.main(ui.table_widget.Tab1.settings)

os.chdir(launchdir)
self.finished.emit()


Expand Down

0 comments on commit 0e074b4

Please sign in to comment.