shankar1729 / jdftx

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

Forces not working properly when using slabs too thick #348

Open cam559 opened 1 month ago

cam559 commented 1 month ago

I've been trying to calculate some properties of a metallic interface (Nb/Ta), every time I run the calculation with a high number of atoms (48 total) the forces look something like this:

`# Forces in Lattice coordinates: force Nb 0.000000000000000 0.000000000000000 28751.819314407683123 0 force Nb 0.000000000000000 0.000000000000000 46171.116472006462573 1 force Nb 0.000000000000000 -0.000000000000000 58874.832161463680677 1 force Nb 0.000000000000000 0.000000000000000 67574.246283973756363 1 force Nb 0.000000000000000 -0.000000000000000 77395.338443646745873 1 force Nb 0.000000000000000 0.000000000000000 47961.315487052823300 1 force Nb 0.000000000000000 -0.000000000000000 -17348.499521483390708 1 force Nb 0.000000000000000 0.000000000000000 -73409.661623366861022 1 force Nb 0.000000000000000 0.000000000000000 -76336.371243756817421 1 force Nb 0.000000000000000 0.000000000000000 -57708.825133711274248 1 force Nb 0.000000000000000 0.000000000000000 -58188.822850378484873 1 force Nb 0.000000000000000 -0.000000000000000 -38949.988740276858152 1 force Nb 0.000000000000000 -0.000000000000000 38979.923003945601522 1 force Nb 0.000000000000000 0.000000000000000 58187.638195714549511 1 force Nb 0.000000000000000 -0.000000000000000 57620.822109505432309 1 force Nb 0.000000000000000 0.000000000000000 76340.532879638223676 1 force Nb 0.000000000000000 0.000000000000000 73449.038382159691537 1 force Nb 0.000000000000000 0.000000000000000 17335.011084017209214 1 force Nb 0.000000000000000 -0.000000000000000 -47919.350254474564281 1 force Nb 0.000000000000000 0.000000000000000 -77368.542639859049814 1 force Nb 0.000000000000000 -0.000000000000000 -67633.017691133747576 1 force Nb 0.000000000000000 -0.000000000000000 -58900.226981341264036 1 force Nb 0.000000000000000 0.000000000000000 -46141.308120547291765 1 force Nb 0.000000000000000 0.000000000000000 -28779.295353140980296 1 force Ta 0.000000000000000 0.000000000000000 -1327.125627082751635 1 force Ta 0.000000000000000 0.000000000000000 1331.162125288017023 1 force Ta 0.000000000000000 0.000000000000000 4599.821065833293687 1 force Ta 0.000000000000000 -0.000000000000000 10064.205810928247956 1 force Ta 0.000000000000000 -0.000000000000000 9791.886937015642616 1 force Ta 0.000000000000000 -0.000000000000000 4780.769016837569325 1 force Ta 0.000000000000000 0.000000000000000 -1630.199012004271935 1 force Ta 0.000000000000000 0.000000000000000 -7593.209177953922335 1 force Ta 0.000000000000000 -0.000000000000000 -10908.208369088335530 1 force Ta 0.000000000000000 -0.000000000000000 -7605.483534517090447 1 force Ta 0.000000000000000 -0.000000000000000 -1266.316369958987934 1 force Ta 0.000000000000000 -0.000000000000000 -6587.970844243500324 1 force Ta 0.000000000000000 0.000000000000000 6790.901093227559613 1 force Ta 0.000000000000000 0.000000000000000 1284.764938337779995 1 force Ta 0.000000000000000 0.000000000000000 7618.552984461792221 1 force Ta 0.000000000000000 -0.000000000000000 10906.112431508054215 1 force Ta 0.000000000000000 0.000000000000000 7590.159416074802721 1 force Ta 0.000000000000000 0.000000000000000 1628.936370971757015 1 force Ta 0.000000000000000 0.000000000000000 -4778.446134244384666 1 force Ta 0.000000000000000 0.000000000000000 -9795.232561292594255 1 force Ta 0.000000000000000 -0.000000000000000 -10048.144259401851741 1 force Ta 0.000000000000000 0.000000000000000 -4619.416305135289804 1 force Ta 0.000000000000000 0.000000000000000 -1284.571681228442003 1 force Ta 0.000000000000000 -0.000000000000000 1050.468447986115734 1

Energy components:

Eewald = -2388.1864576352436416 EH = 100381.4164926642260980 Eloc = -49.6876873786794775 Enl = -14.6899515677200512 Exc = -801.8807122174267761 Exc_core = 331.0847044283245282 KE = 3374.7417498828672251

 Etot =   100832.7981381763529498
   TS =        0.0015957437105255

    F =   100832.7965424326393986`

I don't see this issue when using only 1 atomic species or when reducing the number of atoms by half. I'm not using coulomb truncation as the interface is repeating itself periodically. Any idea why is this happening?

shankar1729 commented 1 month ago

Check the electronic minimize / SCF convergence - perhaps that is failing for the larger slabs and hence the forces are so large?