Multiwfn forum

Multiwfn official website: http://sobereva.com/multiwfn. Multiwfn forum in Chinese: http://bbs.keinsci.com/wfn

You are not logged in.

#1 2026-06-16 17:32:23

mverissi
Member
Registered: 2022-02-19
Posts: 14

Segmentation fault using LIBRETA for RESP calculation

Hi all,

I performed a calculation with ORCA 6.1.0 for five conformers of an ATP molecule, for which I want to calculate RESP charges, and generated the Molden input files from the corresponding gbw files. Both versions of the LIBRETA library gave me a segmentation fault at the beginning of the RESP calculation; only the old algorithm seems to work properly with the Molden input files generated from the gbw ones.

I'm using the latest version of Multiwfn (2026.6.2). Incidentally, looking into the bash scripts for ORCA calculations in the examples/RESP folder, I see that a file named Nval.txt, containing the valence-electron counts for the def2 pseudopotential basis sets, is prepended to the Molden input file generated by ORCA. Is this a necessary step if one wants to use the LIBRETA library? If so, should the valence-electron counts for other atoms (such as C, H, N, O, P) be added to this list?

Best regards,

Marcos


Marcos Verissimo Alves
Physics Department, Institute for Exact Sciences - Universidade Federal Fluminense
Volta Redonda, Brazil

Offline

#2 2026-06-16 23:59:19

sobereva
Tian Lu (Multiwfn developer)
From: Athens, Greece
Registered: 2017-09-11
Posts: 2,256
Website

Re: Segmentation fault using LIBRETA for RESP calculation

Dear Marcos,

Please first check if Multiwfn has been fully correctly installed, see Section 2.1.2 of Multiwfn manual.

If the installation is completely correct, please send me your ORCA input file, output file, and molden file of any conformer via E-mail, I will check the reason. Please don't worry about Nval.txt, it is automatically generated by the script and correct for def2-TZVP, which is used to perform SP calculation by the script.

Best regards,

Tian

Online

#3 2026-06-17 18:22:10

mverissi
Member
Registered: 2022-02-19
Posts: 14

Re: Segmentation fault using LIBRETA for RESP calculation

Dear Tian,

Thanks for your reply. All the environment variables are set in agreement with Section 2.1.2 of the Multiwfn manual. I sent you the requested files by email, along with a couple of other files I deemed relevant, in a .tgz file. If you don't receive them, please let me know and I can make them available via Google Drive.

Best,

Marcos


Marcos Verissimo Alves
Physics Department, Institute for Exact Sciences - Universidade Federal Fluminense
Volta Redonda, Brazil

Offline

#4 2026-06-18 00:03:20

sobereva
Tian Lu (Multiwfn developer)
From: Athens, Greece
Registered: 2017-09-11
Posts: 2,256
Website

Re: Segmentation fault using LIBRETA for RESP calculation

Dear Marcos,

I can normally run the calculation using your files on my RockyLinux 10 computer with Multiwfn 2026.6.2. Using 96 cores, the calculation is finished in about half a minute. All outputted information is given below:

 Multiwfn -- A Multifunctional Wavefunction Analyzer
 Version 2026.6.2 (release date is the same as version name)
 Developer: Tian Lu (Beijing Kein Research Center for Natural Sciences)
 Multiwfn official website: http://sobereva.com/multiwfn
 Multiwfn English forum: http://sobereva.com/wfnbbs
 Multiwfn Chinese forum: http://bbs.keinsci.com/wfn
 ( Number of parallel threads:  96  Current date: 2026-06-17  Time: 23:59:38 )

 Both following papers ***MUST BE CITED IN MAIN TEXT*** if Multiwfn is used:

  Tian Lu, Feiwu Chen, J. Comput. Chem., 33, 580 (2012) DOI: 10.1002/jcc.22885
  Tian Lu, J. Chem. Phys., 161, 082503 (2024) DOI: 10.1063/5.0216272

 See "How to cite Multiwfn.pdf" in Multiwfn binary package for more information

 Now input file path, for example, E:\Strawberry_Panic\Chikaru_Minamoto.mwfn
 (.mwfn/wfn/wfx/fch/molden/pdb/xyz/mol2/cif/cub... see Section 2.5 of manual)
 Hint: Pressing ENTER button directly can select a file in a GUI window. To reload the past file, inputting "o". Input such as ?miku.fch can open the miku.fch in the same folder as the past file
esp_0.molden.input
 Please wait...
 Loading various information of the wavefunction
 This file is recognized to be generated by ORCA because there is "orca" word in title line. Special treatments are applied...
 Loading basis set definition...
 All D basis functions are spherical harmonic type
 Loading orbitals...
 The actual number of orbitals read:       470
 Converting basis function information to GTF information...
 Back converting basis function information from Cartesian to spherical type...
 Generating density matrix...
 Generating overlap matrix...

 Total/Alpha/Beta electrons:    260.0000    130.0000    130.0000
 Net charge:    -4.00000      Expected multiplicity:    1
 Atoms:     43,  Basis functions:    470,  GTFs:    988
 This is a restricted single-determinant wavefunction
 Orbitals from 1 to   130 are occupied

 Loaded esp_0.molden.input successfully!

 Formula: H12 C10 N5 O13 P3      Total atoms:      43
 Molecule weight:       503.14971 Da
 Point group: C1

 "q": Exit program gracefully          "r": Load a new file
                    ************ Main function menu ************
 0 Show molecular structure and view orbitals
 1 Output all properties at a point       2 Topology analysis
 3 Output and plot specific property in a line
 4 Output and plot specific property in a plane
 5 Output and plot specific property within a spatial region (calc. grid data)
 6 Check & modify wavefunction
 7 Population analysis and calculation of atomic charges
 8 Orbital composition analysis           9 Bond order analysis
 10 Plot total DOS, PDOS, OPDOS, local DOS, COHP and photoelectron spectrum
 11 Plot IR/Raman/UV-Vis/ECD/VCD/ROA/NMR spectrum
 12 Quantitative analysis of molecular surface
 13 Process grid data (No grid data is presented currently)
 14 Adaptive natural density partitioning (AdNDP) analysis
 15 Fuzzy atomic space analysis
 16 Charge decomposition analysis (CDA) and plot orbital interaction diagram
 17 Basin analysis                       18 Electron excitation analysis
 19 Orbital localization analysis        20 Visual study of weak interaction
 21 Energy decomposition analysis        22 Conceptual DFT (CDFT) analysis
 23 ETS-NOCV analysis                    24 (Hyper)polarizability analysis
 25 Electron delocalization and aromaticity analyses
 26 Structure and geometry related analyses
 100 Other functions (Part 1)            200 Other functions (Part 2)
 300 Other functions (Part 3)
7
 NOTE: There is a review comprehensively introducing various atomic charges:
 Tian Lu, Qinxue Chen, Partial Charges, In Exploring Chemical Concepts Through T
 heory and Computation. WILEY-VCH GmbH: Weinheim (2024); pp. 161-187. DOI: 10.10
 02/9783527843435.ch6

      ============== Population analysis and atomic charges ==============
 -2 Calculate interaction energy between fragments based on atomic charges
 -1 Define fragment
 0 Return
 1 Hirshfeld atomic charge
 2 Voronoi deformation density (VDD) atom population
 5 Mulliken atom & basis function population analysis
 6 Lowdin atom & basis function population analysis
 7 Modified Mulliken atom population defined by Ros & Schuit (SCPA)
 8 Modified Mulliken atom population defined by Stout & Politzer
 9 Modified Mulliken atom population defined by Bickelhaupt
 10 Becke atomic charge with atomic dipole moment correction
 11 Atomic dipole corrected Hirshfeld atomic charge (ADCH) (recommended)
 12 CHELPG ESP fitting atomic charge
 13 Merz-Kollmann (MK) ESP fitting atomic charge
 14 AIM atomic charge
 15 Hirshfeld-I atomic charge
 16 CM5 atomic charge    -16 Generate 1.2*CM5 atomic charge
 17 Electronegativity Equalization Method (EEM) atomic charge
 18 Restrained ElectroStatic Potential (RESP) atomic charge
 19 Gasteiger (PEOE) charge
 20 Minimal Basis Iterative Stockholder (MBIS) charge
