PSPW code seems to be completely broken


Click here for full thread
Clicked A Few Times
Could you please comment on the input below. This is our production system, which is optimized perfectly fine in espresso, but fails in nwchem regardless of what we do. It either produces NaN during optimization or the layer of MoS2 explodes and flies apart. This behavior seems to be completely inconsistent and random.

title "MoS2 optimization"
echo
 
scratch_dir ./scratch
permanent_dir ./perm
 
start cell1
 
memory heap 6000 mb
#memory stack 5000 mb
 
#**** Enter the geometry using fractional coordinates ****
geometry center noautosym noautoz print units angstrom
system surface
   lat_a 9.495
   lat_b 9.495
   lat_c 24.4
   alpha 90.00 
   beta  90.00 
   gamma 60.00
 end

Mo   0.97211   0.22304   10.952
 S   0.97217   0.41542    9.490
 S   0.97217   0.41542   12.336
Mo   0.97216   0.55637   10.952
 S   0.97222   0.74876    9.490
 S   0.97222   0.74876   12.336
Mo   0.97210   0.88971   10.952
 S   0.97217   0.08210    9.490
 S   0.97217   0.08210   12.336
Mo   0.30544   0.22304   10.952
 S   0.30551   0.41542    9.490
 S   0.30551   0.41542   12.336
Mo   0.30549   0.55637   10.952
 S   0.30556   0.74876    9.490
 S   0.30556   0.74876   12.336
Mo   0.30544   0.88971   10.952
 S   0.30550   0.08210    9.490
 S   0.30550   0.08210   12.336
Mo   0.63877   0.22304   10.952
 S   0.63884   0.41542    9.490
 S   0.63884   0.41542   12.336
Mo   0.63882   0.55637   10.952
 S   0.63878   0.74876    9.490
 S   0.63878   0.74876   12.336
Mo   0.63877   0.88971   10.952
 S   0.63883   0.08210    9.490
 S   0.63883   0.08210   12.336

# cb
 C   0.29896   0.70972    3.974
 C   0.33903   0.76627    5.122
 C   0.41945   0.85505    5.008
 C   0.45993   0.88740    3.747
 C   0.42005   0.83109    2.599
 C   0.33949   0.74219    2.712
Cl   0.19815   0.59833    4.116
 H   0.30790   0.74134    6.099
 H   0.45044   0.89859    5.895
 H   0.52216   0.95611    3.659
 H   0.45134   0.85614    1.623
 H   0.30885   0.69878    1.821

end
 
nwpw 
  SIMULATION_CELL
    ngrid 32 32 32
  end

  ewald_rcut 3.0
  ewald_ncut 8 #The default value of 1 needs to be increased for small cells to 8
  
  #lmbfgs
  #xc pbe96
end
 
driver 
  clear 
  maxiter 10000
end

#set nwpw:cif_filename mos2-surf.opt  # create a CIF file containing optimization history 
#set includestress .true.           # this option tells driver to optimize the unit cell

# For point charges
#set pspw_APC:Gc 2.5
#set pspw_APC:nga 3
#set pspw_APC:gamma 0.6 0.9 1.35

task pspw energy #optimize