Structural optimization

Total energy, geometry optimization, DFT+U, spin....

Moderator: bguster

Locked
jlwindy
Posts: 32
Joined: Tue Jan 08, 2019 4:11 pm

Structural optimization

Post by jlwindy » Fri Apr 12, 2019 1:33 pm

Dear all
I want to get the structures under different pressures along the z axis.Can i use the in.file to get it?

#Structural optimization run
ndtset 5
strtarget1 0.00000d0 0.00000d0 -0.00001d0
0.00000d0 0.00000d0 0.00000d0
strtarget2 0.00000d0 0.00000d0 -0.00002d0
0.00000d0 0.00000d0 0.00000d0
strtarget3 0.00000d0 0.00000d0 -0.00003d0
0.00000d0 0.00000d0 0.00000d0
strtarget4 0.00000d0 0.00000d0 -0.00004d0
0.00000d0 0.00000d0 0.00000d0
strtarget5 0.00000d0 0.00000d0 -0.00005d0
0.00000d0 0.00000d0 0.00000d0
chkdilatmx 0
dilatmx 1.5 # Maximum scaling allowed for lattice parameters
getxred -1 # Start with relaxed coordinates from dataset 1
getwfk -1 # Start with wave functions from dataset 1
ionmov 2 # Use BFGS algorithm
ntime 120 # Maximum number of optimization steps
optcell 2 # Fully optimize unit cell geometry, keeping symmetry
tolmxf 1.0e-6 # Convergence limit for forces as above
strfact 100 # Test convergence of stresses (Hartree/bohr^3) by
# multiplying by this factor and applying force
# convergence test

#Common input data
strtarget 0.0000d0 0.0000d0 0.0003d0
0.0000d0 0.0000d0 0.0000d0
#Starting approximation for the unit cell
acell 7.6897611419E+00 7.6897611419E+00 7.9699927278E+00 #this is a guess, with the c/a
#ratio based on ideal tetrahedral
#bond angles

rprim 1.0000000000 0.0000000000 0.0000000000
0.0000000000 1.0000000000 0.0000000000
0.0000000000 0.0000000000 1.0000000000
#Definition of the atom types and atoms
npsp 4
znucl 82 8 40 22
ntypat 3
ntypalch 1


mixalch 0.52 0.48
natom 5

typat 1 2 2 2 3

#Starting approximation for atomic positions in REDUCED coordinates
#based on ideal tetrahedral bond angles
xred 0.0000000000E+00 0.0000000000E+00 -8.8515205616E-02
5.0000000000E-01 0.0000000000E+00 5.3440017247E-01
0.0000000000E+00 5.0000000000E-01 5.3440017247E-01
5.0000000000E-01 5.0000000000E-01 1.2291109060E-02
5.0000000000E-01 5.0000000000E-01 4.6742375162E-01
#Gives the number of bands, explicitely (do not take the default)
# For an insulator (if described correctly as an
# insulator by DFT), conduction bands should not
# be included in response-function calculations

#Definition of the plane wave basis set
ecut 25 # Maximum kinetic energy cutoff (Hartree)
ecutsm 0.5 # Smoothing energy needed for lattice paramete
# optimization. This will be retained for
# consistency throughout.
pawecutdg 30
#Definition of the k-point grid
ngkpt 6 6 6 # 4x4x4 Monkhorst-Pack grid
nshiftk 1 # Use one copy of grid only (default)
shiftk 0.0 0.0 0.0 # This choice of origin for the k point grid
# preserves the hexagonal symmetry of the grid,
# which would be broken by the default choice.

#Definition of the self-consistency procedure
diemac 4.0 # Model dielectric preconditioner
nstep 300 # Maxiumum number of SCF iterations
tolvrs 1.0d-18 # Strict tolerance on (squared) residual of the
# SCF potential needed for accurate forces and
# stresses in the structural optimization, and
# accurate wave functions in the RF calculations
# enforce calculation of forces at each SCF step
optforces 1

Looking forward to your reply.
jlwindy

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: Structural optimization

Post by ebousquet » Fri Apr 26, 2019 8:13 am

Dear jlwindy,
This looks OK to me, it is all the same as to relax the ground state but adding the pressure flag.
The only comment is that you define strtargetX for each dataset (X=1, 2, 3, etc) and then you also define a general strtarget without ndtset. I would remove this general one because it could overwrite all the multidataset ones such that you will never change the pressure from dataset to dataset...
Best wishes,
Eric

jlwindy
Posts: 32
Joined: Tue Jan 08, 2019 4:11 pm

Re: Structural optimization

Post by jlwindy » Sun Apr 28, 2019 10:17 am

Dear Eric
Thank you for your reply.I find that error.Now,I was wondering whether getxred and getwfk should be -1. Whether they should be 0, but I made a calculation error when I set them to 0.

Best wishes
jlwindy

ebousquet
Posts: 469
Joined: Tue Apr 19, 2011 11:13 am
Location: University of Liege, Belgium

Re: Structural optimization

Post by ebousquet » Fri May 10, 2019 10:33 pm

Dear jlwindy,
getxred and getwfk ca be -1, if you want them to be zero then don't specify them (I guess).
Best wishes,
Eric

Locked