Specifying multiple pre_rocket lines in my_qadaptor.yaml

I have a rather simple question that I can’t seem to find any information on! How do I specify more than one pre_rocket task in my_qadaptor.yaml? I need to do a few different things before running the vasp_cmd on my cluster, including activating my atomate environment, loading vasp, and loading the correct stack environment, which is a total of 4 lines. I tried a few different things, but none of them worked:

First, I tried separating each line with a \n character, like so:

pre_rocket: conda activate atomate_env2\n module load intel/17.0.4\n module load impi/17.0.3\n module load vasp/6.3.0

And the FW_submit.script was written all in one line with the \n still printed. I next tried separating tasks by line:

pre_rocket: conda activate atomate_env2
            module load intel/17.0.4
            module load impi/17.0.3
            module load vasp/6.3.0 

Once again, this still printed in the submit script as all one line

I then tried enclosing the tasks in curly brackets and separating them by a comma, and I tried enclosing them in square brackets with each task separated by a comma, like so:

pre_rocket: {conda activate atomate_env2, module load intel/17.0.4, module load impi/17.0.3, module load vasp/6.3.0}

and

pre_rocket: [conda activate atomate_env2, module load intel/17.0.4, module load impi/17.0.3, module load vasp/6.3.0]

but again, this just resulted in the exact string being printed to FW_submit.script in one line, and the commands couldn’t be read properly.

So, how does one specify multiple pre_rocket commands? Thanks in advance!

The file is in Markdown format, do any of these help?

I haven’t checked it out in detail, but would suggest looking at how to write multiline strings in YAML

1 Like

Not sure if this was already solved by the response of @Anubhav_Jain, but my simple solution is to use semicolons

pre_rocket: conda activate atomate_env2; module load intel/17.0.4; module load impi/17.0.3; module load vasp/6.3.0

and

post_rocket: conda deactivate; module purge

should work.

Thank you so much, this worked as intended!