Coverage for hiphive/core/config.py: 100%

Shortcuts on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

23 statements  

1# This module contains the various variables used as tolerances and similar 

2# throughout the code in the core functionality. 

3 

4 

5class config: 

6 class eigensymmetries: 

7 rotation_integer_tolerance = 1e-12 

8 method = 'iterative' 

9 crystal_symmetries = True 

10 

11 class iterative: 

12 zero_tolerance = 1e-12 

13 simplify = True 

14 simplify_tolerance = None 

15 method = 'symbolic' 

16 

17 

18"""This is the tolerance used when the rotation matrices and similar are tested 

19if they are integers. 

20""" 

21integer_tolerance = 1e-12 

22 

23""" For each symmetry, the constraint matrix can be reduced to square 

24again. This can be done either by 'symbolic', 'numeric' or not at all 

25(None). Default is None since the matrix is often small enough to fit 

26in memory. 

27'symbolic', 'numeric', None 

28""" 

29eigentensor_compress_mode = None 

30 

31"""If this is True, before every symbolic compression the values will be 

32simplified by sympy, potentially turning them into exact rational or 

33irrational numbers. This can be useful for systems with non-integer 

34rotation matrices in cartesian coordinates e.g. hcp. The main purpose is 

35to make the rref more stable against repeating rounding errors. 

36True, False 

37""" 

38eigentensor_simplify_before_compress = False 

39 

40""" If non compress was used during construction but used before solving 

41True, False 

42""" 

43eigentensor_simplify_before_last_compress = False 

44 

45"""If the compress_mode is None the constraint matrix might be compressed 

46right before the nullspace() solver 

47'numeric', 'symbolic', None 

48""" 

49eigentensor_compress_before_solve = None 

50 

51"""This might make the nullspace() more stable 

52True, False 

53""" 

54eigentensor_simplify_before_solve = True 

55 

56""" 

57'symbolic', 'numeric' 

58""" 

59eigentensor_solve_mode = 'symbolic' 

60 

61 

62""" 

63'symbolic', 'numeric' 

64""" 

65sum_rule_constraint_mode = 'symbolic' 

66 

67""" 

68True, False 

69""" 

70sum_rule_constraint_simplify = True 

71 

72 

73""" 

74True, False 

75""" 

76constraint_vectors_simplify_before_compress = True 

77 

78""" 

79'symbolic', 'numeric', None 

80""" 

81constraint_vectors_compress_mode = 'symbolic' 

82 

83""" 

84True, False 

85""" 

86constraint_vectors_simplify_before_solve = True 

87 

88""" 

89'symbolic', 'numeric' 

90""" 

91constraint_vectors_solve_mode = 'symbolic'