Convergence problem with tiny molecule


Just Got Here
Hi! I'm pretty new to computational chemistry. I'm trying to solve a tiny crystal of Titanium nitride which fails to converge..

I'd be glad to post the full output here, but I've only added a tiny portion here. Any insight appreciated.. Thanks in advance..
The input deck is
echo

restart molecule
memory 4000 mw

title "Base test for TiN"

charge 0

geometry units angstroms print xyz
  N 0.000 0.000 0.000
 Ti 0.000 0.000 2.053
  N 0.000 2.053 2.053
 Ti 0.000 2.053 0.000
 Ti 2.053 0.000 0.000
  N 2.053 0.000 2.053
 Ti 2.053 2.053 2.053
  N 2.053 2.053 0.000
end

basis
 * library 6-31G*
end


task scf optimize
~                    


it ends up with noticeable problems

here...

                NWChem Input Module
                                -------------------


                                 Base test for TiN
                                 -----------------

 Scaling coordinates for geometry "geometry" by  1.889725989
 (inverse scale =  0.529177249)

  WARNING: autosym failed! 

          ------
          auto-z
          ------
  autoz: excessive number of variables                   312                   18

 AUTOZ failed to generate good internal coordinates.
 Cartesian coordinates will be used in optimizations.



here,

#quartets = 2.865D+06 #integrals = 1.742D+08 #direct =  0.0% #cached =100.0%


File balance: exchanges=     9  moved=   126  time=   0.0


              iter       energy          gnorm     gmax       time
             ----- ------------------- --------- --------- --------
                 1    -3611.0127873989  3.27D-02  2.76D-03     10.0
  ga_iter_lsolve: convergence stagnant ... aborting solve

 Disabled NR: increased maxiter to  40

                 2    -3611.0128589916  1.53D-02  2.41D-03     16.5
                 3    -3611.0129153319  2.23D-02  2.48D-03     18.3
                 4    -***************  2.27D-02  2.21D-03     20.2
                 5    -3611.0131005953  2.95D-02  2.26D-03     22.1
                 6    -3611.0132604816  3.72D-02  5.25D-03     23.9
                 7    -3611.0135057812  4.73D-02  4.67D-03     26.1
                 8    -3611.0140033884  7.32D-02  7.09D-03     28.1
                 9    -3611.0144080019  4.50D-02  4.66D-03     29.1
                10    -3611.0149139866  5.02D-02  3.87D-03     31.1
                11    -3611.0151837735  3.65D-02  4.53D-03     32.1
                12    -3611.0154382734  4.22D-02  4.24D-03     34.1
                13    -3611.0156509728  4.53D-02  4.05D-03     35.1
                14    -3611.0159550975  4.94D-02  4.24D-03     37.1
                15    -3611.0163239377  6.48D-02  5.27D-03     39.1
                16    -3611.0167088673  5.12D-02  3.57D-03     41.2
                17    -3611.0170517737  4.84D-02  3.61D-03     43.1
                18    -3611.0172972597  4.39D-02  4.15D-03     45.0
                19    -3611.0175607504  3.92D-02  3.44D-03     47.0
                20    -3611.0177757784  3.39D-02  2.95D-03     49.0
                21    -3611.0179212532  3.28D-02  3.04D-03     50.9
                22    -3611.0181047710  3.54D-02  3.65D-03     52.8
                23    -***************  3.44D-02  3.19D-03     54.9
                24    -3611.0183983684  2.41D-02  2.34D-03     55.8
                25    -3611.0184835141  2.50D-02  2.96D-03     57.7
                26    -3611.0185633248  2.41D-02  2.43D-03     58.7
                27    -3611.0186204888  1.95D-02  1.68D-03     60.8
                28    -3611.0186737605  2.58D-02  2.67D-03     62.7
                29    -3611.0187208995  1.87D-02  1.53D-03     64.7
                30    -3611.0187506432  1.52D-02  1.54D-03     66.6
                31    -3611.0187699380  1.21D-02  8.77D-04     68.5
                32    -3611.0187807574  8.19D-03  6.84D-04     70.5
                33    -3611.0187879746  7.58D-03  8.32D-04     71.4
                34    -3611.0187930970  6.08D-03  4.72D-04     73.3
                35    -3611.0187971029  7.77D-03  8.64D-04     75.2
                36    -3611.0188019051  5.76D-03  4.27D-04     77.2
                37    -3611.0188046640  4.39D-03  3.22D-04     78.2
                38    -3611.0188070262  4.16D-03  3.78D-04     80.2
                39    -3611.0188089719  3.98D-03  2.70D-04     82.2
                40    -3611.0188104442  3.63D-03  3.43D-04     84.1

      Calculation failed to converge
      ------------------------------





