USPEX 10.5: issue with @INCLUDE 'subsys.uspex' in CP2K

210 views
Skip to first unread message

Xavier Bidault

unread,
Aug 30, 2021, 9:38:05 AM8/30/21
to USPEX

Hello,

Used with CP2K, USPEX 10.5 creates a file containing the cell parameters and atom positions named "subsys.uspex", which can conveniently be included in the Specific files cp2k_options_1 with the line:
@include 'subsys.uspex'

The problem is that the section &SUBSYS in my cp2k_options_1 already contains info about atom types like:
&SUBSYS
&KIND C
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-NLCC-PBE-q4
&END KIND
&END SUBSYS
@include 'subsys.uspex'

and the keyword &SUBSYS cannot be used more than once, whereas it is also present in subsys.uspex:
&SUBSYS
&CELL
ABC [angstrom] 4.0505422775 5.829809608 2.280013981
ALPHA_BETA_GAMMA [deg] 90 90 90
PERIODIC XYZ
&END
&COORD
SCALED
C 0.3181270957 0.5 0
C 0.6818729043 0.5 0.5
C 0.6818729043 0.5 0
C 0.3181270957 0.5 0.5
C 0.725584507 0.1219883189 0.25
C 0.274415493 0.8780116811 0.75
C 0.725584507 0.8780116811 0.75
C 0.274415493 0.1219883189 0.25
&END
&END SUBSYS

I tried to find the source file to remove the lines &SUBSYS and &END SUBSYS created by USPEX, but there is none. My guess is it's embedded in the MATLAB file, which cannot be openly modified. So I have no way to make USPEX work properly with CP2K. Besides it should rather be a 'cell.uspex' file rather than a 'subsys.uspex' file which is created by USPEX. This would be easier to place anywhere in the &SUBSYS section.

Please advise.

Thank you,
Xavier

Зэд Икс

unread,
Sep 1, 2021, 6:38:12 AM9/1/21
to USPEX
Dear Xavier,

I'll be happy to fix this problem. Please clarify:
1- Are you sure removing the following lines will fix the problem? Have you tried to remove them manually and see how CP2K works?
&SUBSYS
&END SUBSYS

2- Can you provide the full Specific folder and INPUT.txt of your calculations? 

Best regards,
Zahed

Xavier Bidault

unread,
Sep 1, 2021, 10:58:41 AM9/1/21
to USPEX
Dear Zahed,

1 - Yes, I tried to manually remove the lines &SUBSYS and &END SUBSYS from subsys.uspex file, and it works, provided that the file is included in already-non-empty section &SUBSYS of CP2K input script (in Specific folder).

2 - I attached a zip file containing:
- The INPUT.txt file for USPEX
- The Specific folder containing cp2k_options_1, in which the lines     @INCLUDE 'pressure.uspex' and   @INCLUDE 'subsys.uspex' are correcly placed
- And a CalcFold1 folder for reference, containing the files created/imported by USPEX. You can run the cp2k.inp file created by USPEX from cp2k_options_1. There is also a copy of the original subsys.uspex containing the faulty lines, and a modified one without them (which works).

Thank you,
Xavier
C_300_CP2K_test.zip

Xavier Bidault

unread,
Sep 8, 2021, 10:02:26 AM9/8/21
to USPEX
Hello,

Any progress on your side? I think the correction is easy. I can do the tests if you want.

Thank you,
Xavier

Zahed

unread,
Sep 9, 2021, 7:02:25 AM9/9/21
to USPEX
Yes, It is done. I'll put the fixed version online today, so you can update your code using "USPEX -u" if you have the 10.5 version.

Xavier Bidault

unread,
Sep 15, 2021, 12:32:04 PM9/15/21
to USPEX
Thank you! Updated with "USPEX -u", then just gave back rights to uspex.x (chmod +x), and it works now fine with CP2K called by the line "mpirun -n 8 cp2k.popt -i cp2k.inp > output" in the INPUT.txt file.

I tried the usual test with 8 atoms of Carbon in USPEX. I tried to use 2 CP2K steps:
1) CP2K, optimization at constant volume (GEO_OPT)
2) CP2K, full optimization (CELL_OPT -> atom positions and cell parameters)

