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

Add implementation for calculating site transitions #19

Merged
merged 9 commits into from
Jul 3, 2023

Conversation

stefsmeets
Copy link
Contributor

@stefsmeets stefsmeets commented Jun 27, 2023

This PR adds an implementation to calculate site transitions.

This code covers everything until line 156 in find_sites.m.

Data are loaded from a cif file, which means they cannot be compared directly to the matlab data (the order of the sites and thus coordinates is different).

The result differs slightly, I think because of rounding errors.

Todo

  • Generate succes array
  • Generate transitions array
  • Generate occupancy array
  • Generate occupancy_parts array
  • Generate atom_sites array
  • Refine and refactor code
  • Load vibration_amplitude from some sort of cache or calculate it on-the-fly (Maybe a preprocess(Data) to get everything at once?) -> Structure the calculations, data now has a calculate_all function #20

@stefsmeets
Copy link
Contributor Author

stefsmeets commented Jun 27, 2023

These coordinates correspond to the sites in the known_materials.md.

site_coords = np.array(
[
    [0.183,  0.183,  0.024],
    [0.183,  0.683,  0.524],
    [0.683,  0.183,  0.524],
    [0.683,  0.683,  0.024],
    [0.817,  0.817,  0.024],
    [0.817,  0.317,  0.524],
    [0.317,  0.817,  0.524],
    [0.317,  0.317,  0.024],
    [0.817,  0.183,  0.976],
    [0.817,  0.683,  0.476],
    [0.317,  0.183,  0.476],
    [0.317,  0.683,  0.976],
    [0.183,  0.817,  0.976],
    [0.183,  0.317,  0.476],
    [0.683,  0.817,  0.476],
    [0.683,  0.317,  0.976],
    [0.024,  0.183,  0.183],
    [0.024,  0.683,  0.683],
    [0.524,  0.183,  0.683],
    [0.524,  0.683,  0.183],
    [0.024,  0.817,  0.817],
    [0.024,  0.317,  0.317],
    [0.524,  0.817,  0.317],
    [0.524,  0.317,  0.817],
    [0.976,  0.817,  0.183],
    [0.976,  0.317,  0.683],
    [0.476,  0.817,  0.683],
    [0.476,  0.317,  0.183],
    [0.976,  0.183,  0.817],
    [0.976,  0.683,  0.317],
    [0.476,  0.183,  0.317],
    [0.476,  0.683,  0.817],
    [0.183,  0.024,  0.183],
    [0.183,  0.524,  0.683],
    [0.683,  0.024,  0.683],
    [0.683,  0.524,  0.183],
    [0.817,  0.024,  0.817],
    [0.817,  0.524,  0.317],
    [0.317,  0.024,  0.317],
    [0.317,  0.524,  0.817],
    [0.183,  0.976,  0.817],
    [0.183,  0.476,  0.317],
    [0.683,  0.976,  0.317],
    [0.683,  0.476,  0.817],
    [0.817,  0.976,  0.183],
    [0.817,  0.476,  0.683],
    [0.317,  0.976,  0.683],
    [0.317,  0.476,  0.183],
])

@stefsmeets stefsmeets marked this pull request as ready for review July 3, 2023 14:13
@stefsmeets stefsmeets mentioned this pull request Jul 3, 2023
@stefsmeets stefsmeets merged commit 3513057 into main Jul 3, 2023
3 checks passed
@stefsmeets stefsmeets deleted the sites-transitions branch July 3, 2023 14:46
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

Successfully merging this pull request may close these issues.

None yet

1 participant