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

Generated, decoded structures all seem to be of P(1) symmetry #79

Open
sgbaird opened this issue Jun 11, 2022 · 4 comments
Open

Generated, decoded structures all seem to be of P(1) symmetry #79

sgbaird opened this issue Jun 11, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@sgbaird
Copy link
Member

sgbaird commented Jun 11, 2022

e.g.

Structure Summary
Lattice
    abc : 3.5100414781297133 3.515196078431373 3.5448717948717947
 angles : 59.64705882352941 59.959276018099544 59.93891402714934
 volume : 30.820712660051388
      A : 3.0385369088434473 0.0 1.7571808762296304
      B : 1.0068399538873045 2.861393772226697 1.7763171049499542
      C : 0.0 0.0 3.5448717948717947
PeriodicSite: Ag (0.4705, 0.1010, 1.2526) [0.1431, 0.0353, 0.2647]
PeriodicSite: Cr (1.0788, 0.7294, 1.6928) [0.2706, 0.2549, 0.2157]
PeriodicSite: H (0.1329, 0.0898, 0.1213) [0.0333, 0.0314, 0.0020]
PeriodicSite: H (0.0654, 0.0842, 0.2814) [0.0118, 0.0294, 0.0588]
PeriodicSite: He (0.0278, 0.0112, 0.0416) [0.0078, 0.0039, 0.0059]

Tried with a looser symprec tolerance, which threw an error at 0.2 and higher.

structures[0].get_space_group_info(symprec=0.2)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\sterg\Miniconda3\envs\xtal2png-docs\lib\site-packages\pymatgen\core\structure.py", line 1013, in get_space_group_info
    return a.get_space_group_symbol(), a.get_space_group_number()
  File "C:\Users\sterg\Miniconda3\envs\xtal2png-docs\lib\site-packages\pymatgen\symmetry\analyzer.py", line 97, in get_space_group_symbol
    return self._space_group_data["international"]
TypeError: 'NoneType' object is not subscriptable
@sgbaird sgbaird added the bug Something isn't working label Jun 11, 2022
@sgbaird
Copy link
Member Author

sgbaird commented Jun 11, 2022

materialsproject/pymatgen#1764 mentioned same issue.

Looking a bit closer at the structures, probably has to do with the presence of distances less than 0.2 between differing sites, causing atoms to "collide".

structures[0].distance_matrix
array([[0.        , 0.97919993, 1.18065832, 1.05236272, 1.2924594 ],
       [0.97919993, 0.        , 1.94263668, 1.85350771, 2.08496016],
       [1.18065832, 1.94263668, 0.        , 0.17392385, 0.15348728],
       [1.05236272, 1.85350771, 0.17392385, 0.        , 0.25348576],
       [1.2924594 , 2.08496016, 0.15348728, 0.25348576, 0.        ]])

Note that these small distances are localized to $H$ and $He$.

structures[0].atomic_numbers
(47, 24, 1, 1, 2)

@sgbaird
Copy link
Member Author

sgbaird commented Jun 11, 2022

Looping through all 16 generated samples

Interestingly with the higher symprec of 0.1 instead of 0.01 more None-s are produced

space_group = []
for s in structures:
    try:
        space_group.append(s.get_space_group_info(symprec=0.1)[1])
    except Exception as e:
        space_group.append(None)
        pass
print(space_group)
[1, None, None, None, 1, 1, None, None, 1, None, None, 1, None, 1, 1, None]

@sgbaird
Copy link
Member Author

sgbaird commented Jun 20, 2022

Better now, but still not great:

[1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1]

with relax_on_decode, decode_as_primitive, and 127k iterations.

The formulas:
image

which seem somewhat better.

The images (sample-127.png):
sample-127

@sgbaird
Copy link
Member Author

sgbaird commented Jun 20, 2022

from Kevin:

yes, also in your case, if you'd encode the space group in the image, you could write components for the loss that penalize mismatching angles. In other contexts, I have seen such extra loss terms to help a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant