qcxms / QCxMS

Quantum mechanic mass spectrometry calculation program
https://xtb-docs.readthedocs.io/en/latest/qcxms_doc/qcxms.html
GNU Lesser General Public License v3.0
35 stars 21 forks source link

QCxMS v5.1.1 and Orca v5.0.1 grid issue #23

Closed tobigithub closed 3 years ago

tobigithub commented 3 years ago

Orca 3.0.0 runs fine with qcxms v5.1.1, but with ORCA 5.0.1 there is an error.

   Program Version 5.0.1 -  RELEASE  -
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                                 INPUT ERROR
            UNRECOGNIZED OR DUPLICATED KEYWORD(S) IN SIMPLE INPUT LINE
                  NOFINALGRID              GRID2
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[file orca_main/maininp4.cpp, line 11063]:

the ORCA.INPUT file, generated by QCxMS v5.1.1:

! CONV SMALLPRINT NORI NOSOSCF
! NOFINALGRID NOMAYER
! UHF
! def2-SVP
! GRID2
! PBE0 D3
%output
 Print[ P_AtPopMO_L] 1  end
%output
 Print[ P_AtPopMO_M] 1  end
%method
 runtyp energy
end
%elprop
 dipole false
end
%scf
 SmearTemp  10000.
 maxcore     5000
 MaxIter  400
end
* xyz   1  1
O         0.000000000000        0.000000000000        0.000000000000
C         0.000000000000        0.000000000000        1.546000150173
C         1.509354146648        0.000000000000        1.880616182691
C         2.065338200627        1.075069104468        0.918730089273
C         1.202221116795        0.869825084484       -0.347374033756
H        -0.459782044652        0.929692090302        1.921343186641
H        -0.476802046315       -0.885923086055        1.998115194113
H         1.940819188552       -0.984445095646        1.633000158646
H         1.648971160214        0.233932022717        2.949443286564
H         3.151686306163        0.930424090411        0.794090077166
H         1.887893183415        2.076822201790        1.344891130666
H         1.809833175849        0.389425037833       -1.132633110053
H         0.840971081702        1.847422179496       -0.708499068819
H        -0.740020390057        0.447672803199       -0.279007899106
*

the qcxms.in file (THF example in CID mode):

orca
pbe0
def2-svp
cid
elab 40
maxcoll 3
noesi
ntraj 24

I can run ORCA 5.0.1 when deleting both grid commands "NOFINALGRID" and "! GRID2" like so:

! CONV SMALLPRINT NORI NOSOSCF
! NOMAYER
! UHF
! def2-SVP
! PBE0 D3
%output
 Print[ P_AtPopMO_L] 1  end
%output
 Print[ P_AtPopMO_M] 1  end
%method
 runtyp energy
end
%elprop
 dipole false
end
%scf
 SmearTemp  10000.
 maxcore     5000
 MaxIter  400
end
* xyz   1  1
O         0.000000000000        0.000000000000        0.000000000000
C         0.000000000000        0.000000000000        1.546000150173
C         1.509354146648        0.000000000000        1.880616182691
C         2.065338200627        1.075069104468        0.918730089273
C         1.202221116795        0.869825084484       -0.347374033756
H        -0.459782044652        0.929692090302        1.921343186641
H        -0.476802046315       -0.885923086055        1.998115194113
H         1.940819188552       -0.984445095646        1.633000158646
H         1.648971160214        0.233932022717        2.949443286564
H         3.151686306163        0.930424090411        0.794090077166
H         1.887893183415        2.076822201790        1.344891130666
H         1.809833175849        0.389425037833       -1.132633110053
H         0.840971081702        1.847422179496       -0.708499068819
H        -0.740020390057        0.447672803199       -0.279007899106
*

the result when running orca ORCA.INPUT will be

 -------------------------   --------------------
FINAL SINGLE POINT ENERGY      -232.322982847872
-------------------------   --------------------

                            ***************************************
                            *     ORCA property calculations      *
                            ***************************************

                                    ---------------------
                                    Active property flags
                                    ---------------------

Timings for individual modules:

Sum of individual times         ...        6.533 sec (=   0.109 min)
GTO integral calculation        ...        1.019 sec (=   0.017 min)  15.6 %
SCF iterations                  ...        5.514 sec (=   0.092 min)  84.4 %
                             ****ORCA TERMINATED NORMALLY****
TOTAL RUN TIME: 0 days 0 hours 0 minutes 6 seconds 632 msec

when running qcxms the routine has to quit

 qcxms -qcp "/home/ubuntu/orca"
Fri Aug 27 04:39:52 UTC 2021

                      *********************************************
                      *                                           *
                      *            Q   C   x   M   S              *
                      *                                           *
                      *                  V5.1.0                   *
                      *                                           *
                      *                S. Grimme                  *
                      * Mulliken Center for Theoretical Chemistry *
                      *             Universitaet Bonn             *
                      *                  2008-21                  *
                      *        Aug 06 20:00:00 CEST 2021          *
                      *                                           *
                      *********************************************

 QCxMS is free software: you can redistribute it and/or  modify it under
 the terms of the GNU Lesser General Public License as  published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

 QCxMS is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

Cite this work as:
S.Grimme, Angew.Chem.Int.Ed. 52 (2013) 6306-6312.

for the CID module:
J. Koopman, S. Grimme, J. Am. Soc. Mass Spectrom., (2021),  DOI: 10.1021/jasms.1c00098

for the GFN1-xTB implementation:
V. Asgeirsson, C.Bauer, S. Grimme, Chem. Sci. 8 (2017) 4879

for the GFN2-xTB implementation:
 J. Koopman, S. Grimme, ACS Omega 4 (12) (2019) 15120-15133,  DOI: 10.1021/acsomega.9b02011

--------------------------------------------------
Current Dev. : J. Koopman
Former Dev.  : V.Asgeirsson, C.Bauer
--------------------------------------------------

 changed by input:
>orca
>pbe0
>def2-svp
>cid
>elab 40
>maxcoll 3
>noesi
>ntraj 24

              ************************************************************
                       Mode: Collision Induced Dissociation (CID)
                                   Positive Ion mode
              ************************************************************
----- Internal program parameters -----

 QC Program            : ORCA
 QC Level              : PBE0/def2-SVP
 QC Level for IPs      : PBE0/def2-SVP
 Dispersion            : D3

 total traj.   (ntraj) :   24
 time steps    (tstep) :    0.50 fs
 max. sim. time (tmax) :    5.00 ps
 Initial temp. (tinit) :  500.00 K

----------- CID settings -----------
 Collision Gas         : Ar
 E (LAB)               :   40.00 eV
 Run - Type            : Forced
 Maximum collisions    :  3

--------------------------------------------
 qc path              /home/ubuntu/orca
--------------------------------------------

 molecule:
  1     0.000000     0.000000     0.000000    O   15.9994
  2     0.000000     0.000000     2.921517    C   12.0107
  3     2.852266     0.000000     3.553849    C   12.0107
  4     3.902923     2.031586     1.736148    C   12.0107
  5     2.271868     1.643731    -0.656442    C   12.0107
  6    -0.868862     1.756863     3.630812    H    1.0079
  7    -0.901025    -1.674152     3.775890    H    1.0079
  8     3.667616    -1.860331     3.085923    H    1.0079
  9     3.116104     0.442067     5.573640    H    1.0079
 10     5.955823     1.758247     1.500613    H    1.0079
 11     3.567601     3.924625     2.541476    H    1.0079
 12     3.420089     0.735907    -2.140366    H    1.0079
 13     1.589205     3.491122    -1.338869    H    1.0079
 14    -1.398436     0.845979    -0.527248    H    1.0079

 reading qcxms.gs ...

 initializing ORCA ...
[file orca_main/maininp4.cpp, line 11063]:

 QM code initialization failure
fatal QC error. Must stop!

Solution: for orca 5.0.1 acccoring to the orca_manual_5_0_1.pdf change grid definitions to "DefGrid2" T.

JayTheDog commented 3 years ago

As discussed in issue #18 , the option is now inside the source code. @tobigithub , you can pull, compile and test it. If it works, I will close this issue and leave issue #18 open for now.

tobigithub commented 3 years ago

Currently testing qcxms v5.1.2, so compilation works, and orca 3.0 is not supported anymore, orca 4.0 works fine. Orca 5.0.1 fails: test case ethanol protonated, DFT with ORCA 5.0.1

$cat qcxms.in
orca
pbe
sv
cid
elab 40
maxcoll 1
noesi
ntraj 3

and running qcxms

qcxms
Wed Sep  1 14:23:58 PDT 2021

                      *********************************************
                      *                                           *
                      *            Q   C   x   M   S              *
                      *                                           *
                      *                  V5.1.2                   *
                      *                                           *
                      *                S. Grimme                  *
                      * Mulliken Center for Theoretical Chemistry *
                      *             Universitaet Bonn             *
                      *                  2008-21                  *
                      *        Aug 27 10:30:00 CEST 2021          *
                      *                                           *
                      *********************************************

 QCxMS is free software: you can redistribute it and/or  modify it under
 the terms of the GNU Lesser General Public License as  published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

 QCxMS is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU Lesser General Public License for more details.

Cite this work as:
S.Grimme, Angew.Chem.Int.Ed. 52 (2013) 6306-6312.

for the CID module:
J. Koopman, S. Grimme, J. Am. Soc. Mass Spectrom., (2021),  DOI: 10.1021/jasms.1c00098

for the GFN1-xTB implementation:
V. Asgeirsson, C.Bauer, S. Grimme, Chem. Sci. 8 (2017) 4879

for the GFN2-xTB implementation:
 J. Koopman, S. Grimme, ACS Omega 4 (12) (2019) 15120-15133,  DOI: 10.1021/acsomega.9b02011

--------------------------------------------------
Current Dev. : J. Koopman
Former Dev.  : V.Asgeirsson, C.Bauer
--------------------------------------------------

 changed by input:
>orca
>pbe
>sv
>cid
>elab 40
>maxcoll 1
>noesi
>ntraj 3

              ************************************************************
                       Mode: Collision Induced Dissociation (CID)
                                   Positive Ion mode
              ************************************************************
----- Internal program parameters -----

 QC Program            : ORCA
 QC Level              : PBE/SV
 QC Level for IPs      : PBE/SV
 Dispersion            : D3

 total traj.   (ntraj) :    3
 time steps    (tstep) :    0.50 fs
 max. sim. time (tmax) :    5.00 ps
 Initial temp. (tinit) :  500.00 K

----------- CID settings -----------
 Collision Gas         : Ar
 E (LAB)               :   40.00 eV
 Run - Type            : Manual
 Maximum collisions    :  1

--------------------------------------------
 qc path              /usr/local/bin/
--------------------------------------------

 molecule:
  1     0.889669     0.055092    -1.147109    C   12.0107
  2     2.252889     1.551244     0.960635    C   12.0107
  3     3.063910     4.420376     0.038847    O   15.9994
  4    -0.417502     1.371467    -2.323004    H    1.0079
  5    -0.416852    -0.830932     0.120487    H    1.0079
  6     1.792282    -1.395510    -2.397677    H    1.0079
  7     4.140774     1.069094     1.608792    H    1.0079
  8     1.109262     1.997746     2.619163    H    1.0079
  9     1.852010     5.762194     0.435150    H    1.0079
 10     3.068213     4.641244    -1.824980    H    1.0079

 reading qcxms.gs ...
--- Checking QC method for ions ---

 initializing ORCA ...
[file orca_main/maininp4.cpp, line 11063]:

 QM code initialization failure
>>> fatal QC error. Must stop! <<<

and the created ORCA.INPUT file:

cat ORCA.INPUT
!  DEF2/J SMALLPRINT NOSOSCF
! NOFINALGRID NOMAYER
! UHF
! SV
! GRID2
! PBE D3BJ
%output
 Print[ P_AtPopMO_L] 1  end
%output
 Print[ P_AtPopMO_M] 1  end
%method
 runtyp energy
end
%elprop
 dipole false
end
%scf
 SmearTemp   5000.
 maxcore     5000
 MaxIter  400
end
* xyz   1  1
C         0.470792542713        0.029153417786       -0.607024031726
C         1.192177711979        0.820883127883        0.508346150328
O         1.621351267701        2.339162706129        0.020556957909
H        -0.220932587053        0.725748909788       -1.229280636996
H        -0.220588436464       -0.439710365680        0.063758771712
H         0.948434743655       -0.738472095025       -1.268795891855
H         2.191203671855        0.565740251594        0.851336185651
H         0.586996096610        1.057161930725        1.386001554286
H         0.980041477966        3.049221824277        0.230271522684
H         1.623628379946        2.456040939865       -0.965737774029
*

and the orca 5.0.1 error message:

 orca ORCA.INPUT

                                 *****************
                                 * O   R   C   A *
                                 *****************

                                            #,
                                            ###
                                            ####
                                            #####
                                            ######
                                           ########,
                                     ,,################,,,,,
                               ,,#################################,,
                          ,,##########################################,,
                       ,#########################################, ''#####,
                    ,#############################################,,   '####,
                  ,##################################################,,,,####,
                ,###########''''           ''''###############################
              ,#####''   ,,,,##########,,,,          '''####'''          '####
            ,##' ,,,,###########################,,,                        '##
           ' ,,###''''                  '''############,,,
         ,,##''                                '''############,,,,        ,,,,,,###''
      ,#''                                            '''#######################'''
     '                                                          ''''####''''
             ,#######,   #######,   ,#######,      ##
            ,#'     '#,  ##    ##  ,#'     '#,    #''#        ######   ,####,
            ##       ##  ##   ,#'  ##            #'  '#       #        #'  '#
            ##       ##  #######   ##           ,######,      #####,   #    #
            '#,     ,#'  ##    ##  '#,     ,#' ,#      #,         ##   #,  ,#
             '#######'   ##     ##  '#######'  #'      '#     #####' # '####'

                  #######################################################
                  #                        -***-                        #
                  #          Department of theory and spectroscopy      #
                  #    Directorship and core code : Frank Neese         #
                  #        Max Planck Institute fuer Kohlenforschung    #
                  #                Kaiser Wilhelm Platz 1               #
                  #                 D-45470 Muelheim/Ruhr               #
                  #                      Germany                        #
                  #                                                     #
                  #                  All rights reserved                #
                  #                        -***-                        #
                  #######################################################

                         Program Version 5.0.1 -  RELEASE  -

 With contributions from (in alphabetic order):
   Daniel Aravena         : Magnetic Suceptibility
   Michael Atanasov       : Ab Initio Ligand Field Theory (pilot matlab implementation)
   Alexander A. Auer      : GIAO ZORA, VPT2 properties, NMR spectrum
   Ute Becker             : Parallelization
   Giovanni Bistoni       : ED, misc. LED, open-shell LED, HFLD
   Martin Brehm           : Molecular dynamics
   Dmytro Bykov           : SCF Hessian
   Vijay G. Chilkuri      : MRCI spin determinant printing, contributions to CSF-ICE
   Dipayan Datta          : RHF DLPNO-CCSD density
   Achintya Kumar Dutta   : EOM-CC, STEOM-CC
   Dmitry Ganyushin       : Spin-Orbit,Spin-Spin,Magnetic field MRCI
   Miquel Garcia          : C-PCM and meta-GGA Hessian, CC/C-PCM, Gaussian charge scheme
   Yang Guo               : DLPNO-NEVPT2, F12-NEVPT2, CIM, IAO-localization
   Andreas Hansen         : Spin unrestricted coupled pair/coupled cluster methods
   Benjamin Helmich-Paris : MC-RPA, TRAH-SCF, COSX integrals
   Lee Huntington         : MR-EOM, pCC
   Robert Izsak           : Overlap fitted RIJCOSX, COSX-SCS-MP3, EOM
   Marcus Kettner         : VPT2
   Christian Kollmar      : KDIIS, OOCD, Brueckner-CCSD(T), CCSD density, CASPT2, CASPT2-K
   Simone Kossmann        : Meta GGA functionals, TD-DFT gradient, OOMP2, MP2 Hessian
   Martin Krupicka        : Initial AUTO-CI
   Lucas Lang             : DCDCAS
   Marvin Lechner         : AUTO-CI (C++ implementation), FIC-MRCC
   Dagmar Lenk            : GEPOL surface, SMD
   Dimitrios Liakos       : Extrapolation schemes; Compound Job, initial MDCI parallelization
   Dimitrios Manganas     : Further ROCIS development; embedding schemes
   Dimitrios Pantazis     : SARC Basis sets
   Anastasios Papadopoulos: AUTO-CI, single reference methods and gradients
   Taras Petrenko         : DFT Hessian,TD-DFT gradient, ASA, ECA, R-Raman, ABS, FL, XAS/XES, NRVS
   Peter Pinski           : DLPNO-MP2, DLPNO-MP2 Gradient
   Christoph Reimann      : Effective Core Potentials
   Marius Retegan         : Local ZFS, SOC
   Christoph Riplinger    : Optimizer, TS searches, QM/MM, DLPNO-CCSD(T), (RO)-DLPNO pert. Triples
   Tobias Risthaus        : Range-separated hybrids, TD-DFT gradient, RPA, STAB
   Michael Roemelt        : Original ROCIS implementation
   Masaaki Saitow         : Open-shell DLPNO-CCSD energy and density
   Barbara Sandhoefer     : DKH picture change effects
   Avijit Sen             : IP-ROCIS
   Kantharuban Sivalingam : CASSCF convergence, NEVPT2, FIC-MRCI
   Bernardo de Souza      : ESD, SOC TD-DFT
   Georgi Stoychev        : AutoAux, RI-MP2 NMR, DLPNO-MP2 response
   Willem Van den Heuvel  : Paramagnetic NMR
   Boris Wezisla          : Elementary symmetry handling
   Frank Wennmohs         : Technical directorship

 We gratefully acknowledge several colleagues who have allowed us to
 interface, adapt or use parts of their codes:
   Stefan Grimme, W. Hujo, H. Kruse, P. Pracht,  : VdW corrections, initial TS optimization,
                  C. Bannwarth, S. Ehlert          DFT functionals, gCP, sTDA/sTD-DF
   Ed Valeev, F. Pavosevic, A. Kumar             : LibInt (2-el integral package), F12 methods
   Garnet Chan, S. Sharma, J. Yang, R. Olivares  : DMRG
   Ulf Ekstrom                                   : XCFun DFT Library
   Mihaly Kallay                                 : mrcc  (arbitrary order and MRCC methods)
   Jiri Pittner, Ondrej Demel                    : Mk-CCSD
   Frank Weinhold                                : gennbo (NPA and NBO analysis)
   Christopher J. Cramer and Donald G. Truhlar   : smd solvation model
   Lars Goerigk                                  : TD-DFT with DH, B97 family of functionals
   V. Asgeirsson, H. Jonsson                     : NEB implementation
   FAccTs GmbH                                   : IRC, NEB, NEB-TS, DLPNO-Multilevel, CI-OPT
                                                   MM, QMMM, 2- and 3-layer-ONIOM, Crystal-QMMM,
                                                   LR-CPCM, SF, NACMEs, symmetry and pop. for TD-DFT,
                                                   nearIR, NL-DFT gradient (VV10), updates on ESD,
                                                   ML-optimized integration grids
   S Lehtola, MJT Oliveira, MAL Marques          : LibXC Library
   Liviu Ungur et al                             : ANISO software

 Your calculation uses the libint2 library for the computation of 2-el integrals
 For citations please refer to: http://libint.valeyev.net

 Your ORCA version has been built with support for libXC version: 5.1.0
 For citations please refer to: https://tddft.org/programs/libxc/

 This ORCA versions uses:
   CBLAS   interface :  Fast vector & matrix operations
   LAPACKE interface :  Fast linear algebra routines
   SCALAPACK package :  Parallel linear algebra routines
   Shared memory     :  Shared parallel matrices
   BLAS/LAPACK       :  OpenBLAS 0.3.15  USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell SINGLE_THREADED
        Core in use  :  Haswell
   Copyright (c) 2011-2014, The OpenBLAS Project

            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
                                 INPUT ERROR
            UNRECOGNIZED OR DUPLICATED KEYWORD(S) IN SIMPLE INPUT LINE
                         NOFINALGRID        GRID2
            !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[file orca_main/maininp4.cpp, line 11063]:

