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 of endmembers should be zero by CLEX #340

Open
sjtuzhanglei opened this issue Nov 23, 2023 · 6 comments
Open

Formation energy of endmembers should be zero by CLEX #340

sjtuzhanglei opened this issue Nov 23, 2023 · 6 comments

Comments

@sjtuzhanglei
Copy link

Dear CASM developers,

My current best fit should first make sure the endmember is correct and fixed to zero. Otherwise the clex hull has no thermodynamic meaning.

As far as I know, endmembers are fitted together with the points in the middle compositions. Similarly, ECIs of zeros and first order, which solely determine the formation energy of the endmembers, are also optimized together with 2nd and higher order ones.

In this case, I want to first make sure the clex endmember is correct and stick to zero.

My idea is to fit those zeroth and 1st-order ECIs first and fix them afterwards when fitting 2nd and higher order ECIs.

Can CASM do that, or have you encountered the same issue before?

Thanks,
Lei

@xivh
Copy link
Contributor

xivh commented Nov 27, 2023

You can manually set the null term to 0, which will fix the clex energy of the unperturbed structure to 0. You could either do it by editing eci.json by hand, or by using this function to add ECIs to basis.json: https://github.com/Van-der-Ven-Group/thermocore/blob/53daacf16e7fe36a62d0d47f7c4f0cc571696f5d/thermocore/io/casm.py#L101

@sjtuzhanglei
Copy link
Author

sjtuzhanglei commented Nov 29, 2023 via email

@sjtuzhanglei
Copy link
Author

sjtuzhanglei commented Nov 29, 2023 via email

@sjtuzhanglei
Copy link
Author

sjtuzhanglei commented Nov 29, 2023 via email

@sjtuzhanglei
Copy link
Author

sjtuzhanglei commented Nov 29, 2023 via email

@xivh
Copy link
Contributor

xivh commented Dec 1, 2023

  1. Yes, the null term is a constant shift. In a simple binary system, setting the null term to 0 would give a perfect fit for one composition extreme, but the other composition extreme depends on all of the terms, so it would only work for one of your endstates.

  2. I have your prim from earlier, so I generated the point clusters. If you do casm bset --functions, then you can see the basis functions. Here are the first few lines:

** Branch 0 ** 
    ** 0 of 7 Orbits **  Points: 0  Mult: 1  MinLength: 0.00000  MaxLength: 0.00000
        Prototype of 1 Equivalent Clusters in Orbit 0
            Coordinates:
        Prototype basis functions:
            \Phi_{0} = 1

** Branch 1 ** 
    ** 1 of 7 Orbits **  Points: 1  Mult: 1  MinLength: 0.0000000  MaxLength: 0.0000000
        Prototype of 1 Equivalent Clusters in Orbit 1
            Coordinates:
                0.1528312 0.1332658 0.8040910 H  Va  
        Prototype basis functions:
            \Phi_{1} = \phi_{0,0}(s_{0})

    ** 2 of 7 Orbits **  Points: 1  Mult: 1  MinLength: 0.0000000  MaxLength: 0.0000000
        Prototype of 1 Equivalent Clusters in Orbit 2
            Coordinates:
                0.6534622 0.0623379 0.8040129 H  Va  
        Prototype basis functions:
            \Phi_{2} = \phi_{1,0}(s_{0})

    ** 3 of 7 Orbits **  Points: 1  Mult: 1  MinLength: 0.0000000  MaxLength: 0.0000000
        Prototype of 1 Equivalent Clusters in Orbit 3
            Coordinates:
                0.0037773 0.3244276 0.7884926 H  Va  
        Prototype basis functions:
            \Phi_{3} = \phi_{2,0}(s_{0})

Each branch corresponds to clusters of a certain size, so branch 0 is clusters of size 0 (null term) and branch 1 is clusters of size 1 (point terms). $\Phi_{0} = 1$, so it is the same for all configurations and fitting an ECI to it just produces a constant shift. $\Phi_{1}$, $\Phi_{2}$, and $\Phi_{3}$ actually all correspond to different sites on your (H, Va) sublattice. Because your sites are symmetrically distinct, there are different functions for each site. You can see this where it says Mult: 1, which means multiplicity 1. There are no point terms for the other O and Ru sites because the composition on those sites is fixed.

For comparison, here is what you would get for an HCP prim. In this case, there are two equivalent sites, so there is only one point term and the multiplicity is 2.

** Branch 0 ** 
    ** 0 of 2 Orbits **  Points: 0  Mult: 1  MinLength: 0.00000  MaxLength: 0.00000
        Prototype of 1 Equivalent Clusters in Orbit 0
            Coordinates:
        Prototype basis functions:
            \Phi_{0} = 1

** Branch 1 ** 
    ** 1 of 2 Orbits **  Points: 1  Mult: 2  MinLength: 0.0000000  MaxLength: 0.0000000
        Prototype of 2 Equivalent Clusters in Orbit 1
            Coordinates:
                0.6666667 0.3333333 0.2500000 H  Va  
        Prototype basis functions:
            \Phi_{1} = \phi_{0,0}(s_{0})
  1. To do the kind of iterative fitting that you are describing, you have to use another program to fit such as scikit learn and then write the eci.json yourself.

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

2 participants