shankar1729 / jdftx

JDFTx: software for joint density functional theory
http://jdftx.org
84 stars 54 forks source link

Slab optimization error when fixing the bottom atoms #97

Closed Bobjnu closed 5 years ago

Bobjnu commented 5 years ago

Hi Shankar, I constructed a slab structural model for the Pt(111) surface, which consists of five layers of Pt atoms. As we always did in VASP or other DFT-pakage calculations, I fixed the bottom two layers of atoms and relaxed the top three layers. But the calculation crashed with the following error:

"Species Pt atoms 0 and 9 are related by symmetry but have different move scale factors or inconsistent move constraints."

The lattice and ion position information are: lattice \ 9.020731691709324 -5.208121870495770 -0.000000000000000 \ 0.000000000000000 10.416243740991529 0.000000000000000 \ 0.000000000000000 0.000000000000000 45.355546826147418

ion Pt 0.333333333333334 0.666666666666667 0.041664719471602 0 ion Pt 0.000000000000000 0.000000000000000 0.135422021453092 0 ion Pt 0.666666666666666 0.333333333333333 0.229179323434582 1 ion Pt 0.3333333333333333 0.6666666666666667 0.3229366254160725 1 ion Pt 0.0000000000000000 0.0000000000000000 0.4166939273975623 1 ion Pt 0.3333333333333333 0.1666666666666670 0.0416647194716028 0 ion Pt 0.0000000000000000 0.5000000000000000 0.1354220214530927 0 ion Pt 0.6666666666666667 0.8333333333333335 0.2291793234345825 1 ion Pt 0.3333333333333333 0.1666666666666667 0.3229366254160725 1 ion Pt 0.0000000000000000 0.5000000000000000 0.4166939273975623 1 ion Pt 0.8333333333333333 0.1666666666666670 0.0416647194716028 0 ion Pt 0.4999999999999999 0.5000000000000000 0.1354220214530927 0 ion Pt 0.1666666666666667 0.8333333333333330 0.2291793234345826 1 ion Pt 0.8333333333333334 0.1666666666666672 0.3229366254160725 1 ion Pt 0.5000000000000000 0.5000000000000002 0.4166939273975623 1 ion Pt 0.8333333333333333 0.6666666666666672 0.0416647194716027 0 ion Pt 0.5000000000000000 0.0000000000000007 0.1354220214530927 0 ion Pt 0.1666666666666667 0.3333333333333335 0.2291793234345826 1 ion Pt 0.8333333333333333 0.6666666666666669 0.3229366254160724 1 ion Pt 0.5000000000000000 0.0000000000000004 0.4166939273975623 1

The input file is: include Pt.lattice include Pt.ionpos kpoint-folding 5 5 1 ion-species GBRV/$ID_pbe.uspp elec-cutoff 12 60 ionic-minimize \ nIterations 200 \ energyDiffThreshold 3e-06 \ knormThreshold 1e-4 electronic-minimize \ energyDiffThreshold 1e-06 \ wolfeEnergy 0.0002 \ nIterations 100 dump-name Pt.$VAR dump end State Lattice IonicPositions

Does this mean that I could not do this kind of bottom-fixed calculation? Of course, I can relax the top and bottom of the slab with the middle layers fixed, but this increases the computational cost because more layers are needed. How should I do for this problem? Thank you!

shankar1729 commented 5 years ago

There are two ways you can address this:

  1. Remove the top-down symmetry of the slab by making the spacing of the layers slightly different for the free top surface layer. Once you do optimization, this would happen anyway and break the symmetry. The error that jdftx produces is to ensure that the symmetry is either there or not there throughout, and does not change as a function of ionic optimization. So just give a more realistic starting condition with the free surface layer slightly closer to the layer below (typical case for surface layers of metals) compared to the bulk spacing. Also note that any adsorbates on one surface will also break the symmetry and you won't need to worry about this issue.

  2. Specify symmetries manually and remove symmetry matrices that take z -> -z. This is more complex though, and I would not recommend it unless the first approach fails.

Best, Shankar