V0.1.0 of mqc released!

I have been writing a new quantum chemistry package that relies on fragmentation for massive parallelism and I am happy to announce that v0.1.0 has been released! after this I will stick to a monthly release schedule.

It is entirely written in Fortran (except using libxc for DFT functionals, because it doesn’t make sense to port this to Fortran). The integrals are evaluated using libfint a Fortan port of libcint which is used by pyscf (a very popular package). Libfint is validated against libcint on every push to ensure correctness.

I support most of the common methods in quantum chemistry: RHF, UHF, RKS-DFT, UKS-DFT, CASSCF, MP2, CCSD(T) - with RHF, RKS-DFT, MP2, and CCSD(T) being able to run under the “density-fitting/resolution of the identity” approximation.

Analytical gradients are available for RHF, RKS-DFT, MP2, CASSCF, RI-RHF, RI-MP2 (including double hybrid DFT). Analytical Hessians are available for the same methods without RI/DF, including double hybrid DFT Hessians (they’ll be slow because they use a full MP2 reference).

Parallelism is done via MPI and OpenMP.

The code is built with CMake but an FPM build is available for some core functionality. The code can be built without MPI to just use OpenMP. For the methods that interest me the most I have verified performance against established quantum chemistry packages, like QChem and I can report that the code is as fast if not faster than said programs while remaining correct.

The idea is that mqc is the frag backend, and Cenzontle is the quantum chemistry backend.

Fortran has long had a history in QC and I am very happy to continue it :slight_smile:

Oh it also has a python interface.

12 Likes

I believe most of the code should build with Lfortran, I am waiting to have a free day to just spend the time testing it with it.

1 Like

@jorgeg and if it doesn’t, we’ll fix it!

3 Likes

Very nice! :+1:

Does this mean that “Cenzontle” performs various electronic structure calculations for each “fragment” (e.g., a molecule)? (I looked at the the URL but it points to a bird page, so I was wondering whether it is some external package or internal codes…)

Also, in the fragmentation-based calculation of the total energy, I wonder how electrostatic interactions are evaluated among fragments. For example, is it possible to describe long-range Coulomb interactions for systems containing a lot of charged fragments… ?(Or in that case, is it safer to assume that only the moderate-range interactions are taken into account in the total energy calculation?)

Yes! it is here sorry haha I made a mistake there I wanted both links.

The idea is that you obtain them through the many body expansion, where you do fragment-monomers, and then you couple them to form dimers, trimers, tetramers. You truncate at a point where you’re confident you won’t affect the energy too much. Usually this is at trimers/tetramers. This captures most of the many-body effects.

There are methods (also coded up into mqc) that do it via electrostatic embedding (FMO, EE-MBE)

1 Like

Thanks very much! I have looked at the Cenzontle codes on the Github:

and I feel the codes are very clean and readable (in modern Fortran). According to the top page of Metalquicha, I think LLMs were used extensively for this project, but I wonder to what degree LLMs were used for the Cenzontle part (possibly, the latter was mainly developed by you, while LLM coding was used mainly for the fragmentation part, i.e., assemble various routines to perform the total energy & derivative calculations)?

(Btw, about 20 years ago (?) I worked on a large electronic structure package written in pure F77 with tons of common / implicit typing / short variable names in all caps / etc, so I needed to struggle very hard to first understand what’s going on in the package. Compared to that, I really feel modern codes like Cenzontle are orders-of-magnitude more readable and easier to understand, particularly with a lot of comments inside :grin:)

1 Like

I also worked with several electronic structure codes in F77, and I found it easier to just rewrite it in modern Fortran than to try to modify the quite complex code with common blocks.

1 Like