Mercurial > repos > agpetit > calculate_diameter
comparison cut_trajectory.py @ 9:e5cf7698a2af draft
"planemo upload for repository https://github.com/mesocentre-clermont-auvergne/aubi_piaf commit 434f3e872798e786f0c6a88939455692f711496c"
author | agpetit |
---|---|
date | Wed, 01 Jun 2022 10:10:27 +0000 |
parents | d45cecb7cfd0 |
children | f5064c93f7ab |
comparison
equal
deleted
inserted
replaced
8:d45cecb7cfd0 | 9:e5cf7698a2af |
---|---|
263 logging_file = (log_directory | 263 logging_file = (log_directory |
264 + logging_file.rsplit("/", 1)[1].split(".")[0] | 264 + logging_file.rsplit("/", 1)[1].split(".")[0] |
265 + "_" + str(k) + ".log") | 265 + "_" + str(k) + ".log") |
266 try: | 266 try: |
267 os.makedirs(log_directory, exist_ok=True) | 267 os.makedirs(log_directory, exist_ok=True) |
268 except OSError as error: | 268 except OSError: |
269 print("Directory '%s' can not be created") | 269 print("Directory '%s' can not be created") |
270 f_log = open(logging_file, "w") | 270 f_log = open(logging_file, "w") |
271 subprocess.run(bash_command, shell=True, stdout=f_log, stderr=f_log) | 271 subprocess.run(bash_command, shell=True, stdout=f_log, stderr=f_log) |
272 f_log.close() | 272 f_log.close() |
273 return logging_file | 273 return logging_file |
360 nb_cpus = args.number_cpus | 360 nb_cpus = args.number_cpus |
361 launch_cut_traj( | 361 launch_cut_traj( |
362 list_nbr_sub_traj, gro, xtc, out_directory, log_file, | 362 list_nbr_sub_traj, gro, xtc, out_directory, log_file, |
363 args.group_output, nb_cpus | 363 args.group_output, nb_cpus |
364 ) | 364 ) |
365 | |
366 |