The template provided with USPEX for CP2K helped (don't forget to correct your CP2K template to correctly include the subsys file now)

This works fine when run with option "0      : whichCluster". However things are bugged with option "1      : whichCluster". Note that I succeeded to use option "1      : whichCluster" with USPEX + GULP, so I know the changes I've done in the files "checkStatus_local.py" and "submitJob_local.py" are correct. Well, it seems that with CP2K and option "1      : whichCluster", USPEX fails to retrieve the energy and/or volume and/or atom positions and/or cell parameters (whereas everything works fine with option "0      : whichCluster").

Could you check this on your side?

Thank you.

Zahed

unread,
Sep 16, 2021, 8:32:44 AM9/16/21
to USPEX
Dear Xavier,

Which example of USPEX - CP2K did you use as a template? I don't see any!!

There is no difference for USPEX to retrieve energy, volume, etc from local machines (0 : whichCluster) or supercomputers (1 : whichCluster), if the calculations are done by abinitio code.
Please make sure that cp2k is actually called by USPEX and calculations are done in CalcFold*. If these are not the issue and still USPEX cannot retrieve energy, volume, etc., please send me the error. There should be an error that the program stops or why cannot read outputs of cp2k.

Please note** your job script included in "submitJob_local.py" might be different from the one that you use for gulp.

Xavier Bidault

unread,
Sep 17, 2021, 3:04:14 PM9/17/21
to USPEX
Dear Zahed,

There are templates in the folder "USPEX_v10.5/application/archive/test/templates/".

To sum up, I can make USPEX work:
- with GULP, both with whichCluster = 0 (local) or 1 (distributed jobs on a cluster).
- with QE, both with whichCluster = 0 or 1
- with CP2K (I tested v7.1 and v8.2), only with whichCluster = 0

I still don't understand why it would not work with CP2K and whichCluster = 1, since I have no problem for QE and GULP. Besides, CP2K works fine with whichCluster = 0 (it finds carbon graphite structure at 0 GPa and diamond at 10 GPa).

Yes, the jobs are in the CalcFold*. The jobs related to generation 1 and step 1 have all finished correctly, without error. When I run USPEX for the next step, here is what it says:
Structure1 step1 at CalcFold1
JobID=3554116
/scratch/ESPSPCVV/bidault-x/USPEX/C_300_CP2K_Waves/CalcFold1
...
and same related message for the other StructureX/CalcFoldX.

When I compare what I get for GULP or QE, it is rather:
Structure1 step1 at CalcFold1
JobID=54584
Individual : 1 -- JobID :54614
... the last line (Individual : 1 -- JobID :54614) saying that step 2 has been submitted.

Well, the log file ends with the message:
===== USPEX ERROR @ 20:5:17 17-Sep-2021 =====
Many structures failed after relaxation,
Plz check the input files. Results maybe unreliable.
Possible reasons: high bestFrac, bad optimization parameters or contraints.

But I can confirm that they the structures are not "failed", but "relaxed" with CP2K ending properly for every structure (as I also get when using whichCluster = 0 which succeeds in going the step further).

However I can see one difference between whichCluster = 1 or 0: two files (old_USPEX-1.cell and old_USPEX-pos-1.xyz) are present when using whichCluster = 0, whereas they're not with whichCluster = 1. My guess is that those USPEX files are not created for CP2K with whichCluster = 1.

Xavier Bidault

unread,
Sep 24, 2021, 8:59:12 AM9/24/21
to USPEX
Dear Zahed,

Any progress on USPEX side? Concerning the missing files that USPEX should create when whichCluster = 1 (and which are with whichCluster = 0).

Thanks,
Xavier

Xavier Bidault

unread,
Oct 7, 2021, 10:46:26 AM10/7/21
to USPEX
Hello,

Any progress on USPEX side? Concerning the missing files that USPEX should create when whichCluster = 1 (and which are with whichCluster = 0).

Thanks,
Xavier


Xavier Bidault

unread,
Oct 13, 2021, 4:30:34 PM10/13/21
to USPEX
I quote myself (message from Sep. 17):
However I can see one difference between whichCluster = 1 or 0: two files (old_USPEX-1.cell and old_USPEX-pos-1.xyz) are present when using whichCluster = 0, whereas they're not with whichCluster = 1. My guess is that those USPEX files are not created for CP2K with whichCluster = 1.

With whichCluster = 1, USPEX fails to finalize generation 1.

Please , could you at least provide a response to that diagnostic?
Reply all
Reply to author
Forward
0 new messages