Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formation energy trends for pure system and system with vacancy from canonical MC simulations #351

Open
pandeydhanshree opened this issue Jan 26, 2024 · 16 comments

Comments

@pandeydhanshree
Copy link

          Hello

I am trying to perform canonical MC calculations with A,B and vacancy (Va) as the components of the alloy at a certain temperature. So, my training DFT data contains structures like AB, BVa, AVa, and ABVa. Now I wish to see the formation energy trends at different temperatures for, let say,
a: Pure AB system ("comp": [0.49, 0.51],)
b: Low vacancy concentration ("comp": [0.49, 0.49, 0.02],)
c: High vacancy concentration ("comp": [0.45454545, 0.45454545, 0.09090910],)
The results I obtain (attached below) are not consistent with what we obtain from 0K cluster expansion/DFT energies (structures with vacancy have higher formation energy).
Can you please have a look at the plots and let me know what is the issue.
Thank you and best regards
Dhanshree
Casm-MC-results.pdf

Originally posted by @pandeydhanshree in #338 (comment)

@xivh
Copy link
Contributor

xivh commented Jan 26, 2024

Do you expect the vacancies to raise the formation energy or to lower the formation energy? Does the formation energy of the first step of your heating run match the DFT?

Also, can you upload your prim.json?

@pandeydhanshree
Copy link
Author

"Do you expect the vacancies to raise the formation energy or to lower the formation energy? "
I would except the formation energy for vacancies to be higher (less negative) than that of without vacancy. I hope that make sense, right?
"Does the formation energy of the first step of your heating run match the DFT?"
No, the formation energy does not match.

The prim.json is
"{
"basis" : [
{
"coordinate" : [ 0.00000, 0.00000, 0.00000],
"occupants" : [ "W", "Ta", "Va"]}

],
"coordinate_mode" : "Cartesian",
"lattice_vectors" : [
[ -1.758031, 1.758031, 1.758031 ],
[ 1.758031, -1.758031, 1.758031],
[ 1.758031, 1.758031, -1.758031]
],
"title" : "WTaVac"
}
"

@xivh
Copy link
Contributor

xivh commented Jan 26, 2024

I just created a project with your prim, and I only see two composition axes. Which axis are you using? Can you do casm composition -d to get the axes, and then query site_frac or comp_n and see if it matches what you expected?

A pure AB system is not necessarily "comp": [0.49, 0.51].

@pandeydhanshree
Copy link
Author

Below is the output I am getting when casm composition -d is executed
Possible composition axes:

   KEY     ORIGIN          a          b     GENERAL FORMULA
   ---        ---        ---        ---     ---
     0         Va         Ta          W     W(b)Ta(a)Va(1-a-b)
     1         Ta         Va          W     W(b)Ta(1-a-b)Va(a)
     2          W         Va         Ta     W(1-a-b)Ta(b)Va(a)

Currently selected composition axes: 0

I did the query site_frac/comp_n and I get what I expect.
For example, some of the initial lines for "ccasm query -k site_frac" is
Print:

  • site_frac

name selected site_frac(W) site_frac(Ta) site_frac(Va)

SCEL1_1_1_1_0_0_0/0           1                             1.00000000  0.00000000  0.00000000
SCEL1_1_1_1_0_0_0/1           1                             0.00000000  1.00000000  0.00000000
SCEL9_1_9_1_0_0_0/0           1                             0.88888889  0.11111111  0.00000000
SCEL9_9_1_1_0_6_3/0           1                             0.55555556  0.33333333  0.11111111
SCEL9_9_1_1_0_8_4/0           1                             0.22222222  0.66666667  0.11111111
SCEL10_1_10_1_0_0_0/0         1                             0.80000000  0.20000000  0.00000000
SCEL10_2_5_1_0_0_1/0          1                             0.20000000  0.80000000  0.00000000
SCEL10_2_5_1_0_0_1/1          1                             0.30000000  0.60000000  0.10000000
SCEL10_2_5_1_0_0_1/2          1                             0.50000000  0.40000000  0.10000000

Regarding "A pure AB system is not necessarily "comp": [0.49, 0.51].", what do you suggest then for pure AB system?
Thanks and regards
Dhanshree

