Skip to content

Commit

Permalink
SCF: fix up SCF_TYPE, license, efp linking and vars, remove unused he…
Browse files Browse the repository at this point in the history
…ader
  • Loading branch information
loriab committed Aug 2, 2018
1 parent d2324d5 commit f73256c
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 33 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,12 @@ before_script:
-DENABLE_libefp=ON
-DENABLE_erd=OFF
-DENABLE_gdma=ON
-DENABLE_PCMSolver=ON
-DENABLE_PCMSolver=OFF
-DENABLE_simint=ON
-DENABLE_snsmp2=OFF
-DENABLE_v2rdm_casscf=OFF
-DENABLE_PLUGIN_TESTING=ON
-DCMAKE_INSTALL_PREFIX=${TRAVIS_BUILD_DIR}/Install
-DENABLE_PLUGIN_TESTING=ON
- cd build
- ../.scripts/travis_build.sh
script:
Expand Down
2 changes: 1 addition & 1 deletion psi4/driver/procrouting/proc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4253,7 +4253,7 @@ def run_efp(name, **kwargs):
core.print_out(efpobj.geometry_summary(units_to_bohr=constants.bohr2angstroms))

# set options
# * 'chtr', 'ai_exch', 'ai_disp', 'ai_chtr' may be enabled in a future libefp release
# * 'chtr', 'qm_exch', 'qm_disp', 'qm_chtr' may be enabled in a future libefp release
efpopts = {}
for opt in ['elst', 'exch', 'ind', 'disp',
'elst_damping', 'ind_damping', 'disp_damping']:
Expand Down
28 changes: 28 additions & 0 deletions psi4/driver/procrouting/scf_proc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
#
# @BEGIN LICENSE
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
#
# This file is part of Psi4.
#
# Psi4 is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, version 3.
#
# Psi4 is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License along
# with Psi4; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#
# @END LICENSE
#

"""
A helper folder for auxiliary SCF funcitons and iterations.
"""
Expand Down
6 changes: 2 additions & 4 deletions psi4/driver/procrouting/scf_proc/efp.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
Expand Down Expand Up @@ -50,7 +50,7 @@ def get_qm_atoms_opts(mol):
coords.append(mol.z(iat))

# set options
# * 'chtr', 'ai_exch', 'ai_disp', 'ai_chtr' may be enabled in a future libefp release
# * 'chtr', 'qm_exch', 'qm_disp', 'qm_chtr' may be enabled in a future libefp release
opts = {}
for opt in ['elst', 'exch', 'ind', 'disp',
'elst_damping', 'ind_damping', 'disp_damping']:
Expand All @@ -65,8 +65,6 @@ def get_qm_atoms_opts(mol):
return ptc, coords, opts




def modify_Fock_permanent(mol, mints, verbose=1):
"""Computes array of the EFP contribution to the potential felt by
QM atoms due to permanent EFP moments. Used for SCF procedure.
Expand Down
12 changes: 5 additions & 7 deletions psi4/driver/procrouting/scf_proc/scf_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Psi4: an open-source quantum chemistry software package
#
# Copyright (c) 2007-2017 The Psi4 Developers.
# Copyright (c) 2007-2018 The Psi4 Developers.
#
# The copyrights for code used from other parties are included in
# the corresponding files.
Expand Down Expand Up @@ -61,13 +61,13 @@ def scf_compute_energy(self):
returns the SCF energy computed by finalize_energy().
"""
if core.get_option('SCF', 'DF_SCF_GUESS') and (core.get_option('SCF', 'SCF_TYPE') == 'DIRECT'):
if core.get_option('SCF', 'DF_SCF_GUESS') and (core.get_global_option('SCF_TYPE') == 'DIRECT'):
# speed up DIRECT algorithm (recomputes full (non-DF) integrals
# each iter) by first converging via fast DF iterations, then
# fully converging in fewer slow DIRECT iterations. aka Andy trick 2.0
core.print_out(" Starting with a DF guess...\n\n")
with p4util.OptionsStateCM(['SCF', 'SCF_TYPE']):
core.set_local_option('SCF', 'SCF_TYPE', 'DF')
with p4util.OptionsStateCM(['SCF_TYPE']):
core.set_global_option('SCF_TYPE', 'DF')
self.initialize()
try:
self.iterations()
Expand Down Expand Up @@ -163,7 +163,7 @@ def scf_initialize(self):

def scf_iterate(self, e_conv=None, d_conv=None):

df = core.get_option('SCF', "SCF_TYPE") == "DF"
is_dfjk = core.get_global_option('SCF_TYPE').endswith('DF')
verbose = core.get_option('SCF', "PRINT")
reference = core.get_option('SCF', "REFERENCE")

Expand All @@ -176,8 +176,6 @@ def scf_iterate(self, e_conv=None, d_conv=None):
frac_enabled = _validate_frac()
efp_enabled = hasattr(self.molecule(), 'EFP')

is_dfjk = core.get_global_option('SCF_TYPE').endswith('DF')

if self.iteration_ < 2:
core.print_out(" ==> Iterations <==\n\n")
core.print_out("%s Total Energy Delta E RMS |[F,P]|\n\n" % (" "
Expand Down
7 changes: 2 additions & 5 deletions psi4/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ set(sources_list
export_benchmarks.cc
export_blas_lapack.cc
export_cubeprop.cc
export_pcm.cc
export_diis.cc
export_fock.cc
export_functional.cc
export_mints.cc
export_misc.cc
export_oeprop.cc
export_pcm.cc
export_plugins.cc
export_diis.cc
export_psio.cc
export_trans.cc
export_wavefunction.cc
Expand All @@ -38,9 +38,6 @@ endif()
if(TARGET dkh::dkh)
target_compile_definitions(core PRIVATE $<TARGET_PROPERTY:dkh::dkh,INTERFACE_COMPILE_DEFINITIONS>)
endif()
if(TARGET libefp::efp)
target_compile_definitions(core PRIVATE $<TARGET_PROPERTY:libefp::efp,INTERFACE_COMPILE_DEFINITIONS>)
endif()
if(TARGET PCMSolver::pcm)
target_compile_definitions(core PRIVATE $<TARGET_PROPERTY:PCMSolver::pcm,INTERFACE_COMPILE_DEFINITIONS>)
endif()
Expand Down
4 changes: 2 additions & 2 deletions psi4/src/core.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ using namespace psi;
void export_benchmarks(py::module&);
void export_blas_lapack(py::module&);
void export_cubeprop(py::module&);
void export_pcm(py::module&);
void export_diis(py::module&);
void export_fock(py::module&);
void export_functional(py::module&);
void export_mints(py::module&);
void export_misc(py::module&);
void export_oeprop(py::module&);
void export_pcm(py::module&);
void export_plugins(py::module&);
void export_psio(py::module&);
void export_diis(py::module&);
void export_wavefunction(py::module&);
void export_options(py::module&);
void export_trans(py::module&);
Expand Down
2 changes: 1 addition & 1 deletion psi4/src/export_diis.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Psi4: an open-source quantum chemistry software package
*
* Copyright (c) 2007-2017 The Psi4 Developers.
* Copyright (c) 2007-2018 The Psi4 Developers.
*
* The copyrights for code used from other parties are included in
* the corresponding files.
Expand Down
2 changes: 1 addition & 1 deletion psi4/src/export_pcm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Psi4: an open-source quantum chemistry software package
*
* Copyright (c) 2007-2017 The Psi4 Developers.
* Copyright (c) 2007-2018 The Psi4 Developers.
*
* The copyrights for code used from other parties are included in
* the corresponding files.
Expand Down
2 changes: 1 addition & 1 deletion psi4/src/psi4/dfmp2/mp2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ void DFMP2::compute_opdm_and_nos(const SharedMatrix Dnosym, SharedMatrix Dso, Sh
if (symcol != nmopi_[h]) {
outfile->Printf(
"Problem determining natural orbital and density matrix symmetries.\n"
"Future calls to oeprop will not work, using this density. Try disabling symmetry.\n\n");
"Future calls to oeprop using this density will not work. Try disabling symmetry.\n\n");
occ->zero();
Cno->zero();
Dso->zero();
Expand Down
2 changes: 0 additions & 2 deletions psi4/src/psi4/libpsi4util/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "psi4/libpsi4util/PsiOutStream.h"
#include "psi4/libpsi4util/process.h"

#include <regex>

//MKL Header
#ifdef USING_LAPACK_MKL
#include <mkl.h>
Expand Down
7 changes: 1 addition & 6 deletions psi4/src/psi4/libscf_solver/hf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,7 @@ void HF::integrals() {
throw PSIEXCEPTION("GTFock was not compiled in this version.\n");
#endif
} else {

if (options_.get_str("SCF_TYPE") == "DF") {
jk_ = JK::build_JK(get_basisset("ORBITAL"), get_basisset("DF_BASIS_SCF"), options_, functional_->is_x_lrc(), effective_memory);
} else {
jk_ = JK::build_JK(get_basisset("ORBITAL"), BasisSet::zero_ao_basis_set(), options_, functional_->is_x_lrc(), effective_memory);
}
jk_ = JK::build_JK(get_basisset("ORBITAL"), get_basisset("DF_BASIS_SCF"), options_, functional_->is_x_lrc(), effective_memory);
}

// Tell the JK to print
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ foreach(test_name adc1 adc2 casscf-fzc-sp casscf-semi casscf-sa-sp ao-casscf-sp
dfomp3-grad1 dfomp3-grad2 dfomp2p5-1 dfomp2p5-2 dfomp2p5-grad1
dft-grad-lr1 dft-grad-lr2 dft-grad-lr3 dft-grad-disk
dfomp2p5-grad2 dfrasscf-sp dfscf-bz2 dft-b2plyp dft-grac dft-ghost dft-grad-meta
dft-freq dft-grad1 dft-grad2 dft-psivar dft-b3lyp dft1 dft-vv10
dft-freq dft-grad1 dft-grad2 dft-psivar dft-b3lyp dft1 dft-vv10
dft1-alt dft2 dft3 dft-omega docs-bases docs-dft extern1 extern2
fsapt1 fsapt2 fsapt-terms fsapt-allterms isapt1 isapt2
fci-dipole fci-h2o fci-h2o-2 fci-h2o-fzcv fci-tdm fci-tdm-2
Expand Down

0 comments on commit f73256c

Please sign in to comment.