Skip to content

Commit

Permalink
Xce dev tk 2018 06 19 (#179)
Browse files Browse the repository at this point in the history
* bug fix: dimple failed to run on csh due to DLS specific commands

* bug fix: pandda.analyse fails to run on local machine in tcsh shell

* declared v1.2.1 after csh related bug fixes
  • Loading branch information
Tobias Krojer authored Jun 20, 2018
1 parent b0377d4 commit 5f00f81
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
2 changes: 1 addition & 1 deletion gui_scripts/settings_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def set_xce_logfile(self, xce_object):

def settings(self, xce_object):
# set XCE version
xce_object.xce_version = 'v1.2'
xce_object.xce_version = 'v1.2.1'

# general settings
xce_object.allowed_unitcell_difference_percent = 12
Expand Down
2 changes: 1 addition & 1 deletion lib/XChemLog.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def create_logfile(self,version):
' # #\n'
' # Version: %s #\n' %pasteVersion+
' # #\n'
' # Date: 18/06/2018 #\n'
' # Date: 20/06/2018 #\n'
' # #\n'
' # Authors: Tobias Krojer, Structural Genomics Consortium, Oxford, UK #\n'
' # [email protected] #\n'
Expand Down
20 changes: 13 additions & 7 deletions lib/XChemPANDDA.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,15 @@ def run(self):
self.Logfile.insert(msg)
return None
else:
if os.getenv('SHELL') == '/bin/tcsh' or os.getenv('SHELL') == '/bin/csh':
source_file=os.path.join(os.getenv('XChemExplorer_DIR'),'setup-scripts','pandda.setup-csh\n')
elif os.getenv('SHELL') == '/bin/bash' or self.use_remote:
source_file='export XChemExplorer_DIR="'+os.getenv('XChemExplorer_DIR')+'"\n'
source_file+='source %s\n' %os.path.join(os.getenv('XChemExplorer_DIR'),'setup-scripts','pandda.setup-sh\n')
else:
source_file=''
# if os.getenv('SHELL') == '/bin/tcsh' or os.getenv('SHELL') == '/bin/csh':
# source_file=os.path.join(os.getenv('XChemExplorer_DIR'),'setup-scripts','pandda.setup-csh\n')
# elif os.getenv('SHELL') == '/bin/bash' or self.use_remote:
# source_file='export XChemExplorer_DIR="'+os.getenv('XChemExplorer_DIR')+'"\n'
# source_file+='source %s\n' %os.path.join(os.getenv('XChemExplorer_DIR'),'setup-scripts','pandda.setup-sh\n')
# else:
# source_file=''
# v1.2.1 - pandda.setup files should be obsolete now that pandda is part of ccp4
source_file=''

if os.path.isfile(self.filter_pdb + '.pdb'):
print('filter pdb located')
Expand Down Expand Up @@ -548,6 +550,10 @@ def append_to_ignore_string(datasets_list, append_string):
f = open('pandda.sh','w')
f.write(Cmds)
f.close()

# #>>> for testing
# self.submit_mode='local machine'

if self.submit_mode=='local machine':
self.Logfile.insert('running PANDDA on local machine')
os.system('chmod +x pandda.sh')
Expand Down
14 changes: 11 additions & 3 deletions lib/XChemThread.py
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,14 @@ def run(self):
else:
symNoAbsence = str([x[0] for x in str(mtzFile.space_group_info().symbol_and_number().split('(')[0]).split()]).replace('[','').replace(']','').replace("'","").replace(',','').replace(' ','')

dls_stuff = ''
if os.path.isdir('/dls'):
dls_stuff = (
'module unload ccp4\n'
'source /dls/science/groups/i04-1/software/pandda-update/ccp4/ccp4-7.0/bin/ccp4.setup-sh\n'
)


Cmds = (
'{0!s}\n'.format(top_line)+
'\n'
Expand All @@ -1168,9 +1176,9 @@ def run(self):
'\n'
'source $XChemExplorer_DIR/setup-scripts/xce.setup-sh\n'
'\n'
'module unload ccp4\n'
'source /dls/science/groups/i04-1/software/pandda-update/ccp4/ccp4-7.0/bin/ccp4.setup-sh\n'
+ccp4_scratch+
+ dls_stuff +
'\n'
+ ccp4_scratch +
'\n'
'$CCP4/bin/ccp4-python $XChemExplorer_DIR/helpers/update_status_flag.py %s %s %s %s\n' %(database,xtal,'DimpleStatus','running') +
'\n'
Expand Down

0 comments on commit 5f00f81

Please sign in to comment.