ZnO (Quantum ESPRESSO): Difference between revisions

From HPC Wiki
Jump to:navigation Jump to:search
No edit summary
Line 213: Line 213:
== Spectra Data ==
== Spectra Data ==


{{FileBox|filename=zno.dm.out|title=(Section of file containing table)|1=
{{FileBox|filename=zno.dm.out|title=(Partial file: Section containing table)|1=
     IR activities are in (D/A)^2/amu units
     IR activities are in (D/A)^2/amu units
     Raman activities are in A^4/amu units
     Raman activities are in A^4/amu units

Revision as of 16:14, 3 January 2017

This example shows how to create Infrared and Raman spectra of solid ZnO-Wurtzite, which are computed using the following 3 steps:

  • Perform Self Consistent Field (scf) calculation with pw.x
  • Calculate the vibrational frequencies (normal modes/phonons) with ph.x
  • Extract the phonon information from ph.x output using dynmat.x
  • Parse the dynmat.x output section that contains the spectra data and plot it with gnuplot


Important
The initial setup must be completed before continuing.

Prepare Example Directory

First, make sure we are at the root of our home directory

user $cd

Now, make an example directory, and copy the ellipse example directory into it.

user $mkdir examples
user $cp -r /home/bgo/shared/examples/qe/ZnO examples/
user $cd examples/ZnO
user $ls
O.pw-mt_fhi.UPF  README  Zn.pw-mt_fhi.UPF  zno.dm.qei  zno.ph.qei  zno.scf.qei

We also need a script to submit the job to the cluster. Lets start with the quantum espresso sample script in /home/bgo/shared/samples by copying it to our new ellipse example directory.

user $cp /home/bgo/shared/samples/torque-qe.sh .
user $ls
O.pw-mt_fhi.UPF  Zn.pw-mt_fhi.UPF  zno.dm.qei  zno.scf.qei
README           torque-qe.sh      zno.ph.qei

The torque-qe.sh script should look something like this:

FILE torque-qe.sh(original)
#PBS -l walltime=10:00:00,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N Jobname
#PBS -o myoutput.txt
#PBS -j oe

QE_MODULE=pw.x

. $(which qe-config)

# The input file must have a '.qei' extension (e.g., mysimulation.qei).
INPUTFILE=mysimulation

doQE


The submission script we just copied has default settings that have to be modified for this simulation. Lucky, most of the defaults work for the ZnO simulation (1 node, 16 processes per node, etc.) and all we have to change is the name of the job, the Quantum Espresso module, and the name of the input file.

Running Quantum Espresso

Perform Self Consistent Field (scf) calculation

Quantum Espresso module to pw.c

Modify Queue Submission Script

Changing the job name to ZnO-pw, the Quantum Espresso module to pw.x, and the input file to zno.scf results in a submission script that looks like this:

FILE torque-qe.sh(edited for running pw.x)
#PBS -l walltime=10:00:00,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N ZnO-pw
#PBS -o myoutput.txt
#PBS -j oe

QE_CMD=pw.x

. $(which qe-config)

# The input file must have a '.qei' extension (e.g., mysimulation.qei).
INPUTFILE=zno.scf

doQE

Submit Job

The job is now ready to be sent to the cluster.

user $qsub torque-lmp.sh
user $qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
14222.flory               ZnO-pw           user            00:00:35 R default  

The job should take about 1 minute. Check the job status with qstat to see when it is finished; when the job is no longer listed it has finished.

Check Results

When the job completes you should find the following files:

user $ls -lh
total 400K
-rw-r--r-- 1 user user 162K Jan  3 14:36 O.pw-mt_fhi.UPF
-rw-r--r-- 1 user user 2.1K Jan  3 14:36 README
-rw-r--r-- 1 user user 180K Jan  3 14:36 Zn.pw-mt_fhi.UPF
-rw------- 1 user user  14K Jan  3 14:37 myoutput.txt
drwxrwxr-x 3 user user 4.0K Jan  3 14:37 tmp
-rwxr-xr-x 1 user user  271 Jan  3 14:36 torque-qe.sh
-rw-r--r-- 1 user user  117 Jan  3 14:36 zno.dm.qei
-rw-r--r-- 1 user user  255 Jan  3 14:36 zno.ph.qei
-rw-rw-r-- 1 user user  13K Jan  3 14:37 zno.scf.out
-rw-r--r-- 1 user user  720 Jan  3 14:36 zno.scf.qei

Calculate the vibrational frequencies (normal modes/phonons)

Modify Queue Submission Script

FILE torque-qe.sh(edited for running ph.x)
#PBS -l walltime=10:00:00,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N ZnO-ph
#PBS -o myoutput.txt
#PBS -j oe

QE_CMD=ph.x

. $(which qe-config)

# The input file must have a '.qei' extension (e.g., mysimulation.qei).
INPUTFILE=zno.ph

doQE

Submit Job

The job is now ready to be sent to the cluster.

user $qsub torque-lmp.sh
user $qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
14222.flory               ZnO-ph           user            00:00:35 R default  

The job should take about 5 minutes. Check the job status with qstat to see when it is finished; when the job is no longer listed it has finished.

Check Results

When the job completes you should find the following files:

user $ls -lh
-rw-r--r-- 1 user user 162K Jan  3 14:37 O.pw-mt_fhi.UPF
-rw-r--r-- 1 user user 2.1K Jan  3 14:37 README
-rw-r--r-- 1 user user 180K Jan  3 14:37 Zn.pw-mt_fhi.UPF
-rw-rw-r-- 1 user user  13K Jan  3 14:43 dmat.zno
-rw-rw-r-- 1 user user 2.4M Jan  3 14:38 drho_e1
-rw-rw-r-- 1 user user 2.4M Jan  3 14:38 drho_e2
-rw-rw-r-- 1 user user 2.4M Jan  3 14:38 drho_e3
-rw------- 1 user user  33K Jan  3 14:43 myoutput.txt
drwxrwxr-x 4 user user 4.0K Jan  3 14:38 tmp
-rwxr-xr-x 1 user user  270 Jan  3 14:37 torque-qe.sh
-rw-r--r-- 1 user user  117 Jan  3 14:37 zno.dm.qei
-rw-rw-r-- 1 user user  32K Jan  3 14:43 zno.ph.out
-rw-r--r-- 1 user user  255 Jan  3 14:37 zno.ph.qei
-rw-rw-r-- 1 user user  13K Jan  3 14:37 zno.scf.out
-rw-r--r-- 1 user user  720 Jan  3 14:37 zno.scf.qei

phonon information

Modify Queue Submission Script

FILE torque-qe.sh(edited for running dynmat.x)
#PBS -l walltime=10:00:00,nodes=1:ppn=16
##PBS -M EmailAddress
##PBS -m bae
#PBS -q default
#PBS -N ZnO-dynmat
#PBS -o myoutput.txt
#PBS -j oe

QE_CMD=dynmat.x

. $(which qe-config)

# The input file must have a '.qei' extension (e.g., mysimulation.qei).
INPUTFILE=zno.dm

doQE

Submit Job

The job is now ready to be sent to the cluster.

user $qsub torque-lmp.sh
user $qstat
Job ID                    Name             User            Time Use S Queue
------------------------- ---------------- --------------- -------- - -----
14222.flory               ZnO-ph           user            00:00:35 R default  

The job should take less than a minute. Check the job status with qstat to see when it is finished; when the job is no longer listed it has finished.

Check Results

When the job completes you should find the following files:

user $ls -lh
total 7.7M
-rw-r--r-- 1 user user 162K Jan  3 14:46 O.pw-mt_fhi.UPF
-rw-r--r-- 1 user user 2.1K Jan  3 14:46 README
-rw-r--r-- 1 user user 180K Jan  3 14:46 Zn.pw-mt_fhi.UPF
-rw-rw-r-- 1 user user  13K Jan  3 14:46 dmat.zno
-rw-rw-r-- 1 user user 2.4M Jan  3 14:46 drho_e1
-rw-rw-r-- 1 user user 2.4M Jan  3 14:46 drho_e2
-rw-rw-r-- 1 user user 2.4M Jan  3 14:46 drho_e3
-rw------- 1 user user 3.0K Jan  3 14:47 myoutput.txt
drwxrwxr-x 4 user user 4.0K Jan  3 14:46 tmp
-rwxr-xr-x 1 user user  278 Jan  3 14:47 torque-qe.sh
-rwxr-xr-x 1 user user  274 Jan  3 14:46 torque-qe.sh~
-rw-rw-r-- 1 user user 2.4K Jan  3 14:47 zno.dm.out
-rw-r--r-- 1 user user  117 Jan  3 14:46 zno.dm.qei
-rw-rw-r-- 1 user user  32K Jan  3 14:46 zno.ph.out
-rw-r--r-- 1 user user  255 Jan  3 14:46 zno.ph.qei
-rw-rw-r-- 1 user user  13K Jan  3 14:46 zno.scf.out
-rw-r--r-- 1 user user  720 Jan  3 14:46 zno.scf.qei
-rw-rw-r-- 1 user user 3.7K Jan  3 14:47 zno_raman.axsf
-rw-rw-r-- 1 user user 2.1K Jan  3 14:47 zno_raman.mold
-rw-rw-r-- 1 user user 4.6K Jan  3 14:47 zno_raman.out

Spectra Data

FILE zno.dm.out(Partial file: Section containing table)
IR activities are in (D/A)^2/amu units
     Raman activities are in A^4/amu units
     multiply Raman by 0.000650 for Clausius-Mossotti correction

# mode   [cm-1]    [THz]      IR          Raman   depol.fact
    1     -0.00   -0.0000    0.0000      5406.9725    0.7500
    2     -0.00   -0.0000    0.0000      5757.6500    0.7500
    3     -0.00   -0.0000    0.0000      5688.7322    0.7499
    4     -0.00   -0.0000    0.0000       171.9037    0.4691
    5      0.00    0.0000    0.0000       554.2156    0.5434
    6      0.00    0.0000    0.0000      2358.3724    0.7367
    7    105.98    3.1773    0.1227      1281.9877    0.7500
    8    124.94    3.7456    0.0000      4603.4623    0.7500
    9    287.20    8.6100   13.4004      3428.9212    0.7500
   10    391.76   11.7446   71.1599     37311.9784    0.1040
   11    407.14   12.2057  101.4467      9438.8013    0.7500
   12    532.61   15.9672    6.1669       385.1588    0.7500