Error when running Cu-Mg example
latmarat opened this issue · 4 comments
Hello, I am trying to run ESPEI for the first time.
I created a conda env and installed ESPEI using conda. I downloaded json and yaml files as well as the contents of the Cu-Mg folder in ESPEI-datasets, renamed it to input-data. After running espei --input espei-in.yaml
, I get the errors below. Could you please let me know if I am doing anything wrong?
Thanks!
Traceback (most recent call last):
File "/Users/latmarat/miniforge3/envs/espenv/bin/espei", line 10, in <module>
sys.exit(main())
File "/Users/latmarat/miniforge3/envs/espenv/lib/python3.10/site-packages/espei/espei_script.py", line 307, in main
run_espei(input_settings)
File "/Users/latmarat/miniforge3/envs/espenv/lib/python3.10/site-packages/espei/espei_script.py", line 177, in run_espei
dbf = generate_parameters(phase_models, datasets, refdata, excess_model,
File "/Users/latmarat/miniforge3/envs/espenv/lib/python3.10/site-packages/espei/paramselect.py", line 517, in generate_parameters
aliases = extract_aliases(phase_models)
File "/Users/latmarat/miniforge3/envs/espenv/lib/python3.10/site-packages/espei/utils.py", line 370, in extract_aliases
aliases = {phase_name: phase_name for phase_name in phase_models["phases"].keys()}
AttributeError: 'list' object has no attribute 'keys'
What are the contents of your ESPEI-in.yaml
and the contents of the phase models file that it points to?
my project folder (where I run the espei command) is the following :
- espei-in.yaml
- Cu-Mg-input.json
- input-data
-- activity
-- zpf
-- non-equilibrium-thermochemical
---- BCC_A2
---- CUMG2
---- etc
espei-in.yaml contents
system:
phase_models: Cu-Mg-input.json
datasets: input-data
generate_parameters:
excess_model: linear
ref_state: SGTE91
output:
output_db: cu-mg_dft.tdb
Cu-Mg-input.json contents
{
"components": ["CU", "MG", "VA"],
"phases": ["LIQUID"],
"reference_state": {
"phases": ["LIQUID"],
"conditions": {
"P": 101325,
"T": 1200,
"X_CU": 0.0
}
},
"conditions": {
"P": 101325,
"T": 1200,
"X_CU": [0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1, 0.0]
},
"output": "ACR_MG",
"values": [[[0.0057,0.0264,0.0825,0.1812,0.2645,0.4374,0.5852,0.7296,0.882,1.0]]],
"reference": "garg1973thermodynamic",
"comment": "Digitized Figure "
}
Thank you!
The contents of Cu-Mg-input.json
should be
{
"components": ["CU", "MG", "VA"],
"phases": {
"LIQUID" : {
"sublattice_model": [["CU", "MG"]],
"sublattice_site_ratios": [1]
},
"CUMG2": {
"sublattice_model": [["CU"], ["MG"]],
"sublattice_site_ratios": [1, 2]
},
"FCC_A1": {
"sublattice_model": [["CU", "MG"], ["VA"]],
"sublattice_site_ratios": [1, 1]
},
"HCP_A3": {
"sublattice_site_ratios": [1, 0.5],
"sublattice_model": [["CU", "MG"], ["VA"]]
},
"LAVES_C15": {
"sublattice_site_ratios": [2, 1],
"sublattice_model": [["CU", "MG"], ["CU", "MG"]]
}
}
}
The phase models file describes the components, phases and their
sublattice models in the system.
What you currently have is a dataset for activity data.
It worked, thank you!