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

Should we let the StructureMatcher method work at the affine space group classification level instead of the crystallographic space group classification level? #3612

Open
hongyi-zhao opened this issue Feb 8, 2024 · 5 comments
Labels
analysis Concerning pymatgen.analysis needs discussion Needs discussion to agree on actionable next steps symmetry Space groups and the like

Comments

@hongyi-zhao
Copy link
Contributor

hongyi-zhao commented Feb 8, 2024

See my following testing:

$ python ./pymatgenStructureMatcher.py 5/POSCAR 6/POSCAR -s0.53 -l 0.01 -a5
Structures are similar: True
Transformation Information:
(array([[ 1,  0,  0],
       [ 0, -1,  0],
       [ 0,  1,  1]]), array([-4.07660017e-17, -4.16198382e-01,  3.28125000e-01]), [3, 58, 59, 60, 33, 8, 0, 1, 56, 12, 13, 68, 25, 70, 71, 63, 10, 11, 21, 22, 23, 24, 15, 44, 36, 37, 20, 30, 49, 32, 7, 34, 35, 27, 28, 47, 48, 40, 41, 42, 43, 26, 18, 19, 46, 39, 31, 50, 51, 52, 53, 45, 38, 29, 64, 4, 5, 6, 61, 62, 54, 55, 2, 66, 67, 14, 69, 16, 17, 9, 57, 65, 75, 102, 77, 78, 79, 80, 72, 73, 101, 93, 85, 86, 87, 88, 98, 81, 91, 83, 84, 94, 95, 96, 97, 89, 90, 82, 92, 76, 103, 104, 105, 106, 107, 99, 100, 74, 144, 145, 146, 138, 139, 140, 147, 148, 149, 141, 142, 143, 123, 124, 125, 108, 109, 110, 126, 127, 128, 111, 112, 113, 129, 130, 131, 114, 115, 116, 117, 118, 119, 132, 133, 134, 120, 121, 122, 135, 136, 137, 186, 187, 188, 174, 175, 176, 189, 190, 191, 177, 178, 179, 159, 160, 161, 150, 151, 152, 153, 154, 155, 162, 163, 164, 156, 157, 158, 165, 166, 167, 180, 181, 182, 168, 169, 170, 183, 184, 185, 171, 172, 173])

As you can see, according to the Classification systems of the space group, the StructureMatcher method implemented currently works at the affine space group classification level instead of the crystallographic space group classification level, aka, it permits the non-proper rotation which doesn't preserve orientation.

But as Bernd pointed out here on page 35, as shown below:

Since crystals occur in physical space and physical space can only be transformed by orientation preserving mappings, space groups are only regarded as equivalent if they are conjugate by an orientation preserving affine mapping, i.e. by an affine mapping that has linear part with positive determinant.

image

So, should we let the StructureMatcher method work at the affine space group classification level instead of the crystallographic space group classification level?

Attached are all the test files mentioned above. Please check them.

test_StructureMatcher.zip

See here for the related discussion.

Regards,
Zhao

@janosh
Copy link
Member

janosh commented Feb 12, 2024

this sounds interesting and i can see why you might want to allow only orientation-preserving rotations. but i don't have enough background to say why the current behavior was chosen in the first place. potentially there were reasons i'm unaware of. hoping others with more context can chime in

@janosh janosh added needs discussion Needs discussion to agree on actionable next steps symmetry Space groups and the like analysis Concerning pymatgen.analysis labels Feb 12, 2024
@mkhorton
Copy link
Member

Is this the same issue encountered here with judging equivalence of structures with enantiomorphic space groups?

@hongyi-zhao
Copy link
Contributor Author

hongyi-zhao commented Feb 16, 2024

@mkhorton Yes. This is the exact case in a 3-dimensional space. But in higher dimensions, this is a more complicated problem to solve and I have given a gap implementation based on the algorithm suggested by Bernd.

@wladerer
Copy link
Contributor

wladerer commented Feb 22, 2024

I think it is best to consider that once you get to this kind of granularity of equivalence, the deviations in total energies may be below the threshold of chemical accuracy 1 2- even by the standards of the highest levels of theory.

With that said, there are in fact very important observable differences in chiral crystals. Circular dichroism and (reciprocal space) topology being two properties that are sensitive to such symmetries. 3

Solving this problem is incredibly interesting, but I am unsure how much it will benefit the users of pymatgen, especially if this routine incurs additional additional computational overhead. And naturally, this new feature will require additional maintenance that requires a niche expertise.

I think the best thing, which might actually help address #2593 , is to diversify the routines offered in StructureMatcher ? It would allow for the users to determine what degree of specificity they really care about and perhaps that can reduce the computational load if they are looking for a course grain matching.

But I suppose we have to wonder if readily available solutions exist elsewhere, then does pymatgen bear this responsibility?

@janosh
Copy link
Member

janosh commented Feb 22, 2024

thanks @wladerer, that's a lot of helpful context! 👍

I think the best thing, which might actually help address #2593, is to diversify the routines offered in StructureMatcher?

i'm open to that. sounds like that's the most actionable way forward to address #2593 and potentially even this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis Concerning pymatgen.analysis needs discussion Needs discussion to agree on actionable next steps symmetry Space groups and the like
Projects
None yet
Development

No branches or pull requests

4 participants