-
Notifications
You must be signed in to change notification settings - Fork 106
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
Identify the space group using the generators in the affine matrix format. #189
Comments
It seems so. If there is a document example, I can try my data according to the similar usage. |
No example is provided. I think the current documentation gives enough information to give it a try, and then I believe you will see it, although A test exists, https://github.com/spglib/spglib/blob/develop/python/test/test_spacegrouop_type_from_symmetry.py Docstring also gives more detailed array structures: In [1]: import spglib
In [2]: help(spglib.get_spacegroup_type_from_symmetry) |
I tried as follows, but it fails, and none is returned: In [1]: import spglib
In [3]: rot=[ [ [ 0, -1, 0 ], [ 0, 0, -1 ], [ -1, 0, 0 ] ], [ [ -1, 2, -1 ], [ -3/2, 3/2, -1/2 ], [ -1/2, 3/2, -3/2 ] ] ]
In [5]: tran=[ [ 1/4, 1/4, 1/4 ], [ -3/8, -1/16, -17/16 ] ]
In [6]: spglib.get_spacegroup_type_from_symmetry(rot,tran) In the docstring returned by Parameters
----------
rotations : array_like
Matrix parts of space group operations.
shape=(n_operations, 3, 3), order='C', dtype='intc' As you can see, this function has the restriction |
They have to be in crystallographic basis. |
Just based on the above data provided by me, how can I find an eligible crystallographic basis and then convert my data using it? Below are some background and additional notes on this issue. I am currently developing a package for space group identification and isomorphism determination between two different space groups based on any given set of generators. This data discussed here is generated by my algorithm, and they can pass the verification of BCS IDENTIFY GROUP program as shown below:
In[118]:= MatrixOrder // ClearAll;
MatrixOrder[m_?MatrixQ, maxIter_Integer : 6] :=
Module[{n = 1, i = IdentityMatrix[Length[m]]},
NestWhile[(n++; m . #) &, m, # != i &, 1, maxIter];
(*If[n==maxIter,StringForm["Maximum steps exceeded the limit `1`.",
maxIter],{n}]*)(*{n,n-1==maxIter}*)n]
(*gap>gensSGc2false:=GeneratorsOfGroup(SGc2false);*)
"gensSGc2false:=[[[0,-1,0,1/4],[0,0,-1,1/4],[-1,0,0,1/4],[0,0,0,1]],[[\
-1,2,-1,-3/8],[-3/2,3/2,-1/2,-1/16],[-1/2,3/2,-3/2,-17/16],[0,0,0,1]]]\
" // StringReplace[#, {"[" -> "{", "]" -> "}"}] & // ToExpression
MatrixOrder /@ gensSGc2false[[All, 1 ;; 3, 1 ;; 3]]
Table[(i[[1 ;; 3, 1 ;; 3]] . Transpose[{{x, y, z}}] +
i[[1 ;; 3, 4]]) // Transpose, {i, gensSGc2false}] //
ArrayFlatten[#, 1] & // ToString[#, InputForm] & //
StringReplace[#, {"(" -> "", ")" -> ""}] &
Out[121]= {6, 4}
Out[122]= "{{1/4 - y, 1/4 - z, 1/4 - x}, {-3/8 - x + 2*y - z, -1/16 - \
3*x/2 + 3*y/2 - z/2, -17/16 - x/2 + 3*y/2 - 3*z/2}}"
|
I don't know about gap. With |
I didn't use GAP for my development, but Mathamatica, and GAP is just an auxiliary validation and research tool in my current situation.
You're saying the matrix representations of the same operator under different bases, i.e., the different representations of an operator before and after change-of-basis. As you can see, in the example here, the orders of generators' point group part satisfies the crystallographic restriction theorem, and more intriguingly, the identification can be done successfully by BSC IDENTIFY GROUP tool, as shown in the screenshots posted above. Therefore, I am still very confused about this question. |
What is implemented in spglib is not in arbitrary setting. |
Thank you for comment and explanation. I see the point: this indicates that the expression of these two generators is based on the Cartesian coordinate system (basis), not the crystallographic coordinate system (basis). |
Yes, it's my guess. Internally, spglib transforms the symmetry operations by change-of-basis to a standardized crystallographic basis. Using this matrix representations are transformed to those comparable with the dataset of matrix representations like those found in ITA. |
BTW, how can I input the centered |
Now, I tried the following space group generators which have pure integer linear (rotation) matrices, but $ pyenv shell datasci
$ pip list|grep spglib
spglib 2.0.1
$ ipython
In [1]: import spglib
In [2]: rot=[ [ [ 0, -1, 0 ], [ 0, 0, -1 ], [ -1, 0, 0 ] ], [ [ 0, 1, 0 ], [ 0, 0, 1 ], [ -1, -1, -1 ] ] ]
In [3]: tran=[ [ 1/4, 1/4, 1/4 ], [ 1, -1, 1 ] ]
In [4]: spglib.get_spacegroup_type_from_symmetry(rot,tran) On the other hand, IDENTIFY GROUP works smoothly using the corresponding generators in the following format:
|
The following are two generators of a space group represented in the affine matrix format:
The specification of the above representation of affine transformations is by augmented matrices of the form
which act from the left on column vectors (x,1). Such matrices are said to be affine matrices acting on the left.
I want to know if
spglib
can identify the corresponding space group created by the above generators. I looked through the example.py and failed to find any applicable clues for the data I posted here.Regards,
Zhao
The text was updated successfully, but these errors were encountered: