Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Multicomponent Hartree-Fock calculations don't work #18

@susilehtola

Description

@susilehtola

Hi,

I tried to run some multicomponent HF calculations with nAPMO but I found the code does not work. For example, the following input

molecule [e-:0]{
H_1          0.00000        0.75545       -0.47116
H          0.00000       -0.75545       -0.47116
O          0.00000        0.00000        0.11779
}

basis {
   e- STO-3G
   H_1 DZSNB
}

scf {
    hf
    numeric
    aux_basis
    aux_basis_ldep = 1.0e-7
    aux_basis_lmax = 1
}

grid {
    e- [100, 110]
    H_1 [100, 110]
}

crashes with the error

$ python3 ../bin/napmo h2o.numeric.inp
/home/work/nAPMO/samples/../bin/napmo:51: SyntaxWarning: invalid escape sequence '\ '
  """

==================================================
      _______ _______ ______ _______ _______
     |    |  |   _   |   __ \   |   |       |
     |       |       |    __/       |   -   |
     |__|____|___|___|___|  |__|_|__|_______|

         NAPMO QUANTUM CHEMISTRY PACKAGE

Posada E. F. Reyes A.
Temple University
International Centre for Theoretical Physics
National University of Colombia
                                              2021
[email protected]
--------------------------------------------------

NAPMO is working with the following input file:
# Molecule definition:

molecule [e-:0]{
H_1          0.00000        0.75545       -0.47116
H          0.00000       -0.75545       -0.47116
O          0.00000        0.00000        0.11779
}

basis {
   e- STO-3G
   H_1 DZSNB
}

scf {
    hf
    numeric
    aux_basis
    aux_basis_ldep = 1.0e-7
    aux_basis_lmax = 1
}

grid {
    e- [100, 110]
    H_1 [100, 110]
}



==================================================
Object: MolecularSystem
--------------------------------------------------

Symbol  N            origin(BOHR)          Basis    
--------------------------------------------------
H_1     1   0.000000   1.427593  -0.890363 DZSNB      
H       1   0.000000   1.427593  -0.890363 STO-3G     
H       1   0.000000  -1.427593  -0.890363 STO-3G     
O       8   0.000000   0.000000   0.222591 STO-3G     
--------------------------------------------------
==================================================
Object: BasisSet        Particle: O        
--------------------------------------------------
Name: STO-3G    Length:     5

  l            zeta         Coeff         Norma
  ------------------------------------------------
  s       130.709321       0.154329      27.551168
  s        23.808866       0.535328       7.681820
  s         6.443608       0.444635       2.882418

  s         5.033151      -0.099967       2.394915
  s         1.169596       0.399513       0.801562
  s         0.380389       0.700115       0.345208

  p         5.033151       0.155916      10.745833
  p         1.169596       0.607684       1.733744
  p         0.380389       0.391957       0.425819
--------------------------------------------------
==================================================
Object: BasisSet        Particle: H        
--------------------------------------------------
Name: STO-3G    Length:     1

  l            zeta         Coeff         Norma
  ------------------------------------------------
  s         3.425251       0.154329       1.794442
  s         0.623914       0.535328       0.500326
  s         0.168855       0.444635       0.187735
--------------------------------------------------
==================================================
Object: BasisSet        Particle: H_1      
--------------------------------------------------
Name: DZSNB     Length:     2

  l            zeta         Coeff         Norma
  ------------------------------------------------
  s        29.292661       1.000000       8.973858

  s        20.175831       1.000000       6.784747
--------------------------------------------------

Charges description:

Symbol  Charge  Multi 
-----------------------
H_1     0       0     
e-      0       1     
-----------------------
e-alpha: 5   e-beta: 5  

--------------------------------------------------

SCF setup:

Method:      rhf       
Kind:        numeric   
Direct:      False     
E Tol:       1.000e-07 
Dens Tol:    1.000e-07 
E Tol NUM:   1.000e-07 

Point charges energy: 4.41949152  

Starting Multi SCF Calculation...

Iter    Energy        Total E     Delta(E)
1     -79.3161108  -74.8966193  -74.8966193
2     -79.3394840  -74.9199925   -0.0233732
3     -79.3405382  -74.9210467   -0.0010542
4     -79.3406324  -74.9211409   -0.0000943
5     -79.3406467  -74.9211552   -0.0000142
6     -79.3406491  -74.9211576   -0.0000024
7     -79.3406496  -74.9211580   -0.0000004
8     -79.3406496  -74.9211581   -0.0000001
Traceback (most recent call last):
  File "/home/work/nAPMO/samples/../bin/napmo", line 105, in <module>
    system.solve()
    ~~~~~~~~~~~~^^
  File "/home/work/nAPMO/build/lib.linux-x86_64-cpython-313/napmo/system/napmo_system.py", line 93, in solve
    self.solver = method(self.system, options=self.data.scf)
                  ~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/work/nAPMO/build/lib.linux-x86_64-cpython-313/napmo/solver/hf_solver.py", line 96, in __init__
    if isinstance(electronic_grid, napmo.BeckeGrid):
                  ^^^^^^^^^^^^^^^
UnboundLocalError: cannot access local variable 'electronic_grid' where it is not associated with a value

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions