prisms-center / CASMcode

First-principles statistical mechanical software for the study of multi-component crystalline solids
Other
104 stars 69 forks source link

Error while analyzing DFT/cluster expansion convex hull #326

Open pandeydhanshree opened 11 months ago

pandeydhanshree commented 11 months ago

Hello I followed from issue #320 and was trying to execute some of the commands like "ccasm select -c train --set on_hull" and "ccasm query -c train -k on_clex_hull" but unfortunately I got errors for both times. The errors are

1: casm select -c train --set on_hull -- Input config list: train --

configs in this project: 163373

configs included in this list: 40

configs selected in this list: 40

-- set: on_hull -- Segmentation fault

2: casm query -c train -k on_clex_hull Print:

-- Compiling: /marconi_work/ICT23_CMSP/Dpandey/CASM/WTa/basis_sets/bset.default/WTa_Clexulator.cc --

compile time depends on how many basis functions are included compile time: 0.0294603 (s) Segmentation fault

Just for the information, in my train file, I only have configurations for which I have DFT calculated results. Any suggestions on how to fix the error is most welcome. Thanks and best regards Dhanshree

xivh commented 11 months ago

Did you create the bspecs.json file and compile the basis for your cluster expansion?

tutorial link

pandeydhanshree commented 11 months ago

Yes, I did and I have bspecs.json, clust.json, basis.json, WTa_Clexulator.cc, WTa_Clexulator.o, and WTa_Clexulator.so files in my basis_sets/bset.default directory.

xivh commented 10 months ago

Is your prim structure a supercell (used casm init --force)?

If not, can you upload a copy of your project with the .casm folder and bspecs.json?

bpuchala commented 10 months ago

Some debugging ideas that I usually go through:

If bspec.json has changed, or the basis was compiled on a different computer, then re-generating and re-compiling with ccasm bset -uf might be necessary.

To find the particular issue it can help to query different types of properties, like 1) query properties that only depend on the configuration, like -k comp_n; 2) properties that depend on composition axes, -k comp, 3) properties that depend on the configuration and basis set, like -k corr; and then 4) properties that depend on calculated properties, like -k energy; then 5) properties that also depend on the reference like -k formation_energy, finally 6) properties that depend on calculating the hull, -k clex_hull_dist, or -k hull_dist.

Finally, we try to address these issues in the code, but hull finding can sometimes be tripped up by issues like configurations not spanning all the dimensions, using non-primitive configurations, or having several configurations lying on the same facet plane. So if all the properties can be calculated and queried independent of finding the hull, then it could be the hull finding failing in some way.

pandeydhanshree commented 10 months ago

Thank you for the suggestions. I tried the suggested debugging ideas and everything worked well. I updated the basis sets and could run "casm query -c train -k on_clex_hull" However, I encountered following errors while executing ccasm query -k hull_dist and ccasm select -c train --set on_hull

1: ccasm query -k hull_dist getting the error ERROR: Error in Hull(): Invalid composition or energy data. Make sure you have set composition axes, all selected configurations have calculation results, and you have set your chemical reference.

2: ccasm select -c train --set on_hull -- Input config list: train --

configs in this project: 163373

configs included in this list: 163373

configs selected in this list: 40

-- set: on_hull --

and ends at ERROR: Failure to select using criteria "on_hull" for Configuration Reason: Error in Hull(): Invalid composition or energy data. Make sure you have set composition axes, all selected configurations have calculation results, and you have set your chemical reference.

I checked all the possible options as indicated in the error above but still the error remains. For your reference, I used ccasm select --set 'is_calculated' -o train to generate the "train" and below is the output prompted on the terminal

"-- Input config list: MASTER --

configs in this project: 163373

configs included in this list: 163373

configs selected in this list: 163373

-- set: is_calculated -- selection time: 0.376299 (s)

-- Write: Selection -- write: "train"

-- Output config list: train --

configs in this project: 163373

configs included in this list: 163373

configs selected in this list: 40 "

Any suggestions would be appreciated. Thanks again and best regards Dhanshree

pandeydhanshree commented 10 months ago

Hello I tried to make new project with less number of supercells (max vol=7) and hence less configurations and redid each step. Everything works well now. Thanks a lot. With best regards Dhanshree

xivh commented 10 months ago

I can reproduce this error. After running CASM update, some configs don't have energy data. Then:

