Usage¶

Enable Shell Completion¶

Shell completion is supported for the bash, zsh, and fish shells. Shell completion can be enabled by running autojob init and then restarting your shell.

CLI Commands¶

autojob¶

Main CLI logic.

autojob [OPTIONS] COMMAND [ARGS]...

Options

-V, --version¶

Show the version and exit.

-v, --verbose¶

Control how much information is printed to the terminal. This option can be repeated.

-q, --quiet¶
--log-file <log_file>¶

Specify a log file for all logging messages.

--log-level <log_level>¶

Specify the log level for all logging messages.

Options:

DEBUG | INFO | WARNING | ERROR | CRITICAL

advance¶

Advance to the next in a series of calculations.

autojob advance [OPTIONS]

Options

-n, --next-step <next_step>¶

The next calculation to prep if this calculation is complete.

Options:

relaxation | vibrational analysis

-A, --archive-mode <archive_mode>¶

How to archive the completed task.

Options:

json | None

-S, --submit, --no-submit¶

Whether or not to submit the newly created job.

Default:

False

--file-size-limit <file_size_limit>¶

Specify the file size above which all files in the old job larger than this will be deleted. Integers will be interpreted in bytes. The suffixes, KB, MB, and GB, will cause the value to be interpreted as kilobytes, megabytes, and gigabytes, respectively.

Default:

inf

--log-file <log_file>¶

The filename in which to log messages from autojob.

-b, --bader, --no-bader¶

Whether or not to run bader charge analysis after relaxation is converged. Note that if the first import statement imports os or subprocees, no new logic will be added.

Default:

False

-a, --auto-restart, --no-auto-restart¶

Whether or not to add logic to vasp.sh to automatically resubmit a job on time out.

Default:

True

-c, --calc-mod <calc_mods>¶

Modify calculator parameters (e.g., –calc-mod=”encut=500”). Values will be parsed into their native types, so string values should be passed without additional quotations (e.g., –calc-mod=”algo=Fast”). This option can be repeated.

Default:

{}

-L, --slurm-mod <slurm_mods>¶

Modify SLURM parameters (e.g., –slurm-mod=”job-name=COOH-%{calculation-id}”). Recognized placeholders: ${structure}, %{study-group-id}, ${study-id}, ${calculation-id}, and ${job-id}. Value should be passed exactly as they should appear in a slurm submission file (e.g., –slurm-mod=”partition=razi,cpu2022”). This option can be repeated; however, the use of placeholders is currently only supported for the job-name option.

Default:

{}

--to-copy <to_copy>¶

Indicate a file to copy from the directory of the completed job to the directory of the new job. This option can be repeated.

Default:

-p, --path <paths>¶

The path from which to create new job directories. This option can be repeated. Defaults to the current working directory.

Warning:

All calculator parameters must be passed as keyword arguments to the ASE calculator. For example, this is acceptable:

Vasp(label="vasp", directory=".")

But this is unacceptable:

Vasp(atoms)

Example:

1. Submit the new job upon creation.

    autojob advance

harvest¶

Runs the GUI for ‘Coordinator’.

This is a graphical user interface that enables you to design arbitrarily large studies which are parametrized with respect to input structures, any input variable for an ASE calculator, or even SLURM parameter.

Args:

template: a previously configured study group, study, calculation, or job with which to populate the GUI. Defaults to None.

autojob harvest [OPTIONS] [TEMPLATE] COMMAND [ARGS]...

Options

--template-dir <template_dir>¶

The directory from which to pull script templates. If not specified, autojob will use its own templates.

--dest <dest>¶

The root directory for study group creation.

Arguments

TEMPLATE¶

Optional argument

harvest¶

Harvest completed tasks from a directory.

autojob harvest [OPTIONS] COMMAND [ARGS]...

Options

--path <dir_name>¶
--filename <filename>¶

The file stem to use to name the harvested data file.

--dest <dest>¶

The directory in which to save the archives.

--archive-mode <archive_mode>¶

The mode with which to archive the harvested tasks.

Options:

