.. tip:: All input files can be downloaded: :download:`Files `. .. tip:: Please refer to :doc:`scf` for more examples. For a complete tutorial of TSO-DFT, please refer to: - :doc:`../tutorials/tso1` - :doc:`../tutorials/tso2` scfguess ======== .. contents:: :local: This option defines the initial guess of SCF calculations. Options ------------ .. contents:: :local: .. option:: type .. list-table:: :stub-columns: 1 :widths: 5 20 * - Value - ``hcore`` Will use the eigenvectors of the core matrix as initial guess. Usually, its performance is very bad * - - ``atmden`` Will use the superposition of converged densities of all atoms in the system as initial guess. It is recommended for most cases * - - ``fragden`` Will use the superposition of converged densities of fragments assigned by you as initial guess. This can be used for TSO or treating symmetry-broken systems * - - ``mwfn`` Will read a wave function from a MWFN file as initial guess * - - ``tso`` Will use a reference state (assigned with ``frag``) to perform TSO calculation (assigned with ``orb``). This is only used for TSO calculations * - Default - ``atmden`` Define the type of initial guess. In most cases, ``atmden`` is recommended. ``mwfn`` which reads a guess from a converged SCF is also a good choice. For target state optimization (TSO), symmetry-broken, or other special calculations, ``fragden`` can be used. .. option:: file .. list-table:: :stub-columns: 1 :widths: 5 20 * - Value - A file name * - Default - job name + ``.mwfn`` When ``type`` is ``mwfn``, Qbics will read wave function with using mwfn file name. When ``type`` is ``tso``, Qbics will save reference wave function using this mwfn file name. .. option:: frag This defines atomic fragments for initial guess. The format is: ``frag num_electrons spin_multiplicity atom_range`` There can be arbitrary number of fragments, but all atoms must be included once and only once. They are only activated when ``type`` is ``fragden`` or ``tso``. For example: .. code-block:: bash :linenos: scfguess type fragden frag 0 1 1-9 frag 0 -3 10-15 18 frag -1 3 16 17 end In this case, the molecule is decomposed into 3 fragments: (1) atom 1,2,3,4,5,6,7,8,9, with charge 0 and spin multiplicity 1; (2) atom 10,11,12,13,14,15,18, with charge 0 and spin multiplicity 3 (beta orbitals occupied first); (3) atom 16,17, with charge -1 and spin multiplicity 3. For this guess, Qbics will perform 3 SCF calculations for all fragments, then superpose them as the initial guess for the SCF of the whole molecule. This can be used for ordinary, symmetry-broken, or TSO SCF. .. HINT:: The total charge of fragments does not have to be the same as the total system. .. HINT:: Please refer to the keyword ``no_scf`` in :doc:`scf` for more details about TSO, when you want to use ``frag``. .. option:: orb This defines the orbitals for initial guess. The format is: ``orb num_electrons spin_multiplicity alpha_MO_indices : beta_MO_indices`` There can be arbitrary number of orbital spaces, but all orbitals must be included once and only once. They are only activated when ``type`` is ``mwfn`` or ``tso``. For example: .. code-block:: bash :linenos: scfguess type mwfn file x.mwfn orb 12 1 1-6 : 1-6 orb 2 1 7 : 8 orb 0 1 8 : 7 end In this case, the orbitals will be read from ``x.mwfn`` and 3 orbital spaces are defined: (1) alpha orbital 1,2,3,4,5,6 and beta orbital 1,2,3,4,5,6, with 12 electron and spin multiplicity 1; (2) alpha orbital 7 and beta orbital 8, with 2 electrons and spin multiplicity 1; (3) alpha orbital 8 and beta orbital 7 with 0 electron and spin multiplicity 1 (since no electrons in this orbital space, actually spin multiplicity can be arbitrary). For this guess, Qbics will read orbitals from ``x.mwfn`` and assign occupation according to ``orb``, then do the following ordinary or TSO SCF calculations. Also, note that in this keyword, orbital order **matters**. For example, .. code-block:: bash :linenos: scfguess type mwfn file x.mwfn orb 14 1 1-6 9 7 8 10-25 : 1-6 9 7 8 10-25 end In this case, the 7 alpha and 7 beta electrons will occupy orbital 1,2,3,4,5,6,9. .. HINT:: Please refer to the keyword ``no_scf`` in :doc:`scf` for more details about TSO, when you want to use ``orb``. .. option:: ble This defines orbital occupations for a specific excited-state configuration. The format is: ``ble block_index alpha_occ_indices : beta_occ_indices`` - ``block_index`` must be **less than the number of blocks** (i.e., the number of ``orb`` commands used to define orbital blocks). - The ``ble`` keyword is only activated when ``type`` is set to ``mwfn`` or ``tso``. For example, .. code-block:: bash :linenos: scfguess type mwfn file x.mwfn orb 12 1 1-6 : 1-6 orb 2 1 7-8 : 7-8 ble 2 1 : 2 end In this example: - Orbitals are read from ``x.mwfn``. - Two orbital blocks are defined. - The ``ble`` keyword specifies the excitation configuration: - In block 2: alpha orbital 7 is occupied, and beta orbital 8 is occupied. - These correspond to occupation numbers `1` and `2`, respectively. If the ``ble`` keyword is **not used**, occupations will be assigned according to the `orb` specification. If ``ble`` **is used**, occupations are overridden and assigned based on `ble`. .. HINT:: Please refer to the keyword ``no_scf`` in :doc:`scf` for more details about BLE. Theoretical Background -------------------------------- XXXXXXX Input Examples -------------------- Example: Using Initial Guess of Neutral Dieldrin for Cationic Dieldrin ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ In :doc:`scf`, we have shown hown to do SCF calculations for Dieldrin. For cationic dieldrin, the SCF took 24 cycles to converge. However, if we use the initial guess from the converged neutral dieldrin, the SCF will converge faster. To do this, we can use the following input: .. code-block:: bash :linenos: :caption: scfguess-1.inp basis def2-svp end scf charge +1 spin2p1 2 end scfguess type mwfn file scf-1a.mwfn end grimmedisp type bj end mol Cl 1.40900 -0.54900 -0.14200 C 2.91800 0.22200 -0.14800 C 3.34900 1.18000 -0.99000 Cl 2.48900 1.91800 -2.24800 C 4.73000 1.60600 -0.53700 Cl 5.24600 3.22500 -0.97500 C 5.80600 0.51900 -0.74700 C 6.83600 -0.13400 -1.70000 C 6.40300 -1.62200 -1.82900 C 6.19900 -1.81300 -0.26300 C 7.62200 -1.50500 0.16600 O 8.02000 -0.22000 0.59300 C 8.09500 -0.42900 -0.82100 C 5.11900 -0.73000 -0.15200 C 4.07300 -0.11600 0.82100 Cl 3.68500 -1.10500 2.20000 C 4.50000 1.37200 1.05000 Cl 5.90100 1.54700 2.17100 Cl 3.22100 2.43400 1.80000 H 6.52400 1.00200 -0.09500 H 7.05500 0.38900 -2.63100 H 7.19900 -2.27000 -2.21800 H 5.50600 -1.77200 -2.43800 H 5.86900 -2.82100 -0.00200 H 8.25600 -2.36000 0.34800 H 9.03900 -0.55400 -1.32700 H 4.42500 -1.17200 -0.89200 end task energy b3lyp end Here, in ``scfguess...end`` option, we set the initial guess ``type`` to ``mwfn`` and read the wave function from ``scf-1a.mwfn`` file, which is the converged neutral dieldrin. In ``scfguess-1.out``, you can see that the SCF will converge in 12 cycles, which is much faster than the 24 cycles without this initial guess. Example: Superposition of Fragment Density for [CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+`][HSO\ :sub:`4`\ :sup:`-`] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Now we want to calculate the energy of a cantion-anion pair [CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+`][HSO\ :sub:`4`\ :sup:`-`]. The total charge of the system is 0, so the input file can be given in ``scfguess-2a.inp``. However, chemical intuition tells us that an initial guess of superposition of CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+` and HSO\ :sub:`4`\ :sup:`-` seems to be better. This can be given in ``scfguess-2b.inp``: .. tabs:: .. tab:: scfguess-2a.inp .. code-block:: bash :linenos: :caption: scfguess-2a.inp basis def2-svp end scf charge 0 spin2p1 1 end mol S -0.92132000 0.13553700 0.02022300 O -1.71190900 1.32700700 0.03005900 O -1.95455400 -1.09662200 -0.01287200 O -0.09369700 -0.02457400 -1.18931900 O -0.13508200 -0.13905500 1.21845100 N 2.13478700 -0.64814300 -0.03200000 C 3.06391300 0.49644100 0.01002200 H -2.74409400 -0.79280600 -0.47259900 H 1.37775700 -0.50028000 -0.76845000 H 1.50266300 -0.65123600 0.79672500 H 3.62254900 0.54819100 -0.92118700 H 3.74619000 0.39302500 0.85034900 H 2.46986400 1.39919200 0.12858400 H 2.60115300 -1.54036700 -0.14368500 end task energy b3lyp end .. tab:: scfguess-2b.inp .. code-block:: bash :linenos: :caption: scfguess-2b.inp basis def2-svp end scf charge 0 spin2p1 1 end scfguess type fragden frag -1 1 1-5 8 frag +1 1 6 7 9-14 end mol S -0.92132000 0.13553700 0.02022300 O -1.71190900 1.32700700 0.03005900 O -1.95455400 -1.09662200 -0.01287200 O -0.09369700 -0.02457400 -1.18931900 O -0.13508200 -0.13905500 1.21845100 N 2.13478700 -0.64814300 -0.03200000 C 3.06391300 0.49644100 0.01002200 H -2.74409400 -0.79280600 -0.47259900 H 1.37775700 -0.50028000 -0.76845000 H 1.50266300 -0.65123600 0.79672500 H 3.62254900 0.54819100 -0.92118700 H 3.74619000 0.39302500 0.85034900 H 2.46986400 1.39919200 0.12858400 H 2.60115300 -1.54036700 -0.14368500 end task energy b3lyp end In ``scfguess-2b.inp``, the fragment initial guess is set using .. code-block:: bash :linenos: :caption: scfguess-2b.inp scfguess type fragden frag -1 1 1-5 8 frag +1 1 6 7 9-14 end Here, the atomic indices of CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+` and HSO\ :sub:`4`\ :sup:`-` are given in ``1-5 8`` and ``6 7 9-14``, respectively, and charges and spin multiplicities are also given. The atomic indices are shown below: .. figure:: figs/scfguess-1.jpg In their output ``scfguess-2a.out`` and ``scfguess-2b.out``, both give the same energy, but the SCF cycles are 25 and 11, respectively. Thus, superposition of fragments is indeed a better initial guess. Also, we can check the Mulliken population of this system: .. code-block:: bash :linenos: :caption: scfguess-2b.out Mulliken Populations ==================== # Symbol Charge Spin ---------------------------------------------- 1 S 1.06432061 0.00000000 2 O -0.48154427 0.00000000 3 O -0.35593323 0.00000000 4 O -0.56975508 0.00000000 5 O -0.56231274 0.00000000 6 N -0.03632083 0.00000000 7 C 0.05819466 0.00000000 8 H 0.18495781 0.00000000 9 H 0.18311761 0.00000000 10 H 0.17532487 0.00000000 11 H 0.05607280 0.00000000 12 H 0.05428454 0.00000000 13 H 0.07504981 0.00000000 14 H 0.15454343 0.00000000 ---------------------------------------------- Sum -0.00000000 0.00000000 ---------------------------------------------- We can see that, the sum of Mulliken charge on CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+` and HSO\ :sub:`4`\ :sup:`-` are +0.72 and -0.72, respectively, being quite different from their ideal value +1 and -1. This is actually the electron delocalization effect. Example: Diatatic State of [CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+`][HSO\ :sub:`4`\ :sup:`-`] with TSO-DFT ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. tip:: For a complete tutorial of TSO-DFT, please refer to: - :doc:`../tutorials/tso1` - :doc:`../tutorials/tso2` In the last example, we have calculated [CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+`][HSO\ :sub:`4`\ :sup:`-`], where electron is delocalzied over the entire cluster. Can we calculate a state where all electrons are strictly localzied on each molecule? This can be done easily with Qbics. Such state can be called a **diabatic state.** Diabatic state can be calculated with TSO-DFT method, which can be done with ``scfguess-3.inp``: .. code-block:: bash :linenos: :caption: scfguess-3.inp basis def2-svp end scf charge 0 spin2p1 1 no_scf tso type U # This must be given for TSO calculation. end scfguess type fragden frag -1 1 1-5 8 frag +1 1 6 7 9-14 end mol S -0.92132000 0.13553700 0.02022300 O -1.71190900 1.32700700 0.03005900 O -1.95455400 -1.09662200 -0.01287200 O -0.09369700 -0.02457400 -1.18931900 O -0.13508200 -0.13905500 1.21845100 N 2.13478700 -0.64814300 -0.03200000 C 3.06391300 0.49644100 0.01002200 H -2.74409400 -0.79280600 -0.47259900 H 1.37775700 -0.50028000 -0.76845000 H 1.50266300 -0.65123600 0.79672500 H 3.62254900 0.54819100 -0.92118700 H 3.74619000 0.39302500 0.85034900 H 2.46986400 1.39919200 0.12858400 H 2.60115300 -1.54036700 -0.14368500 end task energy b3lyp end We just need to add ``no_scf tso`` to ``scf...end``, and give fragment definition in ``scfguess...end``. Also, you must explicitly write ``type U`` to enforce unrestricted SCF. Such method can be called TSO-B3LYP. In the output ``scfguess-3.out``: .. code-block:: bash :linenos: :caption: scfguess-3.out Mulliken Populations ==================== # Symbol Charge Spin ---------------------------------------------- 1 S 1.05819195 -0.00000000 2 O -0.49810728 0.00000000 3 O -0.36249350 -0.00000000 4 O -0.71399133 0.00000000 5 O -0.66324621 -0.00000000 6 N -0.09172438 -0.00000000 7 C 0.05015632 0.00000000 8 H 0.17964637 0.00000000 9 H 0.35411645 0.00000000 10 H 0.29719708 0.00000000 11 H 0.06307774 -0.00000000 12 H 0.06123412 -0.00000000 13 H 0.09862277 -0.00000000 14 H 0.16731989 0.00000000 ---------------------------------------------- Sum -0.00000000 -0.00000000 ---------------------------------------------- ..omitted.. Final total energy: -795.63743617 Hartree We can see that, the sum of Mulliken charge on CH\ :sub:`3`\ NH\ :sub:`4`\ :sup:`+` and HSO\ :sub:`4`\ :sup:`-` are +1 and -1. So we have successfully obtained the diabatic state we need. Also, its energy ``-795.63743617 Hartree`` is higher than the one obatained from ``scfguess-2b.out``: ``-795.67538949 Hartree``. Their difference ``-795.67538949 Hartree``-\ ``-795.63743617 Hartree`` = 23.82 kcal/mol is actually the ``Charge transfer interaction energy`` without BSSE correction defined in TSO-EDA, which can be calculated with :doc:`eda`. The following input: .. code-block:: bash :linenos: :caption: scfguess-3eda.inp basis def2-svp end scf charge 0 spin2p1 1 type U # This must be given. end eda type tso frag -1 1 1-5 8 frag +1 1 6 7 9-14 end mol S -0.92132000 0.13553700 0.02022300 O -1.71190900 1.32700700 0.03005900 O -1.95455400 -1.09662200 -0.01287200 O -0.09369700 -0.02457400 -1.18931900 O -0.13508200 -0.13905500 1.21845100 N 2.13478700 -0.64814300 -0.03200000 C 3.06391300 0.49644100 0.01002200 H -2.74409400 -0.79280600 -0.47259900 H 1.37775700 -0.50028000 -0.76845000 H 1.50266300 -0.65123600 0.79672500 H 3.62254900 0.54819100 -0.92118700 H 3.74619000 0.39302500 0.85034900 H 2.46986400 1.39919200 0.12858400 H 2.60115300 -1.54036700 -0.14368500 end task eda b3lyp end At the end of the output ``scfguess-3eda.out``: .. code-block:: bash :linenos: :caption: scfguess-3eda.out Target State Optimized Wavefunction Energy Decomposition Analysis ================================================================= WITHOUT BSSE correction: Electrostatic interaction energy: -129.90 kcal/mol Exchange-correlation interaction energy: 35.20 kcal/mol Polarization interaction energy: -13.18 kcal/mol Charge transfer interaction energy: -23.82 kcal/mol Grimme's dispersion interaction: 0.00 kcal/mol ---------------------------------------------------------------- Total interaction energy: -131.69 kcal/mol WITH BSSE correction: Electrostatic interaction energy: -129.90 kcal/mol Exchange-correlation interaction energy: 35.20 kcal/mol Polarization interaction energy: -13.18 kcal/mol Charge transfer interaction energy: -16.31 kcal/mol Grimme's dispersion interaction: 0.00 kcal/mol ---------------------------------------------------------------- Total interaction energy: -124.18 kcal/mol Line 7 says ``Charge transfer interaction energy: -23.82 kcal/mol``, which is exactly the same value as we calculated. Example: TSO-DFT for Doubly Excited States of HCHO ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. tip:: For a complete tutorial of TSO-DFT, please refer to: - :doc:`../tutorials/tso1` - :doc:`../tutorials/tso2` As mentioned above, TSO-DFT can be used to study diabatic states. It can also be used to study excited states. Here, we demonstrate how to use TSO-DFT to calculate a doubly excitated state of HCHO. We consider HOMO\ :sup:`2` → LUMO\ :sup:`2`: .. code-block:: bash :linenos: :caption: scfguess-4a.inp basis element H cc-pVTZ C cc-pCVTZ O cc-pCVTZ end scf charge 0 spin2p1 1 type U # For TSO-DFT, unrestricted SCF is preferred. no_scf TSO end scfguess type tso file hcho-ref.mwfn frag 0 1 1-4 orb 16 1 1-7 9-114 : 1-7 9-114 orb 0 1 8 : 8 end mol C -0.000756 -0.520733 0. H 0.935697 -1.111766 0. H -0.939631 -1.107897 0. O 0.001792 0.678123 0 end task energy b3lyp end Here: - Line 16: Set ``type`` to ``tso`` enable special initial guess for TSO-DFT; - Line 17: The reference wavefunction (ground state of HCHO) is saved to ``hcho-ref.mwfn``; - Line 18: Define the reference state. Here, the whole molecule is treated as the reference state; - Line 19,20: Define the orbital spaces to set up the required excited state as explained above. After calculation, you can find these lines in ``scfguess-4a.out``: .. code-block:: bash :linenos: :caption: scfguess-4a.out TSO Transition ============== Reference wave function read from: hcho-ref.mwfn Reference energy: -114.55175800 Hartree Current energy: -114.15907196 Hartree E(Current)-E(Ref): 10.68553145 eV Transition dipole moment (Debye): 0.00000 0.00000 0.00000 Oscillator strength: 0.00000 Higher order corrections: Transition quadrupole moment (Debye*Angstrom): Qxx: 0.00000; Qyy: 0.00000; Qzz: 0.00000 Qxy: 0.00000; Qxz: 0.00000; Qyz: 0.00000 Quadrupole correction to oscillator strength: 0.00000E+00 Transition angular momentum (au): 0.00000 0.00000 0.00000 Magnetic dipole correction to oscillator strength: 0.00000E+00 ---- Self Consistent Field Energy Done ------------------ Final total energy: -114.15907196 Hartree The double excitation energy is ``10.68 eV``, which agrees well with the one obtained from EOM-CC (10.34 eV). Note that, by changing ``energy`` in ``scfguess-4a.inp`` to ``opt``, you can do geometry optimization for this excited state! You can also use an MWFN file as the initial guess to do TSO-DFT calculation: .. code-block:: bash :linenos: :caption: scfguess-4b.inp basis element H cc-pVTZ C cc-pCVTZ O cc-pCVTZ end scf charge 0 spin2p1 1 type U # For TSO-DFT, unrestricted SCF is preferred. no_scf TSO end scfguess type mwfn file hcho-ref.mwfn orb 16 1 1-7 9-114 : 1-7 9-114 orb 0 1 8 : 8 end mol C -0.000756 -0.520733 0. H 0.935697 -1.111766 0. H -0.939631 -1.107897 0. O 0.001792 0.678123 0 end task energy b3lyp end Note that we have deleted ``frag 0 1 1-4`` since reference wavefucntion is already given in ``hcho-ref.mwfn``. The obtained energy in ``scfguess-4b.out`` is exactly the same as in ``scfguess-4a.out``.