schrodinger.job.jobwriter module¶
Functions for writing job command lists into shell scripts.
- exception schrodinger.job.jobwriter.OplsArchiveNotFoundError(opls_dir: str)¶
Bases:
Exception
- __init__(opls_dir: str)¶
- Parameters
opls_dir – The path to the OPLS directory containing an archive or the archive itself.
- schrodinger.job.jobwriter.write_job_cmd(cmdlist, sh_filename, job_dir, append=False)¶
Write a shell script that can be used to run the given
cmdlist
.- Parameters
cmdlist (list[str]) – The command the script should run.
sh_filename (sh) – The name of the file the script should be written to
job_dir (str) – The desired job directory to be used for the command
append (bool) – Whether to append to the given file or overwrite it. This is useful for writing a single shell script that launches multiple jobs.
- schrodinger.job.jobwriter.cmdlist_to_cmd(cmdlist)¶
Converts a command list to a command string. Don’t do this if you can possibly avoid it.
- Parameters
cmdlist (list) – a list of commands
- Returns
str
- schrodinger.job.jobwriter.set_sh_file_flags(filename)¶
- schrodinger.job.jobwriter.copy_opls_archive_to_job_dir(opls_dir: str, job_dir: str) str ¶
Copy the OPLS archive (.opls file) to the job directory if it’s not already there.
- Parameters
opls_dir – The path to the OPLS directory that contains the archive.
job_dir – The path to the job directory
- Returns
The base name of the copied archive file.
- Raises
OplsArchiveNotFoundError – If the OPLS archive is not found.