18

             ------------ Calculation of RESP charges ------------
 -1 Load list of conformer and weights from external file
 0 Return
 1 Start standard two-stage RESP fitting calculation
 2 Start one-stage ESP fitting calculation with constraints
 3 Set method and parameters for distributing fitting points, current: MK
 4 Set hyperbolic penalty and various other running parameters
 5 Set equivalence constraint in fitting, current: H in CH2 and CH3
 6 Set charge constraint in fitting, current: No constraint
 7 Set the way of determining connectivity, current: Guess from bond length
 8 Toggle if loading fitting points and ESP values from Gaussian output file of pop=MK/CHELPG task with IOp(6/33=2) during the calculation, current: No
 9 Load additional fitting centers, current: None
 10 Choose the atomic radii used in fitting, current: Automatic
 11 Choose ESP type, current: Nuclear + Electronic
-1
 Input path of the file containing conformer list, e.g. C:\conflist.txt
confs_weights
 There are    5 conformers
 Sum of weights:    1.000000

             ------------ Calculation of RESP charges ------------
-1 Reload list of conformers from external file, current:   5 conformers
 0 Return
 1 Start standard two-stage RESP fitting calculation
 2 Start one-stage ESP fitting calculation with constraints
 3 Set method and parameters for distributing fitting points, current: MK
 4 Set hyperbolic penalty and various other running parameters
 5 Set equivalence constraint in fitting, current: H in CH2 and CH3
 6 Set charge constraint in fitting, current: No constraint
 7 Set the way of determining connectivity, current: Guess from bond length
 8 Toggle if loading fitting points and ESP values from Gaussian output file of pop=MK/CHELPG task with IOp(6/33=2) during the calculation, current: No
 9 Load additional fitting centers, current: None
 10 Choose the atomic radii used in fitting, current: Automatic
 11 Choose ESP type, current: Nuclear + Electronic
5

 Please select options 1~3. You can also use options 10 or 11 to generate file containing equivalence constraint, which can then be utilized by option 1
 Note: For standard two-stage RESP fitting, options 0 and 1 only take effect for the first stage

 0 No equivalence constraint will be imposed
 1 Load equivalence constraint setting from external plain text file
 2 Constraint H in each =CH2, -CH2-, CH3 to be equivalent in one-stage fitting
 10 Export equivalence constraint corresponding to "H in each =CH2, -CH2-, CH3" to eqvcons_H.txt in current folder
 11 Generate equivalence constraint according to point group of global or local geometry and write to eqvcons_PG.txt in current folder
1
 Input path of the plain text file, e.g. C:\eqvcons.txt
 If pressing ENTER button directly, eqvcons.txt in current folder will be loaded
eqvcons.txt
 OK, equivalence constraint will be loaded from it during calculation

             ------------ Calculation of RESP charges ------------
-1 Reload list of conformers from external file, current:   5 conformers
 0 Return
 1 Start standard two-stage RESP fitting calculation
 2 Start one-stage ESP fitting calculation with constraints
 3 Set method and parameters for distributing fitting points, current: MK
 4 Set hyperbolic penalty and various other running parameters
 5 Set equivalence constraint in fitting, current: Customized
 6 Set charge constraint in fitting, current: No constraint
 7 Set the way of determining connectivity, current: Guess from bond length
 8 Toggle if loading fitting points and ESP values from Gaussian output file of pop=MK/CHELPG task with IOp(6/33=2) during the calculation, current: No
 9 Load additional fitting centers, current: None
 10 Choose the atomic radii used in fitting, current: Automatic
 11 Choose ESP type, current: Nuclear + Electronic
1
 Atomic radii used:
 Element:H      vdW radius (Angstrom): 1.200
 Element:C      vdW radius (Angstrom): 1.500
 Element:N      vdW radius (Angstrom): 1.500
 Element:O      vdW radius (Angstrom): 1.400
 Element:P      vdW radius (Angstrom): 1.800
 Generating fitting points and calculate ESP for conformer    1
 Number of MK fitting points used:     23208

 Initializing LIBRETA library (fast version) for ESP evaluation ...
 LIBRETA library has been successfully initialized!

 NOTE: The ESP evaluation code based on LIBRETA library is being used. Please cite Multiwfn original papers (J. Comput. Chem., 33, 580-592 (2012) and J. Chem. Phys., 161, 082503 (2024)) and the paper describing the efficient ESP evaluation algorithm adopted by Multiwfn (Phys. Chem. Chem. Phys., 23, 20323 (2021))

 Progress: [##################################################]   100.0 %     \
 Generating fitting points and calculate ESP for conformer    2
 Number of MK fitting points used:     22932

 Initializing LIBRETA library (fast version) for ESP evaluation ...
 LIBRETA library has been successfully initialized!

 NOTE: The ESP evaluation code based on LIBRETA library is being used. Please cite Multiwfn original papers (J. Comput. Chem., 33, 580-592 (2012) and J. Chem. Phys., 161, 082503 (2024)) and the paper describing the efficient ESP evaluation algorithm adopted by Multiwfn (Phys. Chem. Chem. Phys., 23, 20323 (2021))

 Progress: [##################################################]   100.0 %     /
 Generating fitting points and calculate ESP for conformer    3
 Number of MK fitting points used:     24706

 Initializing LIBRETA library (fast version) for ESP evaluation ...
 LIBRETA library has been successfully initialized!

 NOTE: The ESP evaluation code based on LIBRETA library is being used. Please cite Multiwfn original papers (J. Comput. Chem., 33, 580-592 (2012) and J. Chem. Phys., 161, 082503 (2024)) and the paper describing the efficient ESP evaluation algorithm adopted by Multiwfn (Phys. Chem. Chem. Phys., 23, 20323 (2021))

 Progress: [##################################################]   100.0 %     \
 Generating fitting points and calculate ESP for conformer    4
 Number of MK fitting points used:     23186

 Initializing LIBRETA library (fast version) for ESP evaluation ...
 LIBRETA library has been successfully initialized!

 NOTE: The ESP evaluation code based on LIBRETA library is being used. Please cite Multiwfn original papers (J. Comput. Chem., 33, 580-592 (2012) and J. Chem. Phys., 161, 082503 (2024)) and the paper describing the efficient ESP evaluation algorithm adopted by Multiwfn (Phys. Chem. Chem. Phys., 23, 20323 (2021))

 Progress: [##################################################]   100.0 %     /
 Generating fitting points and calculate ESP for conformer    5
 Number of MK fitting points used:     22904

 Initializing LIBRETA library (fast version) for ESP evaluation ...
 LIBRETA library has been successfully initialized!

 NOTE: The ESP evaluation code based on LIBRETA library is being used. Please cite Multiwfn original papers (J. Comput. Chem., 33, 580-592 (2012) and J. Chem. Phys., 161, 082503 (2024)) and the paper describing the efficient ESP evaluation algorithm adopted by Multiwfn (Phys. Chem. Chem. Phys., 23, 20323 (2021))

 Progress: [##################################################]   100.0 %     \
 Reloading the first file when Multiwfn boots up...

 No charge constraint is imposed in this stage
 Loading equivalence constraint setting from eqvcons.txt
 Atom equivalence constraint imposed in this fitting stage:
 Constraint   1:   14(O )   18(O )
 Constraint   2:   15(O )   19(O )
 Constraint   3:   16(O )   20(O )   24(O )
 Constraint   4:   32(H )   33(H )

 **** Stage 1: RESP fitting under weak hyperbolic penalty
 Convergence criterion:  0.0000010000
 Hyperbolic restraint strength (a): 0.000500    Tightness (b): 0.100000
 Iter:   1   Maximum charge variation:    1.5077332405
 Iter:   2   Maximum charge variation:    0.1107636558
 Iter:   3   Maximum charge variation:    0.0039944874
 Iter:   4   Maximum charge variation:    0.0001558212
 Iter:   5   Maximum charge variation:    0.0000063158
 Iter:   6   Maximum charge variation:    0.0000002668
 Successfully converged!

 **** Stage 2: RESP fitting under strong hyperbolic penalty
 Atom equivalence constraint imposed in this fitting stage:
 Constraint   1:   32(H )   33(H )
 Fitting objects: sp3 carbons, methyl carbons and hydrogens attached to them
 Indices of these atoms:
    4C    32H    33H     6C    34H     8C    35H    10C    36H    12C
   37H
 Convergence criterion:  0.0000010000
 Hyperbolic restraint strength (a): 0.001000    Tightness (b): 0.100000
 Iter:   1   Maximum charge variation:    1.5345257854
 Iter:   2   Maximum charge variation:    0.0125232048
 Iter:   3   Maximum charge variation:    0.0001932288
 Iter:   4   Maximum charge variation:    0.0000027221
 Iter:   5   Maximum charge variation:    0.0000000376
 Successfully converged!

   Center       Charge
     1(P )   1.4135630800
     2(P )   1.4241920085
     3(P )   1.3536680793
     4(C )   0.3760715582
     5(O )  -0.6307782017
     6(C )   0.2527058666
     7(O )  -0.7174906128
     8(C )   0.6780984537
     9(O )  -0.9591365413
    10(C )   0.1435696375
    11(O )  -0.9245005823
    12(C )   0.8770431354
    13(N )  -1.0284259720
    14(O )  -0.8952224744
    15(O )  -0.8323241779
    16(O )  -0.9465635221
    17(C )   0.5937863633
    18(O )  -0.8952224744
    19(O )  -0.8323241779
    20(O )  -0.9465635221
    21(N )  -0.7645206376
    22(O )  -0.6580604115
    23(O )  -0.5547605926
    24(O )  -0.9465635221
    25(C )   0.7500835753
    26(C )  -0.4617961113
    27(C )   1.4542593076
    28(N )  -1.5345257854
    29(N )  -0.6146215415
    30(C )   0.6056978690
    31(N )  -0.6829891638
    32(H )  -0.0477356295
    33(H )  -0.0477356295
    34(H )  -0.0545910770
    35(H )  -0.1429844986
    36(H )   0.0232647432
    37(H )  -0.1020603051
    38(H )   0.0253107478
    39(H )   0.0229862788
    40(H )   0.5191095206
    41(H )   0.5865250363
    42(H )   0.5380987896
    43(H )   0.5834631134
 Sum of charges:  -4.0000000000
 Conformer:    1   RMSE:    0.004924   RRMSE:    0.012598
 Conformer:    2   RMSE:    0.005126   RRMSE:    0.013223
 Conformer:    3   RMSE:    0.007300   RRMSE:    0.019247
 Conformer:    4   RMSE:    0.005913   RRMSE:    0.014901
 Conformer:    5   RMSE:    0.008026   RRMSE:    0.020533
 Weighted RMSE:    0.005650   Weighted RRMSE    0.014530

 Note: Because present calculation involves multiple conformers, the result cannot be exported to .chg file

So I still believe Multiwfn was not fully configurated on your system. I also provide relevant settings in my ~/.bashrc file here:

ulimit -s unlimited
export OMP_STACKSIZE=200M
export PATH=$PATH:/sob/Multiwfn_xxx_bin_Linux
export Multiwfnpath=/sob/Multiwfn_xxx_bin_Linux

Best regards,

Tian

Online

Board footer

Powered by FluxBB