Commit d5261b28 authored by Lixin Lu's avatar Lixin Lu Committed by Andrew Wildman
Browse files

Add ROHF functionality

parent 9e72a9fc
......@@ -59,6 +59,12 @@ namespace ChronusQ {
// Compute the gradient
virtual void getGrad() {}
// Pointer convertor
template <typename MatsU>
static std::shared_ptr<FockBuilder<MatsU,IntsT>>
convert(const std::shared_ptr<FockBuilder<MatsT,IntsT>>&);
};
}
......
......@@ -26,6 +26,9 @@
#include <fockbuilder.hpp>
#include <util/time.hpp>
#include <cqlinalg.hpp>
#include <fockbuilder/rofock/impl.hpp>
#include <typeinfo>
namespace ChronusQ {
......@@ -174,4 +177,30 @@ namespace ChronusQ {
#endif
}
/**
* \brief The pointer convertor. This static function converts
* the underlying polymorphism correctly to hold a different
* type of matrices. It is called when the corresponding
* SingleSlater object is being converted.
*/
template <typename MatsT, typename IntsT>
template <typename MatsU>
std::shared_ptr<FockBuilder<MatsU,IntsT>>
FockBuilder<MatsT,IntsT>::convert(const std::shared_ptr<FockBuilder<MatsT,IntsT>>& fb) {
if (not fb) return nullptr;
const std::type_index tIndex(typeid(*fb));
if (tIndex == std::type_index(typeid(ROFock<MatsT,IntsT>))) {
return std::make_shared<ROFock<MatsU,IntsT>>(
*std::dynamic_pointer_cast<ROFock<MatsT,IntsT>>(fb));
} else {
return std::make_shared<FockBuilder<MatsU,IntsT>>(
*std::dynamic_pointer_cast<FockBuilder<MatsT,IntsT>>(fb));
}
} // FockBuilder<MatsT,IntsT>::convert
}; // namespace ChronusQ
/*
* This file is part of the Chronus Quantum (ChronusQ) software package
*
* Copyright (C) 2014-2020 Li Research Group (University of Washington)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Contact the Developers:
* E-Mail: xsli@uw.edu
*
*/
#pragma once
#include <fockbuilder.hpp>
#include <fockbuilder/impl.hpp>
namespace ChronusQ {
/**
* \brief The ROFock class
*/
template <typename MatsT, typename IntsT>
class ROFock : public FockBuilder<MatsT,IntsT> {
public:
// Constructors
ROFock() = default;
// Different type
template <typename MatsU>
ROFock(const ROFock<MatsU,IntsT> &) : FockBuilder<MatsT,IntsT>(){}
template <typename MatsU>
ROFock(ROFock<MatsU,IntsT> &&) : FockBuilder<MatsT,IntsT>(){}
// Virtual destructor
virtual ~ROFock() {}
// Public member functions
// Form an Roothaan's effective fock for ROHF (see include/fockbuilder/ROFock/impl.hpp for docs)
void rohfFock(SingleSlater<MatsT,IntsT> &);
// Form a fock matrix (see include/fockbuilder/impl.hpp for docs)
virtual void formFock(SingleSlater<MatsT,IntsT> &, EMPerturbation &, bool increment = false, double xHFX = 1.);
// Compute the gradient
virtual void getGrad() {
CErr("ROHF Fock gradient NYI",std::cout);
}
};
}
// Include header for implementation
#include <fockbuilder/rofock/impl.hpp>
/*
* This file is part of the Chronus Quantum (ChronusQ) software package
*
* Copyright (C) 2014-2020 Li Research Group (University of Washington)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Contact the Developers:
* E-Mail: xsli@uw.edu
*
*/
#pragma once
#include <fockbuilder/rofock.hpp>
#include <util/time.hpp>
#include <cqlinalg.hpp>
namespace ChronusQ {
/**
* \brief Forms the Roothaan's effective Fock matrix from general fock
*
* Reference: J. Phys. Chem. A, Vol. 114, No. 33, 2010;
* Mol. Phys. 1974, 28, 819–828.
*
*/
template <typename MatsT, typename IntsT>
void ROFock<MatsT,IntsT>::rohfFock(SingleSlater<MatsT,IntsT> &ss) {
typedef MatsT* oper_t;
size_t NB = ss.aoints.basisSet().nBasis;
size_t NB2 = NB*NB;
ROOT_ONLY(ss.comm);
//construct focka and fockb
for(auto j = 0; j < NB2; j++) {
ss.mo1[j] = 0.5 * (ss.fockMatrix[SCALAR][j] + ss.fockMatrix[MZ][j]);
ss.mo2[j] = 0.5 * (ss.fockMatrix[SCALAR][j] - ss.fockMatrix[MZ][j]);
}
//construct projectors for closed, open, virtual
//pc = dmb * S
//po = (dma - dmb) * S
//pv = I - dma * S
MatsT* pc = ss.memManager.template malloc<MatsT>(NB*NB);
MatsT* po = ss.memManager.template malloc<MatsT>(NB*NB);
MatsT* pv = ss.memManager.template malloc<MatsT>(NB*NB);
MatsT* tmp = ss.memManager.template malloc<MatsT>(NB*NB);
MatsT* tmp2 = ss.memManager.template malloc<MatsT>(NB*NB);
MatsT* S = ss.memManager.template malloc<MatsT>(NB*NB);
//overlap matrix
std::transform(ss.aoints.overlap, ss.aoints.overlap+NB2, S,
[](MatsT a){return a;});
for(auto j = 0; j < NB2; j++) tmp[j] = 0.5 * (ss.onePDM[0][j] - ss.onePDM[1][j]);
Gemm('N','N',NB,NB,NB,MatsT(1.),tmp,NB,S,NB,MatsT(0.),pc,NB);
for(auto j = 0; j < NB2; j++) tmp[j] = ss.onePDM[1][j];
Gemm('N','N',NB,NB,NB,MatsT(1.),tmp,NB,S,NB,MatsT(0.),po,NB);
for(auto j = 0; j < NB2; j++) tmp[j] = 0.5 * (ss.onePDM[0][j] + ss.onePDM[1][j]);
Gemm('N','N',NB,NB,NB,MatsT(-1.),tmp,NB,S,NB,MatsT(0.),pv,NB);
for(auto j = 0; j < NB; j++) pv[j*NB+j] = MatsT(1.) + pv[j*NB+j];
/*
* construct Roothaan's effective fock
======== ======== ====== =========
space closed open virtual
======== ======== ====== =========
closed Fc Fb Fc
open Fb Fc Fa
virtual Fc Fa Fc
======== ======== ====== =========
where Fc = (Fa + Fb) / 2
*/
Gemm('N','N',NB,NB,NB,MatsT(0.5),ss.fockMatrix[SCALAR],NB,pc,NB,MatsT(0.),tmp2,NB);
Gemm('C','N',NB,NB,NB,MatsT(0.5),pc,NB,tmp2,NB,MatsT(0.),tmp,NB);
Gemm('C','N',NB,NB,NB,MatsT(1.),pv,NB,tmp2,NB,MatsT(1.),tmp,NB);
Gemm('N','N',NB,NB,NB,MatsT(0.5),ss.fockMatrix[SCALAR],NB,po,NB,MatsT(0.),tmp2,NB);
Gemm('C','N',NB,NB,NB,MatsT(0.5),po,NB,tmp2,NB,MatsT(1.),tmp,NB);
Gemm('N','N',NB,NB,NB,MatsT(0.5),ss.fockMatrix[SCALAR],NB,pv,NB,MatsT(0.),tmp2,NB);
Gemm('C','N',NB,NB,NB,MatsT(0.5),pv,NB,tmp2,NB,MatsT(1.),tmp,NB);
Gemm('N','N',NB,NB,NB,MatsT(1.),ss.mo2,NB,pc,NB,MatsT(0.),tmp2,NB);
Gemm('C','N',NB,NB,NB,MatsT(1.),po,NB,tmp2,NB,MatsT(1.),tmp,NB);
Gemm('N','N',NB,NB,NB,MatsT(1.),ss.mo1,NB,pv,NB,MatsT(0.),tmp2,NB);
Gemm('C','N',NB,NB,NB,MatsT(1.),po,NB,tmp2,NB,MatsT(1.),tmp,NB);
MatAdd('C','N',NB,NB,MatsT(1.),tmp,NB,MatsT(1.),tmp,NB,ss.fockMatrix[SCALAR],NB);
ss.memManager.free(pc,po,pv,tmp,tmp2,S);
}; // ROFock<MatsT, IntsT>::rohfFock
/**
* \brief Forms the Roothaan's effective Fock matrix for a single slater
* determinant using the 1PDM.
*
* \param [in] increment Whether or not the Fock matrix is being
* incremented using a previous density
*
* Populates / overwrites fock strorage in SingleSlater &ss
*/
template <typename MatsT, typename IntsT>
void ROFock<MatsT,IntsT>::formFock(SingleSlater<MatsT,IntsT> &ss,
EMPerturbation &pert, bool increment, double xHFX) {
size_t NB = ss.aoints.basisSet().nBasis;
size_t NB2 = NB*NB;
// General fock build
FockBuilder<MatsT,IntsT>::formFock(ss, pert, increment, xHFX);
// ROHF fock build
rohfFock(ss);
} // ROFock<MatsT,IntsT>::formFock
}; // namespace ChronusQ
......@@ -135,8 +135,7 @@ namespace ChronusQ {
template <typename... Args>
SingleSlater(MPI_Comm c, AOIntegrals<IntsT> &aoi, Args... args) :
SingleSlaterBase(c,aoi.memManager(),args...), WaveFunctionBase(c,aoi.memManager(),args...),
QuantumBase(c,aoi.memManager(),args...), WaveFunction<MatsT,IntsT>(c,aoi,args...),
fockBuilder(std::make_shared<FockBuilder<MatsT,IntsT>>())
QuantumBase(c,aoi.memManager(),args...), WaveFunction<MatsT,IntsT>(c,aoi,args...)
//, coreType(NON_RELATIVISTIC), orthoType(LOWDIN)
{
// Allocate SingleSlater Object
......
......@@ -40,6 +40,7 @@ namespace ChronusQ {
ROOT_ONLY(comm);
// Static Damping
scfControls.doDamp &= (std::dynamic_pointer_cast<ROFock<MatsT,IntsT>>(fockBuilder) == nullptr);
if (scfControls.doDamp) fockDamping();
// DIIS extrapolation
......@@ -237,6 +238,7 @@ namespace ChronusQ {
size_t OSize = memManager.template getSize(fockMatrix[SCALAR]);
size_t NB = this->aoints.basisSet().nBasis;
MatsT* SCR = memManager.template malloc<MatsT>(nC*nC*NB*NB);
bool iRO = (std::dynamic_pointer_cast<ROFock<MatsT,IntsT>>(fockBuilder) != nullptr);
if(this->nC == 1) {
// FD(S) = F(S)D(S)
......@@ -244,7 +246,7 @@ namespace ChronusQ {
onePDMOrtho[SCALAR], NB, MatsT(0.), FDC[SCALAR], NB);
// FD(S) += F(z)D(z)
if(nC == 2 or !iCS) {
if(nC == 2 or !iCS and !iRO) {
Gemm('N', 'N', NB, NB, NB, MatsT(1.), fockMatrixOrtho[MZ], NB,
onePDMOrtho[MZ], NB, MatsT(0.), SCR, NB);
MatAdd('N','N', NB, NB, MatsT(1.), FDC[SCALAR], NB, MatsT(1.),
......@@ -257,7 +259,7 @@ namespace ChronusQ {
SCR, NB, FDC[SCALAR], NB);
if(nC == 2 or !iCS) {
if(nC == 2 or !iCS and !iRO) {
// FD(z) = F(S)D(z) + F(z)D(S)
Gemm('N', 'N', NB, NB, NB, MatsT(1.), fockMatrixOrtho[SCALAR], NB,
onePDMOrtho[MZ], NB, MatsT(0.), FDC[MZ], NB);
......
......@@ -363,6 +363,7 @@ namespace ChronusQ {
ss->scfControls.dampError = 1e-4;
ss->scfControls.nKeep = 8;
ss->coreHBuilder = std::make_shared<NRCoreH<MatsT,IntsT>>(ss->aoints);
ss->fockBuilder = std::make_shared<FockBuilder<MatsT,IntsT>>();
ss->formCoreH(pert);
aointsAtom->computeERI(pert);
......
......@@ -29,6 +29,7 @@
#include <corehbuilder/nonrel.hpp>
#include <corehbuilder/fourcomp.hpp>
#include <corehbuilder/x2c.hpp>
#include <fockbuilder/rofock.hpp>
// Template for a collective operation on the members of a
// SingleSlater object
......@@ -70,7 +71,7 @@ namespace ChronusQ {
SingleSlaterBase(dynamic_cast<const SingleSlaterBase&>(other)),
WaveFunction<MatsT,IntsT>(dynamic_cast<const WaveFunction<MatsU,IntsT>&>(other)),
coreHBuilder(CoreHBuilder<MatsU,IntsT>::template convert<MatsT>(other.coreHBuilder)),
fockBuilder(std::make_shared<FockBuilder<MatsT,IntsT>>(*other.fockBuilder)) {
fockBuilder(FockBuilder<MatsU,IntsT>::template convert<MatsT>(other.fockBuilder)) {
#ifdef _SingleSlaterDebug
std::cout << "SingleSlater<MatsT>::SingleSlater(const SingleSlater<U>&) "
......@@ -103,7 +104,7 @@ namespace ChronusQ {
SingleSlaterBase(dynamic_cast<SingleSlaterBase&&>(std::move(other))),
WaveFunction<MatsT,IntsT>(dynamic_cast<WaveFunction<MatsU,IntsT>&&>(std::move(other))),
coreHBuilder(CoreHBuilder<MatsU,IntsT>::template convert<MatsT>(other.coreHBuilder)),
fockBuilder(std::make_shared<FockBuilder<MatsT,IntsT>>(*other.fockBuilder)) {
fockBuilder(FockBuilder<MatsU,IntsT>::template convert<MatsT>(other.fockBuilder)) {
#ifdef _SingleSlaterDebug
std::cout << "SingleSlater<MatsT>::SingleSlater(SingleSlater<U>&&) "
......
......@@ -396,7 +396,7 @@ namespace ChronusQ {
if( i == 0 )
out << "Occupied:\n";
else if( i == this->nOB )
if( i == this->nOB )
out << "\n\nVirtual:\n";
out << std::setw(13) << this->eps2[i];
......
......@@ -221,8 +221,11 @@ namespace ChronusQ {
// printFockTimings(std::cout);
}
if( scfControls.scfAlg == _NEWTON_RAPHSON_SCF and scfConv.nSCFIter > 0 )
scfControls.scfStep = _NEWTON_RAPHSON_STEP;
if( scfControls.scfAlg == _NEWTON_RAPHSON_SCF and scfConv.nSCFIter > 0 ) {
if(std::dynamic_pointer_cast<ROFock<MatsT,IntsT>>(fockBuilder) != nullptr)
CErr("Newton Raphson SCF not implemented for ROHF",std::cout);
else scfControls.scfStep = _NEWTON_RAPHSON_STEP;
}
if( scfControls.scfStep == _CONVENTIONAL_SCF_STEP )
ConventionalSCF(scfControls.doExtrap and frmFock);
......@@ -529,12 +532,17 @@ namespace ChronusQ {
ROOT_ONLY(comm);
size_t NB = this->aoints.basisSet().nBasis * nC;
size_t NB2 = NB*NB;
bool iRO = (std::dynamic_pointer_cast<ROFock<MatsT,IntsT>>(fockBuilder) != nullptr);
// Copy over the fockMatrixOrtho into MO storage
if(nC == 1 and iCS)
std::transform(fockMatrixOrtho[SCALAR],fockMatrixOrtho[SCALAR] + NB2,this->mo1,
[](MatsT a){ return a / 2.; }
);
else if(iRO)
std::transform(fockMatrixOrtho[SCALAR],fockMatrixOrtho[SCALAR] + NB2,this->mo1,
[](MatsT a){ return a ; }
);
else if(nC == 1)
for(auto j = 0; j < NB2; j++) {
this->mo1[j] = 0.5 * (fockMatrixOrtho[SCALAR][j] + fockMatrixOrtho[MZ][j]);
......@@ -552,7 +560,10 @@ namespace ChronusQ {
memManager );
if( INFO != 0 ) CErr("HermetianEigen failed in Fock1",std::cout);
if(nC == 1 and not iCS) {
if(iRO) {
std::copy_n(this->mo1, NB2, this->mo2);// for ROHF
std::copy_n(this->eps1, NB, this->eps2);
} else if(nC == 1 and not iCS) {
INFO = HermetianEigen('V', 'L', NB, this->mo2, NB, this->eps2,
memManager );
if( INFO != 0 ) CErr("HermetianEigen failed in Fock2",std::cout);
......
......@@ -147,11 +147,12 @@ namespace ChronusQ {
std::vector<std::string> rawRefs(KSRefs);
rawRefs.insert(rawRefs.begin(),"HF");
// Construct R/U/G/X2C reference keywords
std::vector<std::string> RRefs, URefs, GRefs, X2CRefs;
// Construct R/U/RO/G/X2C reference keywords
std::vector<std::string> RRefs, URefs, RORefs, GRefs, X2CRefs;
for(auto &f : rawRefs) {
RRefs.emplace_back( "R" + f );
URefs.emplace_back( "U" + f );
RORefs.emplace_back( "RO" + f);
GRefs.emplace_back( "G" + f );
X2CRefs.emplace_back( "X2C" + f );
}
......@@ -168,14 +169,16 @@ namespace ChronusQ {
std::find(RRefs.begin(),RRefs.end(),refString) != RRefs.end();
bool isURef =
std::find(URefs.begin(),URefs.end(),refString) != URefs.end();
bool isRORef =
std::find(RORefs.begin(),RORefs.end(),refString) != RORefs.end();
bool isGRef =
std::find(GRefs.begin(),GRefs.end(),refString) != GRefs.end();
bool isX2CRef =
std::find(X2CRefs.begin(),X2CRefs.end(),refString) != X2CRefs.end();
// Throw an error if not a valid reference keyword
if( not isRawRef and not isRRef and not isURef and not isGRef and
not isX2CRef )
if( not isRawRef and not isRRef and not isURef and not isRORef and
not isGRef and not isX2CRef )
CErr(refString + " is not a valid QM.REFERENCE",out);
// Cleanup the reference string
......@@ -330,7 +333,7 @@ namespace ChronusQ {
CErr("Spin-Restricted Reference only valid for singlet spin multiplicities",out);
else
iCS = true;
else if( isURef )
else if( isURef or isRORef )
iCS = false;
else if( isGRef or isX2CRef ) {
iCS = false; nC = 2;
......@@ -423,6 +426,11 @@ namespace ChronusQ {
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<KohnSham<double,double>>( KS_LIST(double) )
);
else if(isRORef)
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<double,double>>(
"Real Restricted Open-shell Hartree-Fock", "R-ROHF", HF_LIST(double) )
);
else if(not isGIAO)
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<double,double>>( HF_LIST(double) )
......@@ -447,6 +455,11 @@ namespace ChronusQ {
"Exact Two Component","X2C-",HF_LIST(double)
)
);
else if(isRORef)
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<dcomplex,double>>(
"Complex Restricted Open-shell Hartree-Fock", "C-ROHF", HF_LIST(double) )
);
else
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<dcomplex,double>>( HF_LIST(double) )
......@@ -468,6 +481,11 @@ namespace ChronusQ {
"Exact Two Component","X2C-",HF_LIST(dcomplex)
)
);
else if(isRORef)
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<dcomplex,dcomplex>>(
"Complex Restricted Open-shell Hartree-Fock", "C-ROHF", HF_LIST(dcomplex) )
);
else
ss = std::dynamic_pointer_cast<SingleSlaterBase>(
std::make_shared<HartreeFock<dcomplex,dcomplex>>( HF_LIST(dcomplex) )
......@@ -519,6 +537,7 @@ namespace ChronusQ {
p->coreHBuilder = std::make_shared<X2C<dcomplex,double>>(
*std::dynamic_pointer_cast<AOIntegrals<double>>(aoints),
scalarOnly);
p->fockBuilder = std::make_shared<FockBuilder<dcomplex,double>>();
} else if(auto p = std::dynamic_pointer_cast<SingleSlater<double,double>>(ss)) {
if (scalarOnly) {
if (atomic)
......@@ -529,6 +548,7 @@ namespace ChronusQ {
p->coreHBuilder = std::make_shared<X2C<double,double>>(
*std::dynamic_pointer_cast<AOIntegrals<double>>(aoints),
scalarOnly);
p->fockBuilder = std::make_shared<FockBuilder<double,double>>();
} else
CErr("SOX2C + Real WFN is not a valid option",std::cout);
} else if (std::dynamic_pointer_cast<SingleSlater<dcomplex,dcomplex>>(ss)) {
......@@ -540,12 +560,18 @@ namespace ChronusQ {
if(auto p = std::dynamic_pointer_cast<SingleSlater<double,double>>(ss)) {
p->coreHBuilder = std::make_shared<NRCoreH<double,double>>(
*std::dynamic_pointer_cast<AOIntegrals<double>>(aoints));
if(isRORef) p->fockBuilder = std::make_shared<ROFock<double,double>>();
else p->fockBuilder = std::make_shared<FockBuilder<double,double>>();
} else if(auto p = std::dynamic_pointer_cast<SingleSlater<dcomplex,double>>(ss)) {
p->coreHBuilder = std::make_shared<NRCoreH<dcomplex,double>>(
*std::dynamic_pointer_cast<AOIntegrals<double>>(aoints));
if(isRORef) p->fockBuilder = std::make_shared<ROFock<dcomplex,double>>();
else p->fockBuilder = std::make_shared<FockBuilder<dcomplex,double>>();
} else if (auto p = std::dynamic_pointer_cast<SingleSlater<dcomplex,dcomplex>>(ss)) {
p->coreHBuilder = std::make_shared<NRCoreH<dcomplex,dcomplex>>(
*std::dynamic_pointer_cast<AOIntegrals<dcomplex>>(aoints));
if(isRORef) p->fockBuilder = std::make_shared<ROFock<dcomplex,dcomplex>>();
else p->fockBuilder = std::make_shared<FockBuilder<dcomplex,dcomplex>>();
} else {
CErr("Complex INT + Real WFN is not a valid option",std::cout);
}
......@@ -558,6 +584,7 @@ namespace ChronusQ {
return ss;
}; // CQSingleSlaterOptions
......
......@@ -23,6 +23,7 @@
*/
#include <singleslater/impl.hpp>
#include <corehbuilder/impl.hpp>
#include <fockbuilder/impl.hpp>
namespace ChronusQ {
......
......@@ -28,8 +28,8 @@ set(SCF_TEST_BINARY_ROOT "${TEST_BINARY_ROOT}/scf" )
# Set up compilation of SCF test exe
add_executable(scftest ../ut.cxx
rhf.cxx uhf.cxx x2chf.cxx rhfnr.cxx
rhf_giao.cxx uhf_giao.cxx ghf_giao.cxx
rhf.cxx uhf.cxx rohf.cxx x2chf.cxx rhfnr.cxx
rhf_giao.cxx uhf_giao.cxx rohf_giao.cxx ghf_giao.cxx
rks.cxx uks.cxx x2cks.cxx ks.cxx
misc.cxx
)
......@@ -47,19 +47,23 @@ endif()
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/rhf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/rks)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/uhf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/rohf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/uks)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/x2c)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/rhf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/uhf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/rohf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/serial/ghf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/rhf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/rks)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/uhf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/rohf)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/uks)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/x2c)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/rhf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/uhf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/rohf_giao)
file(MAKE_DIRECTORY ${SCF_TEST_BINARY_ROOT}/parallel/ghf_giao)
......@@ -68,10 +72,12 @@ include( CQTestGeneration )
# Add tests
add_cq_test( RHF_SCF scftest "RHF.*" )
add_cq_test( UHF_SCF scftest "UHF.*" )
add_cq_test( ROHF_SCF scftest "ROHF.*" )
add_cq_test( X2CHF_SCF scftest "X2CHF.*" )
add_cq_test( RHF_NR_SCF scftest "RHF_NR.*" )
add_cq_test( RHF_GIAO_SCF scftest "RHF_GIAO.*" )
add_cq_test( UHF_GIAO_SCF scftest "UHF_GIAO.*" )
add_cq_test( ROHF_GIAO_SCF scftest "ROHF_GIAO.*")
add_cq_test( GHF_GIAO_SCF scftest "GHF_GIAO.*" )
add_cq_test( RKS_SCF scftest "RKS.*" )
......@@ -86,9 +92,11 @@ add_cq_test( MISC_SCF scftest "MISC_SCF.*" )
if( CQ_ENABLE_MPI )
add_cq_mpi_test( RHF_SCF_MPI 2 scftest "RHF.*" )
add_cq_mpi_test( UHF_SCF_MPI 2 scftest "UHF.*" )
add_cq_mpi_test( ROHF_SCF_MPI 2 scftest "ROHF.*" )
add_cq_mpi_test( X2CHF_SCF_MPI 2 scftest "X2CHF.*" )
add_cq_mpi_test( RHF_GIAO_SCF_MPI 2 scftest "RHF_GIAO.*" )
#add_cq_mpi_test( UHF_GIAO_SCF_MPI 2 scftest "UHF_GIAO.*" )
#add_cq_mpi_test( ROHF_GIAO_SCF_MPI 2 scftest "ROHF_GIAO.*" )
add_cq_mpi_test( RKS_SCF_MPI 2 scftest "RKS.*" )
add_cq_mpi_test( UKS_SCF_MPI 2 scftest "UKS.*" )
......
#
# Li UHF/6-31G(d) : SCF
# SERIAL
#
# Molecule Specification
[Molecule]
charge = 0
mult = 2
geom:
Li 0. 0. 0.