Psi4 for Windows testing

Using the new Ubuntu Linux shell on Windows, we’ve successfully run Psi4 on Windows using the usual conda Linux binary. I’m posting the directions here in case anyone wants to try it out. Please post your success or failure (with description) so we can gauge how reliable the “Windows distribution” is. Thanks!

1 Like

Hi,

I managed to install the binary but I got this error during installation,

Traceback (most recent call last): File "/home/tony/psi4conda/share/psi4/python/qcdb/interface_dftd3.py", line 211, in run_dftd3 raise Dftd3Error("""Unsuccessful run. Possibly -D variant not available in dftd3 version.""") qcdb.exceptions.Dftd3Error: Unsuccessful run. Possibly -D variant not available in dftd3 version.

after installation, I tried to run the script in the sample folder and got the same error.

Is this due to the linux subsystem on windows or a glitch in the psi4 code?

That error should arise when psi4 is trying to run Grimme’s dftd3 program and is finding a pre ~May version that doesn’t have all the features psi4 can use. If you have another dftd3 in your $PATH, this is probably what’s happening. More likely, since there’s some filesys manipulations involved in running dftd3, some of those aren’t safe for Windows. So, please send me your conda list and your echo $PATH. Psi4 itself isn’t affected by this error (until you try to run a dft-d3 calc), so check this by running psi4 "$(dirname $(which psi4))"/../share/psi4/samples/sapt1/test.in or similar. Then uncomment set scf print 3 in samples/dftd3/energy/test.in and run psi4 "$(dirname $(which psi4))"/../share/psi4/samples/dftd3/energy/test.in and send me the result.

By the way, if you think it’s simply not finding the dftd3 executable, you can obtain it through conda install -c psi4 dftd3 .

1 Like

Thanks a lot for your reply. I tried to use conda to reinstall dftd3 but the error remains.

Here are some of the outputs,

conda list

tony@TONY-SKULL:~$ conda list \# packages in environment at /home/tony/psi4conda: \# chemps2 1.7.1 4 <unknown> conda 4.2.9 py27_0 conda-env 2.6.0 0 dftd3 3.2.0 7 enum34 1.1.6 py27_0 hdf5 1.8.16 0 <unknown> libgcc 4.8.5 1 <unknown> libgfortran 3.0.0 1 mkl 11.3.3 0 <unknown> ncurses 5.9 0 <unknown> nomkl 1.0 0 numpy 1.11.2 py27_nomkl_0 [nomkl] openblas 0.2.14 0 openssl 1.0.2h 1 <unknown> pcmsolver 1.1.3 1 <unknown> pip 8.1.2 py27_0 <unknown> psi4 1.0.54 py27_g8d4cec3 pychemps2 1.7.1 py27_4 <unknown> pycosat 0.6.1 py27_1 <unknown> python 2.7.12 1 <unknown> pyyaml 3.11 py27_4 <unknown> readline 6.2 2 <unknown> requests 2.10.0 py27_0 <unknown> ruamel_yaml 0.11.14 py27_0 setuptools 23.0.0 py27_0 <unknown> sqlite 3.13.0 0 <unknown> system 5.8 2 tk 8.5.18 0 <unknown> v2rdm_casscf 0.1 20 <unknown> wheel 0.29.0 py27_0 <unknown> yaml 0.1.6 0 <unknown> zlib 1.2.8 3 <unknown>

echo $PATH

tony@TONY-SKULL:~$ echo $PATH
/home/tony/psi4conda/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

sapt1

tony@TONY-SKULL:~$ psi4 "$(dirname $(which psi4))"/../share/psi4/samples/sapt1/test.in
        Nuclear Repulsion Energy..........................................PASSED
        SAPT0 Eelst.......................................................PASSED
        SAPT0 Eexch.......................................................PASSED
        SAPT0 Eind........................................................PASSED
        SAPT0 Edisp.......................................................PASSED
        SAPT0 Etotal......................................................PASSED

#uncomment set scf print 3

tony@TONY-SKULL:~$ psi4 "$(dirname $(which psi4))"/../share/psi4/samples/dftd3/energy/test.in
  -D correction from Py-side

Dftd3Error: Unsuccessful run. Possibly -D variant not available in dftd3 version.