[file orca_main/maininp4.cpp, line 11063]:

I see two issues here:

1) in ORCA 5.01 NOFINALGRID is now NOFINALGRIDX The ORCA 5.0.1 handbook states: "Turn off the final grid in COSX (not recommended)."

2) The ORCA 5.0.1 grids are named: DEFGRID1, DEFGRID2 (default), DEFGRID3

ORCA5 Manual: Why are my old inputs not running anymore with ORCA-5? "ORCA 5 uses new grids, optimized via machine learning and extensively benchmarked on GMTKN55 as well as for gradients, frequencies, properties. The new DefGrid2 is larger but much more robust than the previous default and the upgrade to DefGrid3 is only required in rare cases. For more information, consult section 9.3. The old grids are deprecated and the !Grid[1-7] and !GridX[1-9] keywords are no longer available! If you need to compare results to a previous version of ORCA (or indeed any other program), use sufficiently large grids in both programs"

So changing the ORCA.INPUT to the correct parameters for ORCA 5.0.1, works:

!  DEF2/J SMALLPRINT NOSOSCF
! NOFINALGRIDX NOMAYER
! UHF
! SV
! DEFGRID2
! PBE D3BJ
%output
 Print[ P_AtPopMO_L] 1  end
%output
 Print[ P_AtPopMO_M] 1  end
%method
 runtyp energy
end
%elprop
 dipole false
end
%scf
 SmearTemp   5000.
 maxcore     5000
 MaxIter  400
end
* xyz   1  1
C         0.470792542713        0.029153417786       -0.607024031726
C         1.192177711979        0.820883127883        0.508346150328
O         1.621351267701        2.339162706129        0.020556957909
H        -0.220932587053        0.725748909788       -1.229280636996
H        -0.220588436464       -0.439710365680        0.063758771712
H         0.948434743655       -0.738472095025       -1.268795891855
H         2.191203671855        0.565740251594        0.851336185651
H         0.586996096610        1.057161930725        1.386001554286
H         0.980041477966        3.049221824277        0.230271522684
H         1.623628379946        2.456040939865       -0.965737774029
*
tobigithub commented 3 years ago

Hi, I think this needs to be added to the documentation (https://xtb-docs.readthedocs.io/en/latest/qcxms_doc/qcxms.html),

in qcxms.in: set orca4 or orca5 [default] for the different ORCA versions

I will rerun the examples, potentially the errors will resolve. Tobias

JayTheDog commented 3 years ago

It seems that the compilation of the new version did not work for you, because otherwise the program would state:

QC Program : ORCA 5

Here, nofinalgrid was deleted and defgrid added, it runs as expected. However, I did some tests with the new ORCA version, and some strange things are occurring for the program where I'm not sure of where they stem from. I saw that ORCA 5.0.1 has quite some major bug reports and thus I will re-set ORCA4 as the default for the next release until ORCA5 has fixed some of its issues.

tobigithub commented 3 years ago

@JayTheDog Sorry, might have been my fault, because I downloaded the tar.gz from the release 6 days ago, but I did not use git. I don't have the latest changes including:


        ! Set mayer and finalgrid
        if ( orca_version == 4 ) write(io_orca,'(''! NOFINALGRID NOMAYER'')')
        if ( orca_version == 5 ) write(io_orca,'(''! NOMAYER'')')
JayTheDog commented 3 years ago

I will add the nofinalgridx again. I don't really see the necessity for ORCA 3, but adding it should not be a problem.

tobigithub commented 3 years ago

So i cloned the latest from git and ORCA5 works with "orca5" in the qcxms in file! Thank you.