@@ -115,6 +115,7 @@ bool guess_energy(const json &input, Molecule &mol, FockBuilder &F);
115
115
void write_orbitals (const json &input, Molecule &mol);
116
116
void calc_properties (const json &input, Molecule &mol);
117
117
void plot_quantities (const json &input, Molecule &mol);
118
+ bool _useExchange = false ;
118
119
} // namespace scf
119
120
120
121
namespace rsp {
@@ -255,7 +256,11 @@ json driver::scf::run(const json &json_scf, Molecule &mol) {
255
256
OrbitalVector Phi_mom;
256
257
if (scf::guess_orbitals (json_guess, json_occ, mol)) {
257
258
if (json_scf.contains (" scf_solver" )) {
258
- if (json_scf[" scf_solver" ][" deltascf_method" ] == " IMOM" || json_scf[" scf_solver" ][" deltascf_method" ] == " MOM" ) Phi_mom = orbital::deep_copy (mol.getOrbitals ());
259
+ if (json_scf[" scf_solver" ][" deltascf_method" ] == " IMOM" || json_scf[" scf_solver" ][" deltascf_method" ] == " MOM" ) {
260
+ if (_useExchange)
261
+ MSG_ABORT (" Running DeltaSCF calculations with exact exchange is currently not supported!" );
262
+ Phi_mom = orbital::deep_copy (mol.getOrbitals ());
263
+ }
259
264
}
260
265
scf::guess_energy (json_guess, mol, F);
261
266
json_out[" initial_energy" ] = mol.getSCFEnergy ().json ();
@@ -1275,6 +1280,7 @@ void driver::build_fock_operator(const json &json_fock, Molecule &mol, FockBuild
1275
1280
auto K_p = std::make_shared<ExchangeOperator>(P_p, Phi_p, X_p, Y_p, exchange_prec);
1276
1281
F.getExchangeOperator () = K_p;
1277
1282
}
1283
+ scf::_useExchange = true ; // determine if exact exchange is used in order to prevent MOM/IMOM calculations
1278
1284
}
1279
1285
// /////////////////////////////////////////////////////////
1280
1286
// /////////////// External Operator ///////////////////
0 commit comments