csv | json | both

--strict¶

Errors will immediately halt execution.

--relaxed¶

Only jobs for which no errors are thrown during harvesting will be harvested.

--atomic¶

Every attempt will be made to harvest data from every directory. Incomplete data does not cause execution to halt.

--whitelist <whitelists>¶

Specify an exclusive list of jobs to harvest. Whitelists will be combined.

--blacklist <blacklists>¶

Specify a list of jobs not to harvest. Blacklists will be combined. When specified with –whitelist, –blacklist will take a higher priority.

init¶

Enable tab completion and create the autojob home directory.

autojob init [OPTIONS]

restart-relaxation¶

Restart a DFT relaxation calculation.

restart-relaxation [OPTIONS]

Options

-v, --verbose¶

Controls the verbosity. 0: Show messages of level warning and higher. 1: Show messages of level info and higher. 2: Show all messages-useful for debugging. Defaults to 0.

Default:

0

-S, --submit, --no-submit¶

Whether or not to submit the newly created job. Defaults to ‘–no-submit’.

Default:

False

--file-size-limit <file_size_limit>¶

Specify the file size above which all files in the old job larger than this will be deleted. Integers will be interpreted in bytes. The suffixes, KB, MB, and GB, will cause the value to be interpreted as kilobytes, megabytes, and gigabytes, respectively. No limit is set by default.

Default:

inf

-b, --bader, --no-bader¶

Whether or not to run bader charge analysis after relaxation is converged. Note that if the first import statement imports os or subprocees, no new logic will be added. Defaults to ‘–no-bader’.

Default:

False

-C, --chargemol, --no-chargemol¶

Whether or not to run chargemol after relaxation is converged. Note that if the first import statement imports os or subprocees, no new logic will be added. Defaults to ‘–no-chargemol’

Default:

False

-a, --auto-restart, --no-auto-restart¶

Whether or not to add logic to vasp.sh to automatically resubmit a job on time out. Defaults ‘–no-auto-restart’.

Default:

False

-c, --calc-mod <calc_mods>¶

Specify modifications to calculator parameters. Modifications must be passed as quoted parameter-value strings separated by an equals sign (e.g., “parameter=value”). Values (even strings) must be specified without additional quotations as they will be parsed into native Python types. Values can only be parsed into integers, floats, strings, booleans, or None. This option can be repeated.

Default:

{}

-L, --slurm-mod <slurm_mods>¶

Specify modifications to scheduler parameters. Modifications must be passed as quoted parameter-value strings separated by an equals sign (e.g., “parameter=value”). Values must be passed exactly as they should be passed to the scheduler (e.g., “mem=10GB”), and format strings may be used to substitute select parameters. Variables that may be substituted include the structure filename, the study group, study, calculation, or job ID. ; however, the use of placeholders is currentlyonly supported for the job-name SLURM option. Note that only one of ‘mem’and ‘mem-per-cpu’ can be set. This option may be repeated.

Default:

{}

--config <config>¶

Configure autojob parameters (e.g., –config=”slurm_script=gaussian.sh). This option can be repeated.

Default:

{}

--carry-over <files_to_carry_over>¶

Indicate a file to copy from the directory of the completed job to the directory of the new job. This option can be repeated.

Default:

-p, --path <paths>¶

The path from which to create new job directories. This option can be repeated. Defaults to the current working directory.

-R, --recursive, ---no-recursive¶

Whether to search all subdirectories for jobs to restart in addition to those specified by the –path option. Defaults to ‘–no-recursive’.

Default:

False

Warning: All calculator parameters must be passed as positional arguments to the ASE calculator. For example, this is acceptable:

Vasp(label=”vasp”, directory=”.”)

But this is unacceptable:

Vasp(atoms)

EXAMPLES¶

  1. Submit the new job upon creation.

restart-relaxation -S

2. Copy the WAVECAR & CHGCAR, submit the new job upon creation, print out all messages.

restart-relaxation –carry-over WAVECAR –carry-over CHGCAR -S -vv

