Fix spectral function test

This commit is contained in:
Atsushi Togo 2020-09-07 19:18:27 +09:00
parent 8acc121810
commit 3fa025346f
1 changed files with 19 additions and 18 deletions

View File

@ -25,24 +25,24 @@ shifts = [
spec_funcs = [
0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000,
0.0029242, 0.0029242, 0.0009262, 0.0003634, 0.0003838, 0.0003838,
0.0007678, 0.0007678, 0.0373760, 0.0010702, 0.0009678, 0.0009678,
0.0008232, 0.0008232, 0.5674888, 0.0008545, 0.0008206, 0.0008206,
0.0001065, 0.0001065, 0.0037537, 0.0005808, 0.0005891, 0.0005891,
0.0003814, 0.0003814, 0.0112237, 0.0009503, 0.0011072, 0.0011072,
0.0000917, 0.0000917, 0.0042648, 0.0014247, 0.0007688, 0.0007688,
0.0001342, 0.0001342, 0.0053626, 0.0113299, 0.0112733, 0.0112733,
0.0000221, 0.0000221, 0.0015374, 0.0059884, 0.0059895, 0.0059895,
0.0000520, 0.0000520, 0.0070211, 0.0003925, 0.0004139, 0.0004139,
0.0000085, 0.0000085, 0.0001872, 0.0016104, 0.0014443, 0.0014443,
0.0000051, 0.0000051, 0.0000370, 0.0027822, 0.0025951, 0.0025951,
0.0000004, 0.0000004, 0.0000021, 0.0197933, 0.0168956, 0.0168956,
0.0000010, 0.0000010, 0.0000082, 0.0080833, 0.0110838, 0.0110838,
0.0000002, 0.0000002, 0.0000031, 0.0014052, 0.0008202, 0.0008202,
0.0000002, 0.0000002, 0.0000035, 0.0037304, 0.0039325, 0.0039325,
0.0000000, 0.0000000, 0.0000009, 0.0009279, 0.0009800, 0.0009800,
0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000,
0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000,
0.0010067, 0.0006160, 0.0003428, 0.0005280, 0.0004634, 0.0004811,
0.0030157, 0.0012885, 0.0006403, 0.0007254, 0.0006859, 0.0006075,
0.0783861, 0.0145968, 0.0040184, 0.0013955, 0.0010490, 0.0009551,
0.1256767, 0.0076117, 0.0012648, 0.0005816, 0.0007186, 0.0005401,
0.5288047, 0.0419927, 0.0032818, 0.0012094, 0.0010713, 0.0009373,
0.0441985, 0.1523475, 0.0067098, 0.0029446, 0.0014789, 0.0015596,
0.0267331, 30.4102899, 0.0090105, 0.0082343, 0.0118987, 0.0106408,
0.0048560, 0.1573017, 0.0126811, 0.0085599, 0.0081138, 0.0077690,
0.0101136, 0.0017460, 0.0004489, 0.0005850, 0.0005048, 0.0005229,
0.0002283, 0.0006942, 0.0050470, 0.0012772, 0.0010867, 0.0009498,
0.0002702, 0.0004036, 0.0106017, 0.0086169, 0.0041489, 0.0035906,
0.0000154, 0.0000295, 0.0002803, 0.0434066, 0.1278558, 0.0549209,
0.0000166, 0.0000264, 0.0001776, 0.0018060, 0.0042557, 0.0043927,
0.0000066, 0.0000108, 0.0001284, 0.0010011, 0.0009471, 0.0011088,
0.0000059, 0.0000105, 0.0000738, 0.0010751, 0.0027300, 0.0026490,
0.0000012, 0.0000033, 0.0000504, 0.0005539, 0.0009128, 0.0009358,
0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000]
@ -54,9 +54,10 @@ def test_SpectralFunction(si_pbesol):
temperatures=[300, ],
num_frequency_points=10)
sf.run()
# for line in sf.spectral_functions.reshape(-1, 6):
# for line in np.swapaxes(sf.spectral_functions, -2, -1).reshape(-1, 6):
# print(("%.7f, " * 6) % tuple(line))
# raise
np.testing.assert_allclose(
shifts, np.swapaxes(sf.shifts, -2, -1).ravel(), atol=1e-2)
np.testing.assert_allclose(