and
Mulliken analysis of the total density
  --------------------------------------

    Atom       Charge   Shell Charges
 -----------   ------   -------------------------------------------------------
    1 N    7     8.18   2.00  0.75  2.19  1.17  2.09 -0.01
    2 Ti  22    20.93   2.00  2.00  6.00  2.04  6.04  0.09  0.41  0.10  0.13  1.05  1.09 -0.03
    3 N    7     7.93   2.00  0.79  2.10  1.15  1.90 -0.01
    4 Ti  22    20.93   2.00  2.00  6.00  2.04  6.04  0.09  0.41  0.10  0.13  1.05  1.09 -0.03
    5 Ti  22    20.73   2.00  2.00  6.00  2.10  6.10  0.14  0.34  0.27 -0.03  0.77  1.14 -0.08
    6 N    7     8.18   2.00  0.75  2.19  1.17  2.09 -0.01
    7 Ti  22    20.94   2.00  2.00  6.00  2.04  6.04  0.09  0.42  0.11  0.13  1.05  1.09 -0.04
    8 N    7     8.18   2.00  0.75  2.19  1.17  2.09 -0.01

       Multipole analysis of the density wrt the origin
       ------------------------------------------------

     L   x y z        total         open         nuclear
     -   - - -        -----         ----         -------
     0   0 0 0     -0.000000      0.000000    116.000000

     1   1 0 0     -0.035001      0.000000      0.000000
     1   0 1 0      0.091786      0.000000      0.000000
     1   0 0 1      0.076219      0.000000      0.000000

     2   2 0 0    -63.918580      0.000000    436.489266
     2   1 1 0     -5.961029      0.000000      0.000000
     2   1 0 1     -5.895635      0.000000     -0.000000
     2   0 2 0    -64.033200      0.000000    436.489266
     2   0 1 1      6.168750      0.000000      0.000000
     2   0 0 2    -64.011313      0.000000    436.489266


 Parallel integral file used    3992 records with       0 large values

 scf_gradient: scf energy failed        0
 ------------------------------------------------------------------------
 scf_gradient: scf energy failed        0
 ------------------------------------------------------------------------
 scf_gradient: scf energy failed        0
 ------------------------------------------------------------------------
 This type of error is most commonly associated with calculations not reaching convergence criteria
 ------------------------------------------------------------------------
 scf_gradient: scf energy failed        0

Forum Vet
The convergence problems you are facing are due to broken symmetry issue. What make things worse is that NWChem fails to detect the Td symmetry present in your molecule.
Here is a modified input that will get to convergence. The main changes are
1) Molecule rotated to make NWChem detect the Td symmetry
2) molecular orbital swap to prevent symmetry breaking

start molecule

title "Base test for TiN"

charge 0

geometry units angstroms print xyz
 N         1.02650   1.02650  -1.02650
Ti         1.02650   1.02650   1.02650
 N         1.02650  -1.02650   1.02650
Ti         1.02650  -1.02650  -1.02650
Ti        -1.02650   1.02650  -1.02650
 N        -1.02650   1.02650   1.02650
Ti        -1.02650  -1.02650   1.02650
 N        -1.02650  -1.02650  -1.02650
end

basis
 * library 6-31G*
end
scf
vectors input atomic swap 63 58
end

task scf optimize

Just Got Here
Wow! Thanks! it did work! I'm clueless of the magic numbers 63 and 58, though.. What should I do to make a bigger crystal? think I have a lot to learn!

Forum Vet
Quote:Acorreya Dec 10th 12:52 am
Wow! Thanks! it did work! I'm clueless of the magic numbers 63 and 58, though.. What should I do to make a bigger crystal? think I have a lot to learn!


I have extracted the magic number 63 and 58 after analyzing the following ouput (generated without the 63-58 swap line)
 HOMO         =      -0.047524
 LUMO         =      -0.047524


 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 Warning - the HOMO and LUMO are degenerate and you are using symmetry.
 This can lead to non-variational energies and poor convergence.
 Modify the initial guess, or use an open-shell wavefunction, or turn
 off symmetry.
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


      Symmetry analysis of molecular orbitals - initial
      -------------------------------------------------

  Numbering of irreducible representations:

     1 a1          2 a2          3 e           4 t1          5 t2

  Orbital symmetries:

     1 a1          2 t2          3 t2          4 t2          5 a1
     6 t2          7 t2          8 t2          9 a1         10 t2
    11 t2         12 t2         13 t2         14 t2         15 t2
    16 t1         17 t1         18 t1         19 e          20 e
    21 a1         22 t2         23 t2         24 t2         25 a1
    26 t2         27 t2         28 t2         29 a1         30 t2
    31 t2         32 t2         33 e          34 e          35 t2
    36 t2         37 t2         38 t1         39 t1         40 t1
    41 a1         42 t2         43 t2         44 t2         45 a1
    46 t2         47 t2         48 t2         49 e          50 e
    51 t1         52 t1         53 t1         54 t2         55 t2
    56 t2         57 a1         58 t2         59 t2         60 t2
    61 e          62 e          63 a1         64 e          65 e
    66 t2         67 t2         68 t2


 Starting SCF solution at       3.5s


Things to notice in the output:
1) The Warning line tells you that the HOMO and LUMO molecular orbitals are degenerate because of symmetry
2) Next, you need to browse through the "Orbital symmetries" analysis. You have 58 filled orbitals, therefore you need to find -- among the unoccupied orbitals (i.e. the ones number 59 and higher) -- an orbital that avoids the symmetry breaking (i.e. one electron being shared between HOMO and LUMO of the same symmetry). 63 is the first orbital -- with symmetry a1 -- that fits the description

Just Got Here
Thank you very much! I have never been in a forum that gets admin replies so quick! I think I'll be back when I'm doing a bigger crystal.

Thank you again.

Forum Vet
Dear Dr. Edoapra
  Your input makes the run converge at the 4th step, and a 3-core run gives


     Optimization converged
----------------------


 Step       Energy      Delta E   Gmax     Grms     Xrms     Xmax   Walltime
---- ---------------- -------- -------- -------- -------- -------- --------
@ 4 -3610.93303786 -2.1D-07 0.00000 0.00000 0.00020 0.00027 146.2
                                    ok       ok       ok       ok


Forum >> NWChem's corner >> Running NWChem