casm select -c ALL --set selected
casm query -c CALCULATED -k on_hull

gives the error

Print:
   - on_hull

#Invalid data for hull construction:
#              configname    composition     energy
    SCEL1_1_1_1_0_0_0/100             OK    invalid
    SCEL1_1_1_1_0_0_0/36              OK    invalid
    SCEL1_1_1_1_0_0_0/50              OK    invalid
    SCEL1_1_1_1_0_0_0/51              OK    invalid
    SCEL1_1_1_1_0_0_0/52              OK    invalid
    SCEL1_1_1_1_0_0_0/53              OK    invalid
    SCEL1_1_1_1_0_0_0/55              OK    invalid
    SCEL1_1_1_1_0_0_0/63              OK    invalid
    SCEL1_1_1_1_0_0_0/64              OK    invalid
    SCEL1_1_1_1_0_0_0/77              OK    invalid
    SCEL1_1_1_1_0_0_0/78              OK    invalid
    SCEL1_1_1_1_0_0_0/79              OK    invalid
    SCEL1_1_1_1_0_0_0/80              OK    invalid
    SCEL1_1_1_1_0_0_0/81              OK    invalid
    SCEL1_1_1_1_0_0_0/82              OK    invalid
    SCEL1_1_1_1_0_0_0/93              OK    invalid
    SCEL1_1_1_1_0_0_0/94              OK    invalid
    SCEL1_1_1_1_0_0_0/96              OK    invalid
    SCEL1_1_1_1_0_0_0/99              OK    invalid

ERROR: Error in Hull(): Invalid composition or energy data. 
Make sure you have set composition axes, all selected configurations
have calculation results, and you have set your chemical reference.

It can be fixed by:

casm select -c CALCULATED --set selected
ccasm query -k on_hull
jcthomas commented 10 months ago

If you look at the help string for on_hull, you'll find that the hull is determined from a selection of configurations. By default this is the MASTER selection, but you may specify something different (e.g., CALCULATED). Hull determination fails if any configuration in the set does not have a valid formation_energy. So, it is expected that on_hull would not succeed if some selected configurations have not been calculated.

On Tue, Nov 7, 2023 at 3:29 PM xivh @.***> wrote:

I can reproduce this error. After running CASM update, some configs don't have energy data. Then:

casm select -c ALL --set selected casm query -c CALCULATED -k on_hull

gives the error

Print:

  • on_hull

Invalid data for hull construction:

configname composition energy

SCEL1_1_1_1_0_0_0/100             OK    invalid
SCEL1_1_1_1_0_0_0/36              OK    invalid
SCEL1_1_1_1_0_0_0/50              OK    invalid
SCEL1_1_1_1_0_0_0/51              OK    invalid
SCEL1_1_1_1_0_0_0/52              OK    invalid
SCEL1_1_1_1_0_0_0/53              OK    invalid
SCEL1_1_1_1_0_0_0/55              OK    invalid
SCEL1_1_1_1_0_0_0/63              OK    invalid
SCEL1_1_1_1_0_0_0/64              OK    invalid
SCEL1_1_1_1_0_0_0/77              OK    invalid
SCEL1_1_1_1_0_0_0/78              OK    invalid
SCEL1_1_1_1_0_0_0/79              OK    invalid
SCEL1_1_1_1_0_0_0/80              OK    invalid
SCEL1_1_1_1_0_0_0/81              OK    invalid
SCEL1_1_1_1_0_0_0/82              OK    invalid
SCEL1_1_1_1_0_0_0/93              OK    invalid
SCEL1_1_1_1_0_0_0/94              OK    invalid
SCEL1_1_1_1_0_0_0/96              OK    invalid
SCEL1_1_1_1_0_0_0/99              OK    invalid

ERROR: Error in Hull(): Invalid composition or energy data. Make sure you have set composition axes, all selected configurations have calculation results, and you have set your chemical reference.

It can be fixed by:

casm select -c CALCULATED --set selected ccasm query -k on_hull

— Reply to this email directly, view it on GitHub https://github.com/prisms-center/CASMcode/issues/326#issuecomment-1799966057, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA4OJ3OKPYPGE5UCEBPZFHTYDKK23AVCNFSM6AAAAAA67VDTUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJZHE3DMMBVG4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

pandeydhanshree commented 10 months ago

Thank you all for your suggestions. Now I understand the issue and things work now. With best regards Dhanshree