Skip to content

Commit 5f255c0

Browse files
committed
Added a new test which can crash
1 parent a6ad39e commit 5f255c0

2 files changed

Lines changed: 77 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
Dynamical matrix file
2+
3+
1 2 4 4.6714030 0.0000000 7.0125405 0.0000000 0.0000000 0.0000000
4+
1 'C ' 10947.083358978085
5+
1 1 0.0000000000 0.0000000000 0.0000000000
6+
2 1 0.4999999950 -0.2886751317 0.0000000000
7+
8+
Dynamical Matrix in cartesian axes bla
9+
10+
q = ( 0.000000000 0.000000000 0.000000000 )
11+
12+
1 1
13+
1.08322136 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
14+
0.00000000 0.00000000 1.08322136 0.00000000 0.00000000 0.00000000
15+
0.00000000 0.00000000 0.00000000 0.00000000 0.34072341 0.00000000
16+
1 2
17+
-1.08322136 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
18+
0.00000000 0.00000000 -1.08322136 0.00000000 0.00000000 0.00000000
19+
0.00000000 0.00000000 0.00000000 0.00000000 -0.34072341 0.00000000
20+
2 1
21+
-1.08322136 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
22+
0.00000000 0.00000000 -1.08322136 0.00000000 0.00000000 0.00000000
23+
0.00000000 0.00000000 0.00000000 0.00000000 -0.34072341 0.00000000
24+
2 2
25+
1.08322136 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
26+
0.00000000 0.00000000 1.08322136 0.00000000 0.00000000 0.00000000
27+
0.00000000 0.00000000 0.00000000 0.00000000 0.34072341 0.00000000
28+
29+
Diagonalizing the dynamical matrix
30+
31+
q = ( 0.000000000 0.000000000 0.000000000 )
32+
33+
**************************************************************************
34+
freq ( 1) = 0.000000 [THz] = 0.000000 [cm-1]
35+
( 0.000000 0.000000 0.000000 0.000000 -0.707107 0.000000 )
36+
( 0.000000 0.000000 0.000000 0.000000 -0.707107 0.000000 )
37+
freq ( 2) = 0.000000 [THz] = 0.000015 [cm-1]
38+
( -0.371080 0.000000 0.601913 0.000000 0.000000 0.000000 )
39+
( -0.371080 0.000000 0.601913 0.000000 0.000000 0.000000 )
40+
freq ( 3) = 0.000001 [THz] = 0.000030 [cm-1]
41+
( -0.601913 0.000000 -0.371080 0.000000 0.000000 0.000000 )
42+
( -0.601913 0.000000 -0.371080 0.000000 0.000000 0.000000 )
43+
freq ( 4) = 25.956242 [THz] = 865.807028 [cm-1]
44+
( 0.000000 0.000000 0.000000 0.000000 -0.707107 0.000000 )
45+
( 0.000000 0.000000 0.000000 0.000000 0.707107 0.000000 )
46+
freq ( 5) = 46.280648 [THz] = 1543.756236 [cm-1]
47+
( 0.000000 0.000000 0.707107 0.000000 0.000000 0.000000 )
48+
( 0.000000 0.000000 -0.707107 0.000000 0.000000 0.000000 )
49+
freq ( 6) = 46.280648 [THz] = 1543.756236 [cm-1]
50+
( -0.707107 0.000000 -0.000000 0.000000 0.000000 0.000000 )
51+
( 0.707107 0.000000 -0.000000 0.000000 0.000000 0.000000 )
52+
**************************************************************************
53+
54+
File generated with q2qstar.x from 'dyn_mono_10x10x1_1'
55+
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import cellconstructor as CC
2+
import cellconstructor.Phonons
3+
4+
import sscha, sscha.Ensemble, sscha.SchaMinimizer
5+
6+
import numpy as np
7+
import sys, os
8+
9+
10+
# A mock test that should not crash when we try to impose symmetries on a valid dynamical matrix
11+
def test_root_step_identity():
12+
total_path = os.path.dirname(os.path.abspath(__file__))
13+
os.chdir(total_path)
14+
15+
dyn = CC.Phonons.Phonons("dyn_mono_10x10x1_full")
16+
dyn.Symmetrize()
17+
18+
19+
if __name__ == "__main__":
20+
test_root_step_identity()
21+
22+

0 commit comments

Comments
 (0)