Multiwfn official website: http://sobereva.com/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn
You are not logged in.
First: Is there any way to search the forum? Perhaps this has been asked before, but I do not see a "search" option.
Second: I am new to Multiwfn. I want to transfer orbitals from a MCSCF calculation with Firefly as starting orbitals to ORCA. I encounter several problems:
a) I can read the orbitals from a RHF calculation by Firefly into Multiwfn and export as MKL file, using:
main function 100, subfunction 2, option 9, set filename, y
But the orca_2mkl utility hangs reading this file (at "orbitals").
Inspection fo the files reveals: Firefly prints 439 MOs for this molecule, but 460 coefficients for each MO. I use the SVP basis with spherical d-functions (D5=.T.). The system has 21 "heavy atoms", i.e. width d-polarization functions. Apparently, Firefly prints the 460 coefficients of the cartesian functions, but uses 439 basis functions internally. Multiwfn recognizes 460 basis functions, printing a 460x460 matrix to the MKL file, filling the last 21 columns with zeros. Apparently this is not recognized by orca_2mkl
Is there any way to avoid this?
b) I can not read the orbitals from a MCSCF calculation, Multiwfn report the error: unable to find orbital coefficient field
Firefly prints two sets of orbitals: 1) the MCHF Natural orbitals (a 460x84 matrix: 460 AOs and 84 occupied orbitals) and 2) the MCHF optimized orbitals (a 460x439 matrix). but when I copy the text:
------------
EIGENVECTORS
------------
before the optimized orbitals, they are recognized. But the generated MKL file is not recognized by orca_2mkl.
When I do the RHF calculation with ORCA and convert the GBW file to MKL, it prints 439 coefficients per MO.
I seems I need a routine that contracts the coefficients of the 6 cartesian d-orbitals to 5 spherical coefficients. Is there an option in Multiwfn?
many thanks
Bernhard
Offline
Dear Bernhard,
You can find "Search" button at the top of this forum
I don't have any experience in using MCSCF of firefly, and Multiwfn currently doesn't support converting Cartesian basis functions to spherical-harmonic basis functions. I suggest you looking at https://gitlab.com/jxzou/mokit and contact the author, perhaps he is able to help you to solve this difficulty.
Best regards,
Tian
Offline
Thank you. The GAMESS(or Firefly) read or print Cartesian-type MOs no matter when you use Cartesian-type or spherical harmonic basis functions. Therefore, when the spherical harmonic basis functions (ISPHER=1 in GAMESS) is used, there are 6D->5D, 10F->7F (also for G, H, etc) contractions to be performed within GAMESS.
MOKIT can transfer MOs from other programs to ORCA. I'm familiar with GAMESS, but not Firefly. I'll show examples using GAMESS below, which is supposed to work both for GAMESS and Firefly. Please do tell me if there is anything different for Firefly.
Assuming we have a file h2o.gjf, it can be a RHF/ROHF/UHF/CASSCF job, e.g.
%chk=h2o.chk
%mem=4GB
%nprocshared=2
#p RHF/6-31G(d,p) 5D 7F nosymm int=nobasistransform
title
0 1
O 0.00000000 0.00000000 0.06200700
H 0.00000000 -0.78397600 -0.49205200
H 0.00000000 0.78397600 -0.49205200
Here the keywords `5D 7F` are written explicitly to specify that spherical harmonic basis functions would be used. After this Gaussian job is accomplished, we have the file h2o.chk, now run
formchk h2o.chk h2o.fch
fch2inp h2o.fch
to obtain h2o.inp, which is a GAMESS/Firefly input file. You can open this file and modify keywords to suit your target calculations. There is no need to modify Cartesian coordinates or basis set data. Now run the GAMESS job, for example
rungms h2o.inp 00 16 >h2o.gms 2>&1
After the GAMESS job is accomplished, one obtains the file h2o.dat, which contains basis set data and MO coefficients (more digits than those coefficients in output file). Now run
dat2fch h2o.dat h2o.fch
Remember that we performed a Gaussian job at first, so we already a h2o.fch file. Here the updated MOs are written into the file h2o.fch. Now transfer MOs to ORCA, i.e.
fch2mkl h2o.fch
orca_2mkl h2o_o -gbw
This will lead to 3 files: h2o_o.inp, h2o_o.gbw, h2o_o.mkl. Again, you can open h2o_o.inp and modify keywords to suit your target calculations. For wave function methods like HF/CASSCF, the SCF in different programs can be converged in 1~3 cycles since converged MOs are imported.
Why we need a h2o.fch file at first? This is because the file h2o.dat would not include any basis set data if a built-in basis set in GAMESS is used, which is not possible for transferring MOs to ORCA. But if we use h2o.inp generated by the fch2inp utility, both h2o.inp and h2o.dat includes all basis set data, and the data are exactly in accord with that in h2o.fch. In such case, MOs under 6D/10F/15G/21H can be correctly recognized and contracted to those under 5D. Finally, fch2mkl is used to generate h2o_o.inp and h2o_o.mkl files from h2o.fch.
Please do not hesitate to ask related questions if you encounter any problem.
Last edited by jxzou (2024-05-14 11:59:22)
Offline
Dear Jxzou,
thank you very much for the detailed answer. Unfortunately, I have no access to Gaussian. However, I use external basis set files in Firefly, i.e., the basis set is printed in the PUNCH file (which is DAT in GAMESS). I wonder whether dat2fch sees these. The programs dat2fch and fch2mkl are apparently not part of Multiwfn, where can I find them?
I run the same RHF run with ORCA and Firefly, then converted the GBW file and the GMS file each to MKL. I see that the coefficients of d-orbitals are ordered in GAMESS as XX,YY,ZZ,XY,XZ,YZ and in ORCA as dz2, dxz, dyz, dx2y2, dxy
I am thinking of writing a small program that transforms the GAMESS coefficients from the MKL file to the ORCA format as MKL file, and then re-transform MKL to GBW. Unless you have already a set of programs that can do this.
best regards,
Bernhard
Offline
Hi, Bernhard,
(1) The dat2fch, fch2inp, fch2mkl are utilities in the open-source package MOKIT (https://gitlab.com/jxzou/mokit), not in Multiwfn. You can install MOKIT using any of the four options (please see README.md). MOKIT provides dozens of utilities to transfer MOs among quantum chemistry packages (and ORCA/GAMESS are within the scope). Using these utilities, one can save the computational time in different quantum chemistry packages when using the same theoretical method. Besides, MOKIT can setup automatic as well as black-box multireference calculations easily, since it can automatically construct and determine active orbitals.
(2) If you do not have Gaussian or you cannot use Gaussian, you can still use the `dat2fch` utility, but with somewhat new MOKIT version >= v1.2.6rc31. The version of MOKIT can be checked via running `automr --version` after installing MOKIT. If you use conda to install MOKIT now, it is supposed to be >= v1.2.6rc31.
Below I provide two GAMESS .dat files, which can be transformed using `dat2fch`. A corresponding .fch file would be generated from scratch, and thus Gaussian software is not needed.
Example 1. RHF .dat file
dat2fch C4H4_cc-pVDZ_rhf.dat
Example 2. CASSCF .dat file
dat2fch C4H4_uhf_gvb10_CASSCF.dat -no 16
where 16 is the sum of doubly occupied orbitals and active orbitals for C4H4 molecule at CAS(4,4).
With a .fch file at hand, you can further transfer MOs to ORCA/GAMESS/OpenMolcas/Molpro via fch2mkl/fch2inp/fch2inporb/fch2com utilities, etc. Your Firefly DAT file is supposed to be very similar to the .dat file provided above. If there is any tiny difference, I believe that you can add them by yourself.
Last edited by jxzou (2024-05-17 15:22:50)
Offline