Skip to content

Commit

Permalink
added output collections
Browse files Browse the repository at this point in the history
  • Loading branch information
zargham-ahmad committed Oct 5, 2023
1 parent b41fe7c commit fcc97d6
Showing 1 changed file with 32 additions and 5 deletions.
37 changes: 32 additions & 5 deletions tools/qcxms/qcxms_neutral_run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
ln $mol molecule.xyz &&
cat qcxms.in &&
qcxms -i molecule.xyz >> $log &&
qcxms -i molecule.xyz >> $log
qcxms -i molecule.xyz >> $log &&
python3 rename.py
]]></command>

<environment_variables>
Expand All @@ -39,6 +41,27 @@
tinit ${keywords.tinit}
ieeatm ${keywords.ieeatm}]]>
</configfile>
<configfile filename="rename.py">
import os

def rename_files_with_folder_name(folder_path):
if not os.path.exists(folder_path):
print(f"The folder '{folder_path}' does not exist.")
return

for root, _, files in os.walk(folder_path):
for filename in files:
folder_name = os.path.basename(root)
new_filename = f"{folder_name}_{filename}"

old_path = os.path.join(root, filename)
new_path = os.path.join(root, new_filename)

os.rename(old_path, new_path)

path = os.getcwd() + "/TMPQCXMS"
rename_files_with_folder_name(path)
</configfile>
</configfiles>

<inputs>
Expand Down Expand Up @@ -70,11 +93,15 @@
<filter>store_extended_output</filter>
</data>


<collection name="coords" type="list">
<discover_datasets pattern="__designation_and_ext__" format="xyz" directory="TMPQCXMS" recurse="true"/>
<collection name="coords1" type="list" label="coords in files generated by ${tool.name} on ${on_string}" >
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.in" ext="in" directory="TMPQCXMS" recurse="true"/>
</collection>
<collection name="coords2" type="list" label="coords start files generated by ${tool.name} on ${on_string}" >
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.start" ext="start" directory="TMPQCXMS" recurse="true"/>
</collection>
<collection name="coords3" format="xyz" type="list" label="coords xyz files generated by ${tool.name} on ${on_string}" >
<discover_datasets pattern="(?P&lt;designation&gt;.+)\.xyz" format="xyz" ext="xyz" directory="TMPQCXMS" recurse="true"/>
</collection>

</outputs>

<help><![CDATA[]]>
Expand Down

0 comments on commit fcc97d6

Please sign in to comment.