File: variable.md

package info (click to toggle)
spglib 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,180 kB
  • sloc: ansic: 125,066; python: 7,717; cpp: 2,197; f90: 2,143; ruby: 792; makefile: 22; sh: 18
file content (129 lines) | stat: -rw-r--r-- 3,297 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Variables

Variables frequently used in C-API are explained. In interfaces of
other languages, the definition may be different, e.g., `lattice`
for Python interface is transposed.

(variables_lattice)=

## `lattice`

**Attention**: In Python interface, `lattice` is transposed
[](#py_variables_crystal_structure).

Basis vectors (in Cartesian coordinates)

```
[ [ a_x, b_x, c_x ],
  [ a_y, b_y, c_y ],
  [ a_z, b_z, c_z ] ]
```

See [Basis vectors](#def_basis_vectors) and [Atomic point
coordinates](#def_point_coordinates) for more details.

## `position`

Atomic points (in fractional coordinates with respect to basis vectors)

```
[ [ x1_1, x1_2, x1_3 ],
  [ x2_1, x2_2, x2_3 ],
  [ x3_1, x3_2, x3_3 ],
  ...                   ]
```

See [Basis vectors](#def_basis_vectors) and [Atomic point
coordinates](#def_point_coordinates) for more details.

## `types`

Atomic species are differentiated by integers. The numbers are just
used to distinguishes atoms, and is not related to atomic numbers.

```
[ type_1, type_2, type_3, ... ]
```

The number of elements is same as the number of atoms.

## `rotation`

Rotation matrices (integer) of symmetry operations.

```
[ [ W_11, W_12, W_13 ],
  [ W_21, W_22, W_23 ],
  [ W_31, W_32, W_33 ] ]
```

See [Symmetry operation](#def_symmetry_operation) for more details.

## `translation`

Translation vectors corresponding to symmetry operations in fractional
coordinates.

```
[ w_1, w_2, w_3 ]
```

See [Symmetry operation](#def_symmetry_operation) for more details.

(variables_symprec)=

## `symprec`

Distance tolerance in Cartesian coordinates to find crystal
symmetry.

For atomic positions, roughly speaking, two position vectors `x` and `x'` in
Cartesian coordinates are considered to be the same if `|x' - x| < symprec`.
For more details, see the [spglib paper](https://arxiv.org/abs/1808.01590),
Sec. II-A.

The angle distortion between basis vectors is converted to a length
and compared with this distance tolerance. For more details, see the
[spglib paper](https://arxiv.org/abs/1808.01590), Sec. IV-A. It is
possible to specify angle tolerance explicitly, see
[](#variables_angle_tolerance).

(variables_angle_tolerance)=

## `angle_tolerance`

Tolerance of angle between basis vectors in degrees to be tolerated
in the symmetry finding. To use angle tolerance, another set of
functions are prepared for C-API as follows

```
spgat_get_dataset
spgat_get_symmetry
spgat_get_symmetry_with_collinear_spin
spgat_get_multiplicity
spgat_find_primitive
spgat_get_international
spgat_get_schoenflies
spgat_refine_cell
```

(variables_mag_symprec)=

## `mag_symprec`

Tolerance for magnetic symmetry search in the unit of spins or magmoms. By
specifying a negative value, the same value as `symprec` is used to compare
magnetic moments.

The following functions are called by the same way with an additional argument
of `const double angle_tolerance` in degrees. By specifying a negative value,
the behavior becomes the same as usual functions (e.g.
`spg_get_magnetic_dataset`). For python-API, the magnetic tolerance is given
with a keyword argument of `mag_symprec`, where the default value of
`mag_symprec` is a negative value.

```
spgms_get_magnetic_dataset
spgms_get_symmetry_with_collinear_spin
spgms_get_symmetry_with_site_tensors
```