How to use the Pyxaid2 to read the XDATCAR from the VASP MD simulation for electronic spectrum calculation?

151 views
Skip to first unread message

misa...@gmail.com

unread,
Sep 28, 2017, 8:46:39 AM9/28/17
to Quantum-Dynamics-Hub
Hi Alexey,


I have the XDATCAR from the VASP MD simulation and want to use Pyxaid2 to calculate electronic spectrum. I have modified the parameters in the submit.pbs file, "params [\ "compute_Hprime \"] = 1", and the parameters of "minband" and "maxband" depend on the number of electronic valence from the QE pseudopotential. Meanwhile, I have modified the parameters in py-scr2.py file, "out2inp.out2inp -> xdatcar2inp.xdatcar2inp". But, the running has the following errors,

In the CRASH file, "the error opening xml data file...".

In the qe_pyxaid2_test.e44209 file, "At line 136 of file read_cards.f90 \ Fortran runtime error: End of file..."

Should I modify other files or parameters?


Best.

Misaraty

Wei Li

unread,
Sep 28, 2017, 8:52:53 AM9/28/17
to Quantum-Dynamics-Hub
Hi Misaraty,

It's hard to say what's going wrong without knowing the details. Can you post your input files?

Wei

misa...@gmail.com

unread,
Sep 28, 2017, 9:24:38 AM9/28/17
to Quantum-Dynamics-Hub
Hi Wei,

Thanks.

py-scr2.py,

from PYXAID2 import *
import os

user = 1 #weili or eric
#user = 2 #alexey

nsteps_per_job = 2
tot_nsteps = 4

# Step 1 - split MD trajectory on the time steps
# Provide files listed below: "GaAs-md.out" and "x0.scf.in", "x1.scf.in"
# IMPORTANT: 
# 1) use only ABSOLUTE path for PP in x.scf.in file
# 2) provided input file is just a template, so do not include coordinates
rt="/home/export/parastor/keyuser/bnulongr/apps/test/test6/"
# out2inp.out2inp(rt+"x.md.out","x0.scf.in","wd","x0.scf",0,tot_nsteps,1)  # non-relativistic setup
#out2inp.out2inp(rt+"GaAs-md.out","x1.scf.in","wd","x1.scf",0,tot_nsteps,1)  # relativistic setup
xdatcar2inp.xdatcar2inp(rt+"XDATCAR","x0.scf.in","wd","x0.scf",0,tot_nsteps,1)


# Step 2 - distribute all time steps into groups(jobs) 
# several time steps per group - this is to accelerate calculations
# creates a "customized" submit file for each job and submit it - run
# a swarm in independent calculations (trajectory pieces)
#(HTC paradigm)
# Provide the files below: 
# submit_templ.pbs - template for submit files - manually edit the variables
# x.exp.in - file for export of the wavefunction

if user==1: 
   os.system("cp submit.pbs wd")
elif user==2:
   os.system("cp submit_templ.slm wd")

os.system("cp x0.exp.in wd")
#os.system("cp x1.exp.in wd")
os.chdir("wd")

if user==1:
   #distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit.pbs",["x0.exp.in","x1.exp.in"],["x0.scf","x1.scf"],1)
   distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit.pbs",["x0.exp.in"],["x0.scf"],1)
   #distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit.pbs",["x1.exp.in"],["x1.scf"],1)
# elif user==2:
   #distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit_templ.slm",["x0.exp.in"],["x0.scf"],2)
   #distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit_templ.slm",["x1.exp.in"],["x1.scf"],2)
   #distribute.distribute(0,tot_nsteps,nsteps_per_job,"submit_templ.slm",["x0.exp.in","x1.exp.in"],["x0.scf","x1.scf"],2)




submit.pbs,

#!/bin/bash
#PBS -l nodes=1:ppn=2
#PBS -N qe_pyxaid2_test
#PBS -q q_zhq_bnulongr

cd $PBS_O_WORKDIR
echo $PBS_O_WORKDIR

# the below settings works for my laptop, please customize your own environmental variables!
###### some conventional settings ###########
export PYTHONPATH=/home/export/parastor/keyuser/bnulongr/apps/libra/bin/src:$PYTHONPATH
export LD_LIBRARY_PATH=/home/export/parastor/keyuser/bnulongr/apps/libra/bin/src:$LD_LIBRARY_PATH
export PYTHONPATH=/home/export/parastor/keyuser/bnulongr/apps/pyxaid2-master:$PYTHONPATH
export LD_LIBRARY_PATH=/home/export/parastor/keyuser/bnulongr/apps/pyxaid2-master:/home/export/parastor/keyuser/bnulongr/apps/boost1.6/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/home/export/parastor/clussoft/compiler/intel/composer_xe_2015.2.164/mkl/lib/intel64:$LD_LIBRARY_PATH
##### path for the QE module #####
exe_qespresso=/home/export/parastor/keyuser/bnulongr/apps/qe/5.3.0/espresso-5.3.0/bin/pw.x
exe_export=/home/export/parastor/keyuser/bnulongr/apps/qe/5.3.0/espresso-5.3.0/bin/pw_export.x
exe_convert=/home/export/parastor/keyuser/bnulongr/apps/qe/5.3.0/espresso-5.3.0/bin/iotk
##### MPI #####
source /home/export/parastor/clussoft/profile.d/intelmpi.sh 
MPIRUN=/home/export/parastor/clussoft/mpi/intelmpi/5.0.2.044/intel64/bin/mpirun
NP=$(wc -l $PBS_NODEFILE | awk '{print $1}')

# These will be assigned automatically, leave them as they are
param1=
param2=

res=/home/export/parastor/keyuser/bnulongr/apps/test/test6/res

# This is invocation of the scripts which will further handle NA-MD calclculations
# on the NAC calculation step
python -c "from PYXAID2 import *
params = { }
params[\"BATCH_SYSTEM\"]=\"$MPIRUN\"
params[\"NP\"]=$NP
params[\"EXE\"]=\"$exe_qespresso\"
params[\"EXE_EXPORT\"]=\"$exe_export\"
params[\"EXE_CONVERT\"] =\"$exe_convert\"
params[\"start_indx\"]=$param1
params[\"stop_indx\"]=$param2
params[\"wd\"]=\"wd_test\"
params[\"rd\"]=\"$res\"
params[\"minband\"]=351
params[\"maxband\"]=352
params[\"minband_soc\"]=351
params[\"maxband_soc\"]=352
params[\"nac_method\"]=0
params[\"wfc_preprocess\"]=\"complete\"
params[\"do_complete\"]=1
params[\"prefix0\"]=\"x0.scf\"
params[\"prefix1\"]=\"x1.scf\"
params[\"compute_Hprime\"]=1
params[\"pptype\"]=\"US\"
print params
runMD2.runMD(params)
"





x0.scf.in,

&CONTROL
  calculation = 'scf',
  pseudo_dir = '/home/export/parastor/keyuser/bnulongr/soft/qe/upf_files',
  outdir = './',
  prefix = 'x0',
  disk_io = 'low',
  wf_collect = .true.
/

&SYSTEM
  ibrav = 0,
!  celldm(1) = 1.88973,
  nat = 78,
  ntyp = 2,
!  nspin = 2,
  nbnd = 20,
  ecutwfc = 30,
  tot_charge = 0.0,
!  starting_magnetization(1) = 0.01
  occupations = 'smearing',
  smearing = 'gaussian',
  degauss = 0.005,
 nosym = .true.,
/

&ELECTRONS
  electron_maxstep = 300,
  conv_thr = 1.D-5,
  mixing_beta = 0.45,
/

&IONS
  ion_dynamics = 'verlet',
  ion_temperature = 'andersen',
  tempw = 300.00 ,
  nraise = 1,
/

ATOMIC_SPECIES
 Zn  65.3799972534  Zn.pbe-van.UPF
 S  32.0600013733  S.pbe-n-kjpaw_psl.0.1.UPF

K_POINTS {gamma}                  
                               
CELL_PARAMETERS {angstrom}
    19.7647991179999991    0.0000000000000000    0.0000000000000000
     0.0000000000000000   19.0186996460000017    0.0000000000000000
     0.0000000000000000    0.0000000000000000   18.7049007415999995
 
 
 


x0.exp.in,

&inputpp
  prefix = 'x0',
  outdir = './',
  pseudo_dir = '/home/export/parastor/keyuser/bnulongr/soft/qe/upf_files',
  psfile(1) = 'Zn.pbe-van.UPF',
  psfile(2) = 'S.pbe-n-kjpaw_psl.0.1.UPF',
  single_file = .FALSE.,
  ascii = .TRUE.,
  uspp_spsi = .FALSE.,
/



Misaraty

Wei Li

unread,
Sep 28, 2017, 9:34:29 AM9/28/17
to Quantum-Dynamics-Hub
Hi Misaraty,

Please switch to PYXAID1 for this purpose, 
Perhaps we will implement the functionality for transition dipole moment in PYXAID2 which is necessary for absorption spectrum calculation once we have the current issues solved.

misa...@gmail.com

unread,
Sep 28, 2017, 10:08:45 AM9/28/17
to Quantum-Dynamics-Hub
Hi Wei,

Thanks.

The pyxaid1 for electron spectrum calculation with md.out does not contain any problems, but there was a wrong when it was switched to xdatcar.

The error was similar to Pyxaid2 with xdatcar.

Misaraty

misa...@gmail.com

unread,
Sep 28, 2017, 11:02:36 AM9/28/17
to Quantum-Dynamics-Hub
Hi Wei,

Thanks.

Pyxaid1 with xdatcar is normal.

Best.

Misaraty
Reply all
Reply to author
Forward
0 new messages