3. Submit the new job upon creation, enable auto-restart, run bader charge upon completion, print out all messages, delete all files 1 gigabyte or larger, reconfigure the calculator with ediff=1e-8.

restart-relaxation -Sabvv –file-size-limit 1GB -c “ediff=1e-8”

4. Submit the new job upon creation, set the job name to the name of the structure file with the suffix “-vib”.

restart-relaxation -S –slurm-mod=”job-name={structure}-vib”

run-vibration¶

Create a new vibrational calculation from an existing calculation.

Aside from setting NSW=0 (in the case of a VASP calculation), no changes will be made to the original calculator configuration.

run-vibration [OPTIONS]

Options

-v, --verbose¶

Controls the verbosity. 0: Show messages of level warning and higher. 1: Show messages of level info and higher. 2: Show all messages-useful for debugging. Defaults to 0.

Default:

0

-S, --submit, --no-submit¶

Whether or not to submit the newly created job. Defaults to ‘–no-submit’.

Default:

False

-I, --infrared, --no-infrared¶

Whether or not to calculate infrared intensities. Defaults to ‘–no-infrared’.

Default:

False

--file-size-limit <file_size_limit>¶

Specify the file size above which all files in the old job larger than this will be deleted. Integers will be interpreted in bytes. The suffixes, KB, MB, and GB, will cause the value to be interpreted as kilobytes, megabytes, and gigabytes, respectively. No limit is set by default.

Default:

inf

-c, --calc-mod <calc_mods>¶

Specify modifications to calculator parameters. Modifications must be passed as quoted parameter-value strings separated by an equals sign (e.g., “parameter=value”). Values (even strings) must be specified without additional quotations as they will be parsed into native Python types. Values can only be parsed into integers, floats, strings, booleans, or None. This option can be repeated.

Default:

{}

-L, --slurm-mod <slurm_mods>¶

Specify modifications to scheduler parameters. Modifications must be passed as quoted parameter-value strings separated by an equals sign (e.g., “parameter=value”). Values must be passed exactly as they should be passed to the scheduler (e.g., “mem=10GB”), and format strings may be used to substitute select parameters. Variables that may be substituted include the structure filename, the study group, study, calculation, or job ID. ; however, the use of placeholders is currentlyonly supported for the job-name SLURM option. Note that only one of ‘mem’and ‘mem-per-cpu’ can be set. This option may be repeated.

Default:

{}

--carry-over <files_to_carry_over>¶

Indicate a file to copy from the directory of the completed job to the directory of the new job. This option can be repeated.

Default:

--unfreeze-tag <tags_to_unfreeze>¶

Unfreeze all atoms with this tag. This option can be repeated. Note that this will apply to all vibrational calculations started.

Default:

-99

-p, --path <paths>¶

The path from which to create new job directories. This option can be repeated. Defaults to the current working directory.

-R, --recursive, ---no-recursive¶

Whether to search all subdirectories for jobs to restart in addition to those specified by the –path option. Defaults to ‘–no-recursive’.

Default:

False

Warning: All calculator parameters must be passed as positional arguments to the ASE calculator. For example, this is acceptable:

Vasp(label=”vasp”, directory=”.”)

But this is unacceptable:

Vasp(atoms)

EXAMPLES¶

  1. Submit the new job upon creation.

run-vibration -S

2. Copy the WAVECAR & CHGCAR, submit the new job upon creation, print out all messages, unfreeze all atoms tagged with -99.

run-vibration –carry-over WAVECAR –carry-over CHGCAR -S -vv –unfreeze -99

3. Submit the new job upon creation, print out all messages, unfreeze all atoms tagged with -99, delete all files 1 gigabyte or larger, reconfigure the calculator with ediff=1e-8.

run-vibration -Svv —unfreeze-tag -99 –file-size-limit 1GB -c “ediff=1e-8”

4. Submit the new job upon creation, unfreeze all atoms tagged with -99, set the job name to the name of the structure file with the suffix “-vib”.

run-vibration -S –unfreeze-tag -99 –slurm-mod=”job-name={structure}-vib”