@xivh
Copy link
Contributor

xivh commented Jan 27, 2024

Okay, if you are using composition axis 0, then I think the composition axis is not the problem.

If I understand your plots correctly, on the top plot you have the zero-vacancy structures near the convex hull at formation energy -100 meV/atom, and the low-vacancy and high-vacancy structures in the upper group at formation energy +300meV/atom? Then in the lower plot from monte carlo, the formation energies of the zero-vacancy structures look close to the DFT energies at around -100 meV/atom, but the formation energies of the low-vacancy and high-vacancy structures are much lower i.e. breaking the predicted convex hull?

Have you tried looking at those structures or seeing what their correlations are?

@pandeydhanshree
Copy link
Author

Yes, exactly. You got it correctly.
Yes, I have looked at the structures obtained from MC simulations. Overall, I see the clustering of vacancies. But I have not compared the structures (same Ta/W concentration) from DFT and MC simulations. This is exactly what you are suggesting right?
But, irrespective of the above point, can one trust the trend obtained from MC calculations?

@xivh
Copy link
Contributor

xivh commented Jan 28, 2024

Yes, if there are structures predicted below the convex hull, then you should calculate those and refit the cluster expansion. If you have structures that far below the convex hull, then you can't trust the monte carlo results. What you want to see is that at 0K you get your DFT convex hull, and as the temperature goes up, the free energy decreases. The formation energy should not decrease because it means there is a more stable potential ground state there.

@pandeydhanshree
Copy link
Author

You mean I should take the final structure obtain from MC (few thousand atoms) and do the DFT calculations and refit the cluster expansion?

@xivh
Copy link
Contributor

xivh commented Jan 29, 2024

Yes, you can try reducing the size of the Monte Carlo (but this may change your results) or importing the structure into CASM in order to make it primitive before DFT.

Another option is to enumerate a large set of test configurations (different volumes or orderings than your existing data), predict them with your cluster expansion, and see if any break the convex hull. Then you can select a few of these to calculate with DFT. If you choose to do this method, I recommend copying your CASM project and enumerating in the new project. Then you can import the enumerated structures back into the original project. It will keep the original project clean, and it will also be faster because having a lot of configurations in the database slows things down.

@pandeydhanshree
Copy link
Author

Thank you so much for your suggestion. I will try these possibilities.
Best regards
Dhanshree

@pandeydhanshree
Copy link
Author

Hello
Regarding the point "Another option is to enumerate a large set of test configurations (different volumes or orderings than your existing data), predict them with your cluster expansion, and see if any break the convex hull. ", how should I do it. I mean after enumerating different configurations (as new project), what steps do I follow?
Do I perform the step "casm select --set 'is_calculated' -o train" with my DFT calculated structures?
In short, I am bit confused with what steps to follow when you say " predict them with your cluster expansion"
Can you please help me with that. Thank you in advance and regards.

@xivh
Copy link
Contributor

xivh commented Jan 31, 2024

If you have the same bspecs.json, eci.json, etc., then you can do casm query -k clex to get the formation energy predictions per unit cell and plot them against your existing convex hull.

If you copied the old project, then you can try casm query -k clex_hull_dist(CALCULATED) to get the hull distance to your fitting dataset. Check casm query --help properties, I don't remember if it is per atom or per unit cell.

@pandeydhanshree
Copy link
Author

Okay. Thanks a lot !!

@darjaved
Copy link

darjaved commented Aug 6, 2024

Can you explain a bit how to copy the original project and import the new structures to improve the CE fit. I am doing my DFT calculation outside CASM project. with VASP ( not with CASM interface).
@xivh @pandeydhanshree

@pandeydhanshree
Copy link
Author

Hello @darjaved
You can import your VASP structure files using the casm import command. For example, execute the command:
casm import -s settings.json -b subdirectories.txt
You can see the details for settings.json using "casm import". The subdirectories.txt file contains the paths to your VASP structures that you wish to import. I hope it was helpful.
With best regards
Dhanshree

@darjaved
Copy link

darjaved commented Aug 6, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants