Commit 0c139e81 authored by Fabrice Allain's avatar Fabrice Allain
Browse files

Create subfolders related to molecule and datas in tmp root

parent b0a339db
......@@ -86,7 +86,7 @@ runid: 1
cpus: 100
host_command: sbatch --cores-per-socket=10 -o /baycells/home/fallain/slurm.errors
host_executable: /baycells/home/bardiaux/bin/cns1.21_aria_logn_linux_x86_64_intel.exe
temp_root: data/examples/out/setup
temp_root: data/examples/out/setup/tmp
parameter_definition: automatic
ss_dist_format: tbl
ss_dist_enabled: yes
......
......@@ -843,17 +843,22 @@ class AriaEcXMLConverter(AriaXMLConverter):
return self._mol_set['output']
def write_ariaproject(self, aria_template, seqfile, dist_files, tbl_files):
def write_ariaproject(self, aria_template, seqfile, dist_files, tbl_files,
desclist=None):
"""
Generate ariaproject.xml file
:param aria_template: ariaproject.xml template path
:param seqfile:
:param dist_files:
:param tbl_files:
:param desclist: list of data descriptor for the actual run
:return:
"""
LOG.info("Loading aria template file %s", aria_template)
molecule = self.molecule.getName()
datas = desclist if desclist else ''
templatepath = os.path.abspath(aria_template)
ariaproj_template = Template(filename=templatepath,
module_directory="/tmp/mako_modules")
......@@ -877,20 +882,21 @@ class AriaEcXMLConverter(AriaXMLConverter):
aria_project_dict.update(self.settings.setup.config)
work_dir = os.path.abspath(self.settings.outdir)
temp_root = os.path.abspath(aria_project_dict['temp_root'])
temp_dir = os.path.join(os.path.abspath(aria_project_dict['temp_root']),
molecule, "_".join(datas))
if not os.path.exists(work_dir):
LOG.info("Working dir %s doesn't exist.", work_dir)
LOG.info("Create new directory %s", work_dir)
os.makedirs(work_dir)
if not os.path.exists(temp_root):
LOG.info("Temp directory %s doesn't exist.", temp_root)
LOG.info("Create new directory %s", temp_root)
os.makedirs(temp_root)
if not os.path.exists(temp_dir):
LOG.info("Temp directory %s doesn't exist.", temp_dir)
LOG.info("Create new directory %s", temp_dir)
os.makedirs(temp_dir)
aria_project_dict['working_directory'] = work_dir
aria_project_dict['temp_root'] = temp_root
aria_project_dict['temp_root'] = temp_dir
project = {'project_name': self.outprefix,
'date': datetime.date.today().isoformat(),
......
No preview for this file type
......@@ -172,7 +172,8 @@ class AriaEcSetup(object):
# ---------------------- ARIA XML project file ----------------------- #
self.converter.write_ariaproject(self.settings.template,
xmlseq_file, dist_files, tbl_files)
xmlseq_file, dist_files, tbl_files,
desclist=self.allresmap.keys())
# ------------------------------ others ------------------------------ #
self.write_optional_files()
......
No preview for this file type
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment