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
42 stars 22 forks source link

Issue about pqcxms fails #57

Closed s645320041 closed 2 years ago

s645320041 commented 2 years ago

This is the coord file converted from a .xyz:

$coord 10.01954149561270 -1.05046096274847 0.00002078698746 c 9.87346566554064 1.58875890033161 0.00007558904532 c 7.54618100548985 2.86772743679475 0.00009826575891 c 5.39551770872310 1.38786400487067 0.00006236096239 c 5.50412404903230 -1.26658516111434 0.00000566917840 c 7.82102655370901 -2.51440534172912 -0.00001511780906 c 2.82746115235522 2.16615149215189 0.00007747877145 n 1.26597288984728 0.16848420255582 0.00003590479652 c 2.90658398553914 -2.21781471489885 -0.00002267671359 c 2.05132795286549 -4.35658407538523 -0.00005858151012 o -1.33877647884283 0.15533737784933 0.00003590479652 c -2.79105368867905 -2.04017289950307 -0.00001133835680 n -5.29044704600852 -1.40688598812430 0.00000000000000 c -5.52222762538534 1.30010323353333 0.00006047123625 c -3.04112870674833 2.24640816101554 0.00008314794985 c -7.43580966097254 -2.95804689731602 -0.00003590479652 c -9.76859720352228 -1.77581344159530 -0.00001133835680 c -10.03312673678201 0.89937924815040 0.00004913287946 c -7.94413654208811 2.44456295358380 0.00008503767598 c -2.15459581684929 4.61589607479206 0.00013606028157 o 11.85351125894755 -1.96234830817244 0.00000377945227 h 11.60225894149747 2.69032939607011 0.00010204521118 h 7.46337509607294 4.91516633327876 0.00014172945997 h 7.89212749945883 -4.56256989304816 -0.00005858151012 h 2.22979557858134 3.98292096822522 0.00011905274637 h -2.00396385707085 -3.78429752357601 -0.00005480205785 h -7.27092916615213 -4.99970890101180 -0.00008125822371 h -11.46349446183355 -2.92938731078467 -0.00003779452266 h -11.91233843346428 1.71334665454663 0.00006614041465 h -8.15346906473238 4.48548796408775 0.00013039110317 h -3.51726410319020 5.83839959440457 0.00016062672130 h $end

Parameters in qcxms.in were: xtb2 cid elab 30 ntraj 300

Everything run normally until the step of "pqcxms". The input parameters were "./pqcxms -j 2 -t 6" (with a 12 cores CPU), following "starting 2 qcxms runs, each using 6 threads" and ended without any information given subsequently.

Meantime, qcxms.out files in every TMP. folders showed "wrapped_qcxms: 3: exec: : permission denied".

So is my input file or some system settings not appropriate?

Thank You!

tobigithub commented 2 years ago

Hi, multiple things are happening here 1) the structure you put in has a valence error (there is a hydrogen missing), so you need to add a hydrogen to carbon that only has three valence bonds. image 2) Your input structure was also not protonated, so after correcting for the (v3) valence error the molecule also needs to be protonated. To create a positive ionization mode [M+H]+ CID spectrum you need to add a proton manually or automatically. You can do that with CREST and XTB. Once you have the correct charge and proton added and the structure is 3D optimized you can calculate the QCxMS spectrum. Protonated-structure 3) QCxMS does not alert the user about the valence error or a neutral molecule (no pos/neg charge applied).

4) Even when the correct protomer is submitted, without the noESI parameter the molecule still does not calculate. That means one has to set the noESI parameter to get a proper calculation. QCxMS error: Number of fragmentations (CollSec) and Number of collisions (CollNo) cant be set both!

5) Finally, the molecule will take many CID steps to fragment and a much higher CID energy maybe needs to be applied. I would start with maybe 6 trajectories for testing and see if it fragments at all. The working configuration is attached below.

New qcxms.in:

xtb2  
cid  
elab 60   
noesi  
ntraj 6  

New coord file with protonated input molecule, derived from (SCHEMBL21708187) https://pubchem.ncbi.nlm.nih.gov/compound/146368162

$coord
    0.96292653840792      4.58177404641931     -2.65306390949366      o
   -0.84239559716883      4.32041620545916      2.07958034121752      o
    2.60205793824408     -1.38497690006722      2.99203580726081      n
    0.84864251357515     -2.11826393337194     -2.11686572274439      n
    2.21849370350852      0.82408919469667      1.45789766954189      c
    1.32169753595897      0.26341014910539     -1.19558038004610      c
    0.15418849836078      2.23220816673914      2.83103326867605      c
   -0.50796194604380      0.83120393437774      4.96571201531417      c
    1.08011634049000     -1.35544187213891      5.02785985847295      c
    0.77257748095754      2.01194939761378     -3.02539372033744      c
   -0.02298666996942      0.67701185574184     -5.21893426650942      c
    0.04658569397335     -1.91580407245308     -4.56694308348322      c
   -2.31503016248182      1.24749186874848      6.88354820607857      c
    0.87242698679722     -3.09356942549575      6.99774062171311      c
   -0.78926167109236      1.41143213342626     -7.63789951647706      c
   -0.62589974008760     -3.77832033843132     -6.29179389994245      c
   -2.48308954917678     -0.48710348393559      8.79094117142204      c
   -0.90080574157635     -2.62829196498724      8.84264882670567      c
   -1.45471065795942     -0.44701723481702     -9.32573903615276      c
   -1.37289571654396     -3.00604019945448     -8.66248058862931      c
    3.94228146228401      1.98647254520054      1.35912513865195      h
    4.05365566831020     -2.58724621952295      2.73677936094522      h
   -0.17773292515340      4.90871684113726      0.42585774009299      h
   -3.50058915462276      2.90184335334193      6.80713104378455      h
    2.06869259438638     -4.74148217382002      7.06996009908294      h
   -0.85958214699445      3.38005466050958     -8.17185608647529      h
   -0.56389595377489     -5.75190106637147     -5.78661636915677      h
   -3.83789513711236     -0.23087405543277     10.29070445790255      h
   -1.09379301411141     -3.94573417994213     10.38794889691043      h
   -2.05274725201753      0.06644835356164    -11.20507137587415      h
   -1.91050435556663     -4.40153979113872    -10.04704835070724      h
    0.70641131944225      5.43390964447028     -4.24375683224339      h
    1.07353277050834     -3.74599827003737     -1.16437079379988      h
$end
$set
 chrg  1
 ewin_conf 50.0
$end
s645320041 commented 2 years ago

Thank you for applying.

I tried the new coord file and qcxms.in, two steps of qcxms ended normally, but the problem with pqcxms still remained.

There are 4 files in every TMP folder after running pqcxms which was ended suddenly: qcxms .in qcxms.out qcxms.start start.xyz

And qcxms.out still showed "wrapped_qcxms: 3: exec: : permission denied"

无标题

This problem also happened when using the example molecule tetrahydrofuran in /EXAMPLE/CID folder

Thanks again!

tobigithub commented 2 years ago

Could be multiple reasons, I see you copied the runs to the main executable folder, that is not how it works. Go to the main folder where all the executables are.

First edit the ".envrc" file with "nano .envrc" then change the folders and adjust the CPU count in OMP_NUM_THREADS, this should be true CPU count, not thread count otherwise everything will take very very long. Once edited, save it.

export XTBHOME=/home/hp/qcxms/.XTBPARAM
export PATH=$PATH:/home/hp/qcxms
export OMP_NUM_THREADS=8
ulimit -s unlimited

Then in the same folder where the executables and scripts are you need to execute on the command line:

source .envrc

Then change into the example folder for THF:

cd EXAMPLE/CID/Tetrahydrofuran/

then execute qcxms twice and then pqcxms

qcxms
qcxms
pqcxms

If you still have errors maybe check permissions on the folders, do you have access and own all the folders, and also check if all the *.sh scripts can be executed (+x)

ls -l

-rwxr-xr-x 1 hp hp    Oct  24  2022 pqcxms
-rwxrwxr-x 1 hp hp    Oct  24  2022 qcxms

If there is no "x" as the last letter for pqcxms, you need to add

chmod +x pqcxms

See also https://www.shells.com/l/en-US/tutorial/How-to-Fix-Shell-Script-Permission-Denied-Error-in-Linux

s645320041 commented 2 years ago

After I added

export XTBHOME=/home/hp/qcxms/.XTBPARAM export PATH=$PATH:/home/hp/qcxms export OMP_NUM_THREADS=8 ulimit -s unlimited

pqcxms could run normally now.

All executables and folders were made sure to have appropriate permissions.

I noticed that this problem happened after I updated qcxms from 5.1.3 to 5.2.1 and wondered if some settings on my PC were not updated in time.

Thanks very much for assisting!

tobigithub commented 2 years ago

@s645320041 Can you post the spectrum here or in the discussion forum thanks.