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
40 stars 21 forks source link

internal error inside getieeab #78

Open jbarrozom opened 1 year ago

jbarrozom commented 1 year ago

After successfully running the initial ground state trajectory, I get this error when I try to generate the fragmentation runs:

preparing the IEE distribution ... internal error inside getieeab

A smaller system of the same kind ran without any issue... Should I increase the ieeatm? Thank your for your assistance.

Best, Jorge

tobigithub commented 1 year ago

@jbarrozom all input files plz.

jbarrozom commented 1 year ago

@jbarrozom all input files plz.

I used the coord file (attached as coord.txt) with the default input parameters, no qcxms.in

qcxms.out.txt

coord.txt

JayTheDog commented 1 year ago

Hi, at what point do you get this error? Can you send the erroneous output file as well? Nevertheless, I see the two issues here:

jbarrozom commented 1 year ago

Hi, at what point do you get this error? Can you send the erroneous output file as well? Nevertheless, I see the two issues here:

  • the molecule is pretty large, so the default IEE/atm value is probably not the best fitting for this type of molecule. I would increase both, ieeatm and eimp0, as you probably need more energy distributed among the atoms. Maybe the latter first.
  • I have no experience with Dy atoms in a molecule, but xTB should be parametrized for it. I wonder if the atoms require more IEE anyways.

Yeah, I've done some somewhat smaller systems containing Dy atoms before with no issues. I can't use the plotms cause there's no Dy defined there; but I can plot the MS from the .res files though. I'll give it a try increasing the ieeatm and eimp0 though.

Thanks!

JayTheDog commented 1 year ago

Did it work after increasing the parameters?

For Dy, maybe @gorges97 could implement it, if it would be something you really would like to have in PlotMS.

jbarrozom commented 1 year ago

Did it work after increasing the parameters?

For Dy, maybe @gorges97 could implement it, if it would be something you really would like to have in PlotMS.

No luck with eimp0=100 and ieeatm=1.20; right now, I'm trying eimp0=200 and ieeatm=2.00

gorges97 commented 1 year ago

eimp0=100 and ieeatm 0.8 works, for example. (The more you increase ieeatm, the more you have to increase eimp0 to get the Poisson distribution converged.) As for the isotopic masses in Plotms, I will add all elements up to Z=86 for the sake of completeness. Since xTB is parameterised for everything up to that point, missing isotopic masses should not be the problem.

jbarrozom commented 1 year ago

eimp0=100 and ieeatm 0.8 works, for example. (The more you increase ieeatm, the more you have to increase eimp0 to get the Poisson distribution converged.) As for the isotopic masses in Plotms, I will add all elements up to Z=86 for the sake of completeness. Since xTB is parameterised for everything up to that point, missing isotopic masses should not be the problem.

Yeah, I got the same error with eimp0=100 adn ieeatm=1.20. Hopefully, eimp0=200 and ieeatm=2.00 will work. It's strange since all the output files seem to have everything in place.

It would be great to have all the xtb-available elements in plotms!

gorges97 commented 1 year ago

eimp0=200 and ieeatm=2.00 does not work, but eimp0=210 does for ieeatm=2.00. However, ieeatm=2.00 is probably way too much energy. By the way, you can start from the same ground state trajectory to try new energy settings, you just need the file qcxms.gs in the directory. You don't need to create a new ground state trajectory for this.

jbarrozom commented 1 year ago

eimp0=200 and ieeatm=2.00 does not work, but eimp0=210 does for ieeatm=2.00. However, ieeatm=2.00 is probably way too much energy. By the way, you can start from the same ground state trajectory to try new energy settings, you just need the file qcxms.gs in the directory. You don't need to create a new ground state trajectory for this.

But if I try different energy settings to generate the fragmentation runs (with the qcxms.gs in the directory), the output file is not taking them into account. This is the output so far for eimp0=210 does for ieeatm=2.00:


              ************************************************************
                       Mode:          Electron Impact (EI)         
              ************************************************************

----- Internal program parameters -----

 QC Program            : xTB
 QC Level              : GFN2-xTB
 Dispersion            : D4
 MO spectrum with      : xTB     

 M+ Ion charge(charge) :    1
 total traj.   (ntraj) : 2300
 time steps    (tstep) :    0.50 fs
 sim. time / MD (tmax) :    5.00 ps
 Initial temp. (tinit) :  500.00 K

------------ EI settings -----------
 E(e-impact)   (eimp0) :   70.00 eV
 Iee/atom     (ieeatm) :    0.60 eV/atom
 relax. time  (trelax) : 2000.00 fs

--------------------------------------------
 qc path              /usr/local/bin/
--------------------------------------------
 xtbhome directory    ~/.XTBPARAM/
--------------------------------------------

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

 initializing GFN2-xTB ...
 initialization successful!
 energy =     -146.96771
 charge =              1
 mult   =              2
 etemp  =         5000.0
--- QC method okay ---

 *******************************************
       generating randomized ensemble 
 *******************************************
 reading inital coord/velo from qcxms.gs ...
 doing XTB2 for MO spectrum for M ...
 XTB-SCC levels (eV):
 M alpha/beta   -19.41  -19.36  -19.26  -19.20  -19.12  -19.06  -18.81  -18.48  -18.35  -18.28
 M alpha/beta   -18.25  -18.22  -18.18  -18.12  -16.97  -16.94  -16.81  -16.79  -16.69  -16.69
 M alpha/beta   -16.65  -16.63  -16.58  -16.56  -16.45  -16.44  -16.36  -16.34  -16.28  -16.27
 M alpha/beta   -16.14  -16.14  -15.83  -15.72  -15.66  -15.48  -15.33  -15.26  -15.24  -15.20
 M alpha/beta   -15.01  -14.96  -14.94  -14.71  -14.68  -14.62  -14.29  -14.17  -14.11  -14.08
 M alpha/beta   -14.06  -14.05  -13.97  -13.96  -13.93  -13.90  -13.89  -13.86  -13.85  -13.84
 M alpha/beta   -13.82  -13.82  -13.75  -13.75  -13.65  -13.65  -13.64  -13.59  -13.53  -13.53
 M alpha/beta   -13.46  -13.45  -13.38  -13.35  -13.21  -13.19  -13.09  -13.09  -12.73  -12.72
 M alpha/beta   -12.69  -12.60  -12.58  -12.57  -12.57  -12.57  -12.45  -12.44  -12.39  -12.37
 M alpha/beta   -12.34  -12.32  -12.29  -12.26  -12.25  -12.24  -12.19  -12.17  -12.16  -12.14
 M alpha/beta   -12.13  -12.11  -12.10  -12.09  -12.09  -12.05  -11.98  -11.97  -11.88  -11.77
 M alpha/beta   -11.02  -10.88  -10.69  -10.69  -10.55  -10.53  -10.01  -10.00   -9.97   -9.96
 M alpha/beta    -9.82   -9.81   -9.80   -9.75   -9.74   -9.73   -9.61   -9.60
 MO localization degree (number of centers)
 alpha/beta    14.20   19.30   15.90   11.97   14.19   13.24   16.96   13.93   13.80   17.20
 alpha/beta    17.30   17.73   16.23   12.03   31.94   21.63   23.88   15.42   37.34   23.36
 alpha/beta    29.56   21.72   32.02   21.59   11.32   11.12   24.45   25.21   14.35   13.99
 alpha/beta    12.91   13.17   36.06   46.73   39.70   34.83   36.12   43.50   30.30   36.93
 alpha/beta    37.76   33.66   36.19   22.77   39.65   24.87   41.31   37.67   31.26   37.05
 alpha/beta    26.18   25.73   28.02   37.82   25.68   30.94   42.33   37.58   39.47   49.69
 alpha/beta    23.00   20.98   36.14   34.40   16.16   15.75   28.75   34.35   33.89   28.53
 alpha/beta    19.42   23.43   26.74   27.25   33.17   42.86   21.59   20.24   25.48   14.64
 alpha/beta    32.04   17.93   13.22   12.12   35.56   26.55   15.76   16.79   37.29   49.50
 alpha/beta    28.48   45.98   43.14   46.40   12.92   14.21   47.33   30.01   30.28   38.43
 alpha/beta    27.79   46.69   37.96   36.50   17.29   17.96   19.24   22.33    6.91    3.90
 alpha/beta    22.39   11.60   10.51   14.04   12.46    9.71   16.55   14.44   14.67   15.44
 alpha/beta     6.74    5.54    6.70   10.15    4.75    4.68    6.24    6.98

 preparing the IEE distribution ...
internal error inside getieeab
gorges97 commented 1 year ago

That's strange. But if you re-calculate the ground state trajectory it works? Could you provide your qcxms.in file?

JayTheDog commented 1 year ago

You have to be careful increasing the iee to unrealistically high values. Lets see, you got 92 atoms with 70 eV, you would have a iee/atom of ~0.78 eV/atom. Did you try to increase the ieeatm to 0.8 without the eimp0? Alternatively, try 100 eV with 1 or 1.1 iee/atm. Does it still fail?

JayTheDog commented 1 year ago

That's strange. But if you re-calculate the ground state trajectory it works? Could you provide your qcxms.in file?

Well, check again what is written there. Isn't there some kind of MO file, that stores this information? (sorry, already some time ago that I used it)

jbarrozom commented 1 year ago

That's strange. But if you re-calculate the ground state trajectory it works? Could you provide your qcxms.in file?

This is my entire qcxms.in file, since I'm just moving these parameters, I kept everything else as default:

eimp0 200 ieeatm 2.00

I ran a quick test with methane, if I include this qcxms.in when computing the ground I do get these parameters:

----- Internal program parameters -----

QC Program : xTB QC Level : GFN2-xTB Dispersion : D4 MO spectrum with : xTB

M+ Ion charge(charge) : 1 total traj. (ntraj) : 125 time steps (tstep) : 0.50 fs sim. time / MD (tmax) : 5.00 ps Initial temp. (tinit) : 500.00 K

------------ EI settings ----------- E(e-impact) (eimp0) : 200.00 eV Iee/atom (ieeatm) : 2.00 eV/atom relax. time (trelax) : 2000.00 fs

jbarrozom commented 1 year ago

You have to be careful increasing the iee to unrealistically high values. Lets see, you got 92 atoms with 70 eV, you would have a iee/atom of ~0.78 eV/atom. Did you try to increase the ieeatm to 0.8 without the eimp0? Alternatively, try 100 eV with 1 or 1.1 iee/atm. Does it still fail?

I'll give it a try with those parameters, thanks!!

gorges97 commented 1 year ago

0.8 with default eimp0 won't work. As I said, if you increase ieeatm you have to increase eimp0 even more. If ieeatm=0.6 with eimp0=70 doesn't work, ieeatm=0.8 with eimp0=70 certainly doesn't work!

jbarrozom commented 1 year ago

Right now, I'm running the ground state with eimp0 200 and ieeatm 2.00, and it could be too much energy, but if it can get the fragmentation runs, then I can move the energy down.

jbarrozom commented 1 year ago

On an update: I was able to generate the fragmentation runs by changing to a gaussian IEE distribution.

On the other hand, I wasn't copying the qcxms.in in the working directory, that's why I had to re-run the ground state for every new setting I was trying.

Thank you!

gorges97 commented 1 year ago

Great, that is also a possible solution to this problem. Ok, very good, so everything works as it should after all and no energy distribution information is written from the ground state trajectory calculation. By the way, I have just published plotms version 6.2, which now contains the isotopes of all stable elements up to bismuth.

jbarrozom commented 1 year ago

Great, that is also a possible solution to this problem. Ok, very good, so everything works as it should after all and no energy distribution information is written from the ground state trajectory calculation. By the way, I have just published plotms version 6.2, which now contains the isotopes of all stable elements up to bismuth.

Awesome!