NMR jobs with triplet ground states

I’m trying to compute NICS(0) and NICS(1) for aromatic ions. Those with singlet ground states are fine, but with triplet ground states qchem tends to core dump in the same place each time (the initial pertubations in D-CPSCF) regardless of unrestriced or guess_scf_max options. I tried raising the mem_total and mem_static values, and that causes different errors (munmap_chunk() invalid pointer; double free or corruption; malloc() unaligned tcache chunk). I also tried removing the ghost atoms, just in case.

According to the manual Qchem is capable of:

Restricted Hartree-Fock and DFT calculations of NMR chemical shifts using gauge-including atomic orbitals.

I’m still pretty new in QC, so I just wanted to check that it is indeed the case that Q-Chem is not currently capable of performing NMR calculations on open-shell species, and if not, how should I go about fixing this?

Any help would be greatly appreciated, and I am happy to provide more information as necessary.

sounds like that is the case, can you provide an input file? Ideally Q-Chem should exit with a polite error message rather than segfault, that change at least can be implemented easily. Better NMR capabilities are a work in progress.

1 Like

Here’s the .inp:

$molecule
1 3
C -0.7106358982 -1.0086841350 -0.0134045756
C -1.1488630022 0.3379003453 0.0952511860
C 0.7096389299 -1.0094262766 -0.0133865410
C 1.1492655317 0.3367070310 0.0952708928
C 0.0006324234 1.1695006789 0.1639273562
H -1.3463721486 -1.8796283323 -0.0809842859
H -2.1762724016 0.6712264630 0.1225256298
H 1.3444752130 -1.8810281798 -0.0809549058
H 2.1770182737 0.6689705827 0.1225633337
H 0.0011891208 2.2463889046 0.2511951263
@H 0.0000076 -0.0348005 0.0655317
@H -0.0003355 -0.1153399 1.062283
$end

$rem
method = b3lyp
dft_d = d3_bj
basis = def2-tzvp
gui = 2
jobtype = nmr
scf_convergence = 7
unrestricted = true
scf_guess_mix = true
$end

And the .out it generated (minus the citation):

Q-Chem 6.1.0 for Intel X86 EM64T Linux

Parts of Q-Chem use Armadillo 9.900.5 (Nocturnal Misbehaviour).
http://arma.sourceforge.net/

Q-Chem begins on Mon Sep 11 12:17:15 2023

Host:
0

 Scratch files written to /scratch/qchem175482//

Jul923 |scratch|qcdevops|jenkins|workspace|build_RNUM -1
Processing $rem in /opt/qchem/6.1/config/preferences:
Processing $rem in /home/matthew/.qchemrc:

Q-Chem warning in module libgen/rem_setup.C, line 580:

Integral symmetry turned off!

Checking the input file for inconsistencies… …done.


User input:

$molecule
1 3
C -0.7106358982 -1.0086841350 -0.0134045756
C -1.1488630022 0.3379003453 0.0952511860
C 0.7096389299 -1.0094262766 -0.0133865410
C 1.1492655317 0.3367070310 0.0952708928
C 0.0006324234 1.1695006789 0.1639273562
H -1.3463721486 -1.8796283323 -0.0809842859
H -2.1762724016 0.6712264630 0.1225256298
H 1.3444752130 -1.8810281798 -0.0809549058
H 2.1770182737 0.6689705827 0.1225633337
H 0.0011891208 2.2463889046 0.2511951263
@H 0.0000076 -0.0348005 0.0655317
@H -0.0003355 -0.1153399 1.062283
$end

$rem
method = b3lyp
dft_d = d3_bj
basis = def2-tzvp
gui = 2
jobtype = nmr
scf_convergence = 7
unrestricted = true
scf_guess_mix = true
$end


Adding empirical dispersion correction

Doing -D3(BJ) with
s6 = 1.00000
s8 = 1.98890
a1 = 0.39810
a2 = 4.42110

-D3 energy without 3body term = -0.0137225906 hartrees

         Standard Nuclear Orientation (Angstroms)
I     Atom           X                Y                Z

1      C      -0.7106358982    -1.0086841350    -0.0134045756
2      C      -1.1488630022     0.3379003453     0.0952511860
3      C       0.7096389299    -1.0094262766    -0.0133865410
4      C       1.1492655317     0.3367070310     0.0952708928
5      C       0.0006324234     1.1695006789     0.1639273562
6      H      -1.3463721486    -1.8796283323    -0.0809842859
7      H      -2.1762724016     0.6712264630     0.1225256298
8      H       1.3444752130    -1.8810281798    -0.0809549058
9      H       2.1770182737     0.6689705827     0.1225633337

10 H 0.0011891208 2.2463889046 0.2511951263
11 GH 0.0000076000 -0.0348005000 0.0655317000
12 GH -0.0003355000 -0.1153399000 1.0622830000

Nuclear Repulsion Energy = 148.49617389 hartrees
There are 18 alpha and 16 beta electrons
Requested basis set is def2-TZVP
There are 83 shells and 197 basis functions

Total QAlloc Memory Limit 16000 MB
Mega-Array Size 188 MB
MEM_STATIC part 192 MB

                   Distance Matrix (Angstroms)
         C (  1)   C (  2)   C (  3)   C (  4)   C (  5)   H (  6)

C ( 2) 1.420260
C ( 3) 1.420275 2.298069
C ( 4) 2.298069 2.298129 1.420265
C ( 5) 2.298225 1.420428 2.298228 1.420428
H ( 6) 1.080403 2.233272 2.233608 3.342367 3.342393
H ( 7) 2.233532 1.080472 3.342387 3.342432 2.233586 2.690169
H ( 8) 2.233613 3.342369 1.080404 2.233274 3.342395 2.690848
H ( 9) 3.342388 3.342430 2.233540 1.080472 2.233584 4.353282
H ( 10) 3.342485 2.233667 3.342490 2.233669 1.080419 4.353192
GH( 11) 1.208178 1.208177 1.208180 1.208179 1.208314 2.288579
GH( 12) 1.568341 1.568341 1.568604 1.568771 1.567756 2.496315
H ( 7) H ( 8) H ( 9) H ( 10) GH( 11)
H ( 8) 4.353283
H ( 9) 4.353291 2.690175
H ( 10) 2.690545 4.353196 2.690544
GH( 11) 2.288650 2.288582 2.288651 2.288733
GH( 12) 2.497305 2.496631 2.497816 2.497124 1.000000

A cutoff of 1.0D-11 yielded 3411 shell pairs
There are 19619 function pairs ( 25039 Cartesian)
Smallest overlap matrix eigenvalue = 4.58E-05

Scale SEOQF with 1.000000e-01/1.000000e-01/1.000000e+00

Standard Electronic Orientation quadrupole field applied
Nucleus-field energy = 0.0000000033 hartrees
Guess from superposition of atomic densities
Warning: Energy on first SCF cycle will be non-variational
SAD guess density has 35.000000 electrons


General SCF calculation program by
Eric Jon Sundstrom, Paul Horn, Yuezhi Mao, Dmitri Zuev, Alec White,
David Stuck, Shaama M.S., Shane Yost, Joonho Lee, David Small,
Daniel Levine, Susi Lehtola, Hugh Burton, Evgeny Epifanovsky,
Bang C. Huynh

Exchange: 0.2000 Hartree-Fock + 0.0800 Slater + 0.7200 B88
Correlation: 0.1900 VWN1RPA + 0.8100 LYP
Using SG-1 standard quadrature grid
Dispersion: Grimme D3
Warning: Doing roothaan step to get MOs for guess: SCF_GUESS_MIX
using 4 threads for integral computing

OpenMP Integral computing Module
Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh


OpenMP BLAS3 based DFT computing Module
Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh

Mixing HOMO and LUMO in initial guess
Adding 10% of the LUMO to the HOMO

OpenMP BLAS3 based DFT computing Module
Release: version 1.0, May 2013, Q-Chem Inc. Pittsburgh

A unrestricted SCF calculation will be
performed using DIIS
SCF converges when DIIS error is below 1.0e-07

Cycle Energy DIIS error

1    -193.2220400856      1.20e-03  
2    -193.2271227934      1.06e-03  
3    -193.2485696039      3.00e-04  
4    -193.2498456135      1.76e-04  
5    -193.2505220929      2.60e-05  
6    -193.2505405546      5.88e-06  
7    -193.2505430203      4.76e-06  
8    -193.2505437572      1.30e-06  
9    -193.2505438793      2.84e-07  

10 -193.2505438863 6.07e-08 Convergence criterion met

SCF time: CPU 56.61s wall 14.00s
<S^2> = 2.004199755
SCF energy in the final basis set = -193.2505438863
Total energy in the final basis set = -193.2505438863
WARNING! The DFT part of the D-SCF code is not yet well tested
WARNING: SYMMETRY USAGE disabled in D-CPSCF for now…
====================================================
=== ===
=== D-GIAO-SCF ===
=== ===
=== J.Kussmann and C.Ochsenfeld ===
=== ===
=== ===
====================================================
MakeEFS time: CPU 0.10 s wall 0.02 s
=============================================
=== ===
=== Let’s do D-CPSCF ===
=== ===
=============================================
Using standard thresholds as set in input file
LEQS: solver= 40 itmax= 100 lev2max= 75 tol= 0e+00 lev2tol= 1e-02
itol= 2 dodiis = 5
Sinv time: CPU 0.02 s wall 0.01 s
There are 3 perturbations to be evaluated (Bx, By, Bz)
GIAO-D-CPSCF will evaluate 3 perturbation(s) at once

NEXT PERTURBATION(S)… 0 → 2

Build one-electron first derivatives… (d/dB)

getshB time: CPU 0.05 s wall 0.01 s
getPSxP time: CPU 0.03 s wall 0.01 s

Calculating d/dB J and d/dB K

That’s not a mistake; the file just ends, and always in that place.

It stops there because there’s some memory corruption. If you run from command line or else look at the stderr that comes back from your batch scheduler, you will find clear evidence of this, e.g.,

*** Error in `/fs/project/PAS0291/herbert/qchem-trunk/build/qcprog.exe': corrupted size vs. prev_size: 0x00000000205cfaf0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x7f474)[0x2b4f711ed474]
/lib64/libc.so.6(+0x82c84)[0x2b4f711f0c84]
/lib64/libc.so.6(__libc_malloc+0x4c)[0x2b4f711f378c]
/fs/project/PAS0291/herbert/qchem-trunk/build/qcprog.exe[0xa963322]
/fs/project/PAS0291/herbert/qchem-trunk/build/qcprog.exe[0xa985d95]

This is a bug, please contact Q-Chem support. It may be that triplet states are simply not supported, in which case we should backstop this to prevent you from getting this far.