Skip to content

Commit 4c5fc06

Browse files
committed
[submit_mdt_analyses_lintf2_ether.py]: Add densmap-z_*.sh
1 parent 32a51d2 commit 4c5fc06

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

analysis/lintf2_ether/mdt/submit_mdt_analyses_lintf2_ether.py

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@
7474
input.
7575
:13: All attribute histograms (attribute_hist*).
7676
77+
:14: All 2D density maps in xy plane (`densmap-z_*.sh`)
78+
7779
Options for Trajectory Reading
7880
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7981
--begin
@@ -273,6 +275,12 @@
273275
"contact_hist_slab-z_Li-OBT",
274276
"contact_hist_slab-z_Li-OE",
275277
"create_mda_universe",
278+
"densmap-z_ether",
279+
"densmap-z_Li",
280+
"densmap-z_NBT",
281+
"densmap-z_NTf2",
282+
"densmap-z_OBT",
283+
"densmap-z_OE",
276284
"discrete-hex_Li",
277285
"discrete-hex_NBT",
278286
"discrete-hex_OBT",
@@ -342,6 +350,12 @@
342350
"contact_hist_slab-z_Li-OBT",
343351
"contact_hist_slab-z_Li-OE",
344352
"create_mda_universe",
353+
"densmap-z_ether",
354+
"densmap-z_Li",
355+
"densmap-z_NBT",
356+
"densmap-z_NTf2",
357+
"densmap-z_OBT",
358+
"densmap-z_OE",
345359
"discrete-hex_Li",
346360
"discrete-hex_NBT",
347361
"discrete-hex_OBT",
@@ -507,6 +521,12 @@ def _submit_discretized(sbatch_opts, job_script, bins):
507521
"contact_hist_slab-z_Li-OE": (
508522
posargs_general + posargs_trj[:3] + posargs_contact
509523
),
524+
"densmap-z_ether": posargs_general + posargs_trj[:3] + posargs_dist,
525+
"densmap-z_Li": posargs_general + posargs_trj[:3] + posargs_dist,
526+
"densmap-z_NBT": posargs_general + posargs_trj[:3] + posargs_dist,
527+
"densmap-z_NTf2": posargs_general + posargs_trj[:3] + posargs_dist,
528+
"densmap-z_OBT": posargs_general + posargs_trj[:3] + posargs_dist,
529+
"densmap-z_OE": posargs_general + posargs_trj[:3] + posargs_dist,
510530
"discrete-hex_Li": posargs_general + posargs_trj,
511531
"discrete-hex_NBT": posargs_general + posargs_trj,
512532
"discrete-hex_OBT": posargs_general + posargs_trj,
@@ -576,6 +596,7 @@ def _submit(sbatch_opts, job_script):
576596
elif args["discretize"] and (
577597
"axial_hex_dist" in job_script
578598
or "contact_hist_slab-z" in job_script
599+
or "densmap-z" in job_script
579600
or "discrete-hex" in job_script
580601
):
581602
n_jobs_submitted += _submit_discretized(
@@ -654,6 +675,7 @@ def _submit(sbatch_opts, job_script):
654675
" 12 = All scripts that take an |edr_file| or an |trr_file| as"
655676
" input."
656677
" 13 = All attribute histograms (attribute_hist*)."
678+
" 14 = All 2D density maps in xy plane (`densmap-z_*.sh`)."
657679
),
658680
)
659681
parser_trj_reading = parser.add_argument_group(
@@ -962,13 +984,15 @@ def _submit(sbatch_opts, job_script):
962984
if (
963985
"slab-z" not in args["scripts"]
964986
and "axial_hex_dist" not in args["scripts"]
987+
and "densmap-z" not in args["scripts"]
965988
and "discrete-hex" not in args["scripts"]
966989
and "0" not in args["scripts"].split() # All scripts.
967990
and "2" not in args["scripts"].split() # All slab scripts.
968991
and "4" not in args["scripts"].split() # All discrete-hex.
969992
and "5" not in args["scripts"].split() # All axial_hex_dist.
970993
and "6" not in args["scripts"].split() # All contact_hist.
971994
and "6.2" not in args["scripts"].split() # All contact_hist_slab-z
995+
and "14" not in args["scripts"].split() # All 2D density maps.
972996
):
973997
raise ValueError(
974998
"--discretize can only be used in conjunction with scripts"
@@ -1123,6 +1147,9 @@ def _submit(sbatch_opts, job_script):
11231147
"discretized trajectory (renewal Li-TFSI)",
11241148
DTRJ_RENEWAL_TFSI_FILE,
11251149
)
1150+
elif script == "14": # All 2D density maps in xy plane.
1151+
files.setdefault("run input", TPR_FILE)
1152+
files.setdefault("wrapped compressed trajectory", XTC_FILE_WRAPPED)
11261153
for filetype, filename in files.items():
11271154
if not os.path.isfile(filename):
11281155
fname, extension = os.path.splitext(filename)
@@ -1240,6 +1267,24 @@ def _submit(sbatch_opts, job_script):
12401267
posargs_general + posargs_trj[:3] + posargs_contact + posargs_slab
12411268
),
12421269
"create_mda_universe": posargs_general[:3] + posargs_general[4:],
1270+
"densmap-z_ether": (
1271+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1272+
),
1273+
"densmap-z_Li": (
1274+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1275+
),
1276+
"densmap-z_NBT": (
1277+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1278+
),
1279+
"densmap-z_NTf2": (
1280+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1281+
),
1282+
"densmap-z_OBT": (
1283+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1284+
),
1285+
"densmap-z_OE": (
1286+
posargs_general + posargs_trj[:3] + posargs_dist + posargs_slab
1287+
),
12431288
"discrete-hex_Li": posargs_general + posargs_trj + posargs_slab,
12441289
"discrete-hex_NBT": posargs_general + posargs_trj + posargs_slab,
12451290
"discrete-hex_OBT": posargs_general + posargs_trj + posargs_slab,
@@ -1442,6 +1487,7 @@ def _submit(sbatch_opts, job_script):
14421487
if "0" not in args["scripts"].split() and (
14431488
"axial_hex_dist" in batch_script
14441489
or "contact_hist_slab-z" in batch_script
1490+
or "densmap-z" in batch_script
14451491
or "discrete-hex" in batch_script
14461492
):
14471493
# Submit only bulk scripts.
@@ -1454,10 +1500,10 @@ def _submit(sbatch_opts, job_script):
14541500
):
14551501
# Scripts have already been submitted above.
14561502
continue
1457-
if batch_script == "energy_dist":
1503+
if batch_script in REQUIRE_EDR:
14581504
# Exclude all scripts that take an .edr file as input.
14591505
continue
1460-
if "attribute_hist" in batch_script:
1506+
if batch_script in REQUIRE_TRR:
14611507
# Exclude all scripts that take an .trr file as input.
14621508
continue
14631509
if "lig_change_at_pos_change" in batch_script:
@@ -1478,6 +1524,7 @@ def _submit(sbatch_opts, job_script):
14781524
if (
14791525
"axial_hex_dist" in batch_script
14801526
or "contact_hist_slab-z" in batch_script
1527+
or "densmap-z" in batch_script
14811528
or "discrete-hex" in batch_script
14821529
):
14831530
n_scripts_submitted += _submit(args_sbatch, batch_script)
@@ -1665,6 +1712,11 @@ def _submit(sbatch_opts, job_script):
16651712
for batch_script in posargs.keys():
16661713
if "attribute_hist" in batch_script:
16671714
n_scripts_submitted += _submit(args_sbatch, batch_script)
1715+
if "14" in args["scripts"].split():
1716+
# All 2D density maps in xy plane.
1717+
for batch_script in posargs.keys():
1718+
if "densmap-z" in batch_script:
1719+
n_scripts_submitted += _submit(args_sbatch, batch_script)
16681720
print("Submitted {} jobs".format(n_scripts_submitted))
16691721
if n_scripts_submitted == 0:
16701722
warnings.warn("No script submitted", UserWarning, stacklevel=2)

0 commit comments

Comments
 (0)