This page is for users who are already fairly comfortable with the command line and want to submit calculation jobs directly with slurm. If you'd rather use the drag-and-drop Qflow workflow interface in the browser, you can skip this page and just work in the browser instead.
Log in to the container over SSH (common tools include xshell and MobaXterm), logging in as pwmat. If you're not yet familiar with using a tool like this to log in, or with uploading/downloading files, see this beginner tutorial first: the MobaXterm beginner tutorial.
(1) Prepare the input files
* The structure file atom.config
The atom.config structure file is the standard structure input format supported by PWmat, and can be built and exported using the Q-Studio modeling tool. Log in to Q-Studio, logging in as pwmat
2
LATTICE
0.00000000 2.71535000 2.71535000
2.71535000 0.00000000 2.71535000
2.71535000 2.71535000 0.00000000
POSITION
14 0.00000000 0.00000000 0.00000000 0 0 0
14 0.25000000 0.25000000 0.25000000 0 0 0
* The parameter file etot.input
Aside from the input filename itself, everything is case-insensitive; other than the first line, the order of the other lines doesn't matter. See the parameter manual: https://www.pwmat.com/pwmat-resource/Manual.pdf
1 1 JOB = SCF IN.PSP1 = Si.SG15.PBE.UPF IN.ATOM = atom.config MP_N123 = 9 9 9 0 0 0
* The pseudopotential file(s) *UPF
Copy the pseudopotential file that corresponds to each element in your structure file — we recommend SG15 norm-conserving pseudopotentials. Pseudopotential packages can be downloaded from PWmat's official site at https://www.pwmat.com/potential-download
* The script file slurm.sh
When running PWmat, you need to add the -host argument after PWmat, followed by the “IP” and “PORT” values from the config.json file;
Use the nvidia-smi command to check how many GPUs the machine has, and configure your compute resources accordingly
#!/bin/sh #SBATCH --partition=gpu #SBATCH --job-name=tutorial_scf #SBATCH --nodes=1 #SBATCH --ntasks-per-node=1 #SBATCH --gres=gpu:1 #SBATCH --gpus-per-task=1 module load mkl mpi module load cuda/12.1 module load pwmat/20260428 which PWmat mpirun -np $SLURM_NPROCS PWmat -host 172.17.0.1 50001 | tee output
Once you've prepared all four files above (atom.config, etot.input, the pseudopotential file(s), and slurm.sh), they need to be placed in the same directory before you can submit the job.
(2) Submit the job
From the directory containing the four files above, run:
sbatch slurm.sh
This usually prints a message like “Submitted batch job 123” — the number is your job ID for this submission; note it down so you can check its status and results later.
(3) Check the job's status
squeue
This lists the jobs currently queued or running; you'll see your job ID in the list. In the ST column, R means it's currently running and PD means it's queued and waiting. Once a job has finished, it will no longer appear here.
(4) View the results
For an explanation of the output files, see the manual: https://www.pwmat.com/pwmat-resource/Manual.pdf
Post-processing commands and usage: https://www.pwmat.com/utility-download
* You can check the version number and any calculation errors in the slurm_JOBID.out file (replace “JOBID” with the actual number you got after submitting in step (2) — e.g. if the job ID is 123, the filename is slurm_123.out)
(1) Introductory PPT tutorial on basic calculations: https://www.pwmat.com/Tutorials
(2) Detailed explanation of common parameters: http://modulefiles.pwmat.com/#/
(3) Video tutorials: https://space.bilibili.com/1965576887
(4) Advanced module property calculation tutorials: https://www.pwmat.com/module-download