An error has occurred python-side. Traceback (most recent call last):

  File "<string>", line 48, in <module>

  File "/home/tony/psi4conda/share/psi4/python/qcdb/interface_dftd3.py", line 211, in run_dftd3
    raise Dftd3Error("""Unsuccessful run. Possibly -D variant not available in dftd3 version.""")

Dftd3Error: Unsuccessful run. Possibly -D variant not available in dftd3 version.

I don’t see any obvious problems with your setup. Posting the output file from the “uncomment set scf print 3” run may help. It’s located either at the location you ran from or alongside the dftd3/energy/test.in . It may be, though, that I can’t diagnose remotely. In that case, thanks very much for the report– I’ll have to track down a Windows/Ubuntu installation locally. Your psi4 installation should work otherwise than dftd3.

1 Like

Here is the output,
tony@TONY-SKULL:~/psi4conda/share/psi4/samples/dftd3/energy$ cat test.out
-----------------------------------------------------------------------
Psi4: An Open-Source Ab Initio Electronic Structure Package
Psi4 1.0.54 Driver

                          Git: Rev {master} 8d4cec3 dirty

    J. M. Turney, A. C. Simmonett, R. M. Parrish, E. G. Hohenstein,
    F. A. Evangelista, J. T. Fermann, B. J. Mintz, L. A. Burns, J. J. Wilke,
    M. L. Abrams, N. J. Russ, M. L. Leininger, C. L. Janssen, E. T. Seidl,
    W. D. Allen, H. F. Schaefer, R. A. King, E. F. Valeev, C. D. Sherrill,
    and T. D. Crawford, WIREs Comput. Mol. Sci. 2, 556-565 (2012)
    (doi: 10.1002/wcms.93)

                         Additional Contributions by
    A. E. DePrince, U. Bozkaya, A. Yu. Sokolov, D. G. A. Smith, R. Di Remigio,
    R. M. Richard, J. F. Gonthier, H. R. McAlexander, M. Saitow, and
    B. P. Pritchard
    -----------------------------------------------------------------------


    Psi4 started on: Thu Oct 20 00:28:13 2016

    Process ID:   1753
    PSI4DATADIR: /home/tony/psi4conda/share/psi4
    Memory level set to 256.000 MB

  ==> Input File <==

--------------------------------------------------------------------------
#! Exercises the various DFT-D corrections, both through python directly and through c++

ref_d2         = [-0.00390110, -0.00165271, -0.00058118]  #TEST
ref_d3zero     = [-0.00285088, -0.00084340, -0.00031923]  #TEST
ref_d3bj       = [-0.00784595, -0.00394347, -0.00226683]  #TEST

ref_pbe_d2     = [-0.00278650, -0.00118051, -0.00041513]  #TEST
ref_pbe_d3zero = [-0.00175474, -0.00045421, -0.00016839]  #TEST
ref_pbe_d3bj   = [-0.00475937, -0.00235265, -0.00131239]  #TEST

memory 200 mb

molecule eneyne {
C   0.000000  -0.667578  -2.124659
C   0.000000   0.667578  -2.124659
H   0.923621  -1.232253  -2.126185
H  -0.923621  -1.232253  -2.126185
H  -0.923621   1.232253  -2.126185
H   0.923621   1.232253  -2.126185
--
C   0.000000   0.000000   2.900503
C   0.000000   0.000000   1.693240
H   0.000000   0.000000   0.627352
H   0.000000   0.000000   3.963929
}

print_stdout('  -D correction from Py-side')                      #TEST
eneyne.update_geometry()
E, G = eneyne.run_dftd3('b3lyp', 'd2gr')
compare_values(ref_d2[0], E, 7, 'Ethene-Ethyne -D2')              #TEST
mA = eneyne.extract_subsets(1)
E, G = mA.run_dftd3('b3lyp', 'd2gr')
compare_values(ref_d2[1], E, 7, 'Ethene -D2')                     #TEST
mB = eneyne.extract_subsets(2)
E, G = mB.run_dftd3('b3lyp', 'd2gr')
compare_values(ref_d2[2], E, 7, 'Ethyne -D2')                     #TEST
#mBcp = eneyne.extract_subsets(2,1)                               #TEST
#E, G = mBcp.run_dftd3('b3lyp', 'd2gr')                           #TEST
#compare_values(ref_d2[2], E, 7, 'Ethyne(CP) -D2')                #TEST

E, G = eneyne.run_dftd3('b3lyp', 'd3zero')
compare_values(ref_d3zero[0], E, 7, 'Ethene-Ethyne -D3 (zero)')   #TEST
mA = eneyne.extract_subsets(1)
E, G = mA.run_dftd3('b3lyp', 'd3zero')
compare_values(ref_d3zero[1], E, 7, 'Ethene -D3 (zero)')          #TEST
mB = eneyne.extract_subsets(2)
E, G = mB.run_dftd3('b3lyp', 'd3zero')
compare_values(ref_d3zero[2], E, 7, 'Ethyne -D3 (zero)')          #TEST

E, G = eneyne.run_dftd3('b3lyp', 'd3bj')
compare_values(ref_d3bj[0], E, 7, 'Ethene-Ethyne -D3 (bj)')       #TEST
mA = eneyne.extract_subsets(1)
E, G = mA.run_dftd3('b3lyp', 'd3bj')
compare_values(ref_d3bj[1], E, 7, 'Ethene -D3 (bj)')              #TEST
mB = eneyne.extract_subsets(2)
E, G = mB.run_dftd3('b3lyp', 'd3bj')
compare_values(ref_d3bj[2], E, 7, 'Ethyne -D3 (bj)')              #TEST

E, G = eneyne.run_dftd3('b3lyp', 'd3')
compare_values(ref_d3zero[0], E, 7, 'Ethene-Ethyne -D3 (alias)')  #TEST
E, G = eneyne.run_dftd3('b3lyp', 'd')
compare_values(ref_d2[0], E, 7, 'Ethene-Ethyne -D (alias)')       #TEST
E, G = eneyne.run_dftd3('b3lyp', 'd2')
compare_values(ref_d2[0], E, 7, 'Ethene-Ethyne -D2 (alias)')      #TEST

set basis sto-3g
set scf_type df
set dft_radial_points 50  # use really bad grid for speed since all we want is the -D value
set dft_spherical_points 110
set scf print 3  # will print dftd3 program output to psi4 output file


print_stdout('  -D correction from C-side')                                                                         #TES
T
activate(mA)
energy('b3lyp-d2p4')
compare_values(ref_d2[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (calling psi4 Disp class)')  #TES
T
energy('b3lyp-d2gr')
compare_values(ref_d2[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (calling dftd3 -old)')       #TES
T
energy('b3lyp-d3zero')
compare_values(ref_d3zero[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (calling dftd3 -zero)')  #TES
T
energy('b3lyp-d3bj')
compare_values(ref_d3bj[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (calling dftd3 -bj)')      #TES
T

energy('b3lyp-d2')
compare_values(ref_d2[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (alias)')                    #TES
T
energy('b3lyp-d3')
compare_values(ref_d3zero[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (alias)')                #TES
T
energy('b3lyp-d')
compare_values(ref_d2[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D (alias)')                     #TES
T
energy('wb97x-d')
compare_values(-0.000834247063, get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene wb97x-d (chg)')            #TES
T

print_stdout('  non-default -D correction from C-side')
#TEST
activate(mB)
set dft_dispersion_parameters [0.75]
energy('b3lyp-d2p4')
compare_values(ref_pbe_d2[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (calling psi4 Disp class)')
#TEST
set dft_dispersion_parameters [0.75, 20.0]
energy('b3lyp-d2gr')
compare_values(ref_pbe_d2[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (calling dftd3 -old)')
#TEST
set dft_dispersion_parameters [1.0,  0.722, 1.217, 14.0]
energy('b3lyp-d3zero')
compare_values(ref_pbe_d3zero[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (calling dftd3 -zero)')
#TEST
set dft_dispersion_parameters [1.000, 0.7875, 0.4289, 4.4407]
energy('b3lyp-d3bj')
compare_values(ref_pbe_d3bj[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (calling dftd3 -bj)')
#TEST

set dft_dispersion_parameters [0.75]
energy('b3lyp-d2')
compare_values(ref_pbe_d2[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2 (alias)')
#TEST
set dft_dispersion_parameters [1.0,  0.722, 1.217, 14.0]
energy('b3lyp-d3')
compare_values(ref_pbe_d3zero[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (alias)')
#TEST
set dft_dispersion_parameters [0.75]
energy('b3lyp-d')
compare_values(ref_pbe_d2[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D (alias)')
#TEST
activate(mA)
set dft_dispersion_parameters [1.0]
energy('wb97x-d')
compare_values(-0.000834247063, get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene wb97x-d (chg)')
#TEST

print_stdout('  non-default -D correction from Py-side')                                                         #TEST
eneyne.update_geometry()
eneyne.run_dftd3('b3lyp', 'd2gr', {'s6': 0.75})
compare_values(ref_pbe_d2[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D2')              #TEST
mA = eneyne.extract_subsets(1)
mA.run_dftd3('b3lyp', 'd2gr', {'s6': 0.75})
compare_values(ref_pbe_d2[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D2')                     #TEST
mB = eneyne.extract_subsets(2)
mB.run_dftd3('b3lyp', 'd2gr', {'s6': 0.75})
compare_values(ref_pbe_d2[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethyne -D2')                     #TEST

eneyne.run_dftd3('b3lyp', 'd3zero', {'s6': 1.0,  's8': 0.722, 'sr6': 1.217, 'alpha6': 14.0})
compare_values(ref_pbe_d3zero[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D3 (zero)')   #TEST
mA = eneyne.extract_subsets(1)
mA.run_dftd3('b3lyp', 'd3zero', {'s6': 1.0,  's8': 0.722, 'sr6': 1.217, 'alpha6': 14.0})
compare_values(ref_pbe_d3zero[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (zero)')          #TEST
mB = eneyne.extract_subsets(2)
mB.run_dftd3('b3lyp', 'd3zero', {'s6': 1.0,  's8': 0.722, 'sr6': 1.217, 'alpha6': 14.0})
compare_values(ref_pbe_d3zero[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethyne -D3 (zero)')          #TEST

eneyne.run_dftd3('b3lyp', 'd3bj', {'s6': 1.000, 's8':  0.7875, 'a1':  0.4289, 'a2': 4.4407})
compare_values(ref_pbe_d3bj[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D3 (bj)')       #TEST
mA = eneyne.extract_subsets(1)
mA.run_dftd3('b3lyp', 'd3bj', {'s6': 1.000, 's8':  0.7875, 'a1':  0.4289, 'a2': 4.4407})
compare_values(ref_pbe_d3bj[1], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene -D3 (bj)')              #TEST
mB = eneyne.extract_subsets(2)
mB.run_dftd3('b3lyp', 'd3bj', {'s6': 1.000, 's8':  0.7875, 'a1':  0.4289, 'a2': 4.4407})
compare_values(ref_pbe_d3bj[2], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethyne -D3 (bj)')              #TEST

eneyne.run_dftd3('b3lyp', 'd3', {'s6': 1.0,  's8': 0.722, 'sr6': 1.217, 'alpha6': 14.0})
compare_values(ref_pbe_d3zero[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D3 (alias)')  #TEST
eneyne.run_dftd3('b3lyp', 'd', {'s6': 0.75})
compare_values(ref_pbe_d2[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D (alias)')       #TEST
eneyne.run_dftd3('b3lyp', 'd2', {'s6': 0.75})
compare_values(ref_pbe_d2[0], get_variable('DISPERSION CORRECTION ENERGY'), 7, 'Ethene-Ethyne -D2 (alias)')      #TEST

--------------------------------------------------------------------------
/home/tony/psi4conda/lib/python2.7/site-packages/v2rdm_casscf/v2rdm_casscf.so loaded.

  Memory set to 200.000 MiB by Python script.
An error has occurred python-side. Traceback (most recent call last):

  File "<string>", line 48, in <module>

  File "/home/tony/psi4conda/share/psi4/python/qcdb/interface_dftd3.py", line 211, in run_dftd3
    raise Dftd3Error("""Unsuccessful run. Possibly -D variant not available in dftd3 version.""")

Dftd3Error: Unsuccessful run. Possibly -D variant not available in dftd3 version.

Again, thanks for yout help.