mirror of https://github.com/phonopy/phonopy.git
Updated spglib to v1.14.1
This commit is contained in:
parent
816c346e5c
commit
bb700a3e1f
|
@ -391,7 +391,7 @@ static PyObject * py_get_dataset(PyObject *self, PyObject *args)
|
|||
PyList_SetItem(array, n, PYUNICODE_FROMSTRING(dataset->pointgroup_symbol));
|
||||
n++;
|
||||
|
||||
assert(n != len_list);
|
||||
assert(n == len_list);
|
||||
|
||||
spg_free_dataset(dataset);
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ static DataContainer * get_spacegroup_and_primitive(const Cell * cell,
|
|||
debug_print_matrix_d3(container->primitive->cell->lattice);
|
||||
|
||||
if ((container->spacegroup = spa_search_spacegroup(
|
||||
container->primitive->cell,
|
||||
container->primitive,
|
||||
hall_number,
|
||||
container->primitive->tolerance,
|
||||
container->primitive->angle_tolerance)) != NULL) {
|
||||
|
|
|
@ -92,6 +92,7 @@ Primitive * prm_alloc_primitive(const int size)
|
|||
primitive->size = size;
|
||||
primitive->tolerance = 0;
|
||||
primitive->angle_tolerance = -1.0;
|
||||
primitive->orig_lattice = NULL;
|
||||
|
||||
if (size > 0) {
|
||||
if ((primitive->mapping_table = (int*) malloc(sizeof(int) * size)) == NULL) {
|
||||
|
@ -122,6 +123,12 @@ void prm_free_primitive(Primitive * primitive)
|
|||
cel_free_cell(primitive->cell);
|
||||
primitive->cell = NULL;
|
||||
}
|
||||
|
||||
if (primitive->orig_lattice != NULL) {
|
||||
free(primitive->orig_lattice);
|
||||
primitive->orig_lattice = NULL;
|
||||
}
|
||||
|
||||
free(primitive);
|
||||
}
|
||||
}
|
||||
|
@ -259,6 +266,12 @@ static Primitive * get_primitive(const Cell * cell,
|
|||
found:
|
||||
primitive->tolerance = tolerance;
|
||||
primitive->angle_tolerance = angle_tolerance;
|
||||
if ((primitive->orig_lattice =
|
||||
(double (*)[3]) malloc(sizeof(double[3]) * 3)) == NULL) {
|
||||
warning_print("spglib: Memory could not be allocated.");
|
||||
return NULL;
|
||||
}
|
||||
mat_copy_matrix_d3(primitive->orig_lattice, cell->lattice);
|
||||
mat_free_VecDBL(pure_trans);
|
||||
pure_trans = NULL;
|
||||
return primitive;
|
||||
|
|
|
@ -153,7 +153,6 @@ static void measure_rigid_rotation(double rotation[3][3],
|
|||
SPGCONST double std_lattice[3][3]);
|
||||
static void get_orthonormal_basis(double basis[3][3],
|
||||
SPGCONST double lattice[3][3]);
|
||||
|
||||
static SPGCONST int identity[3][3] = {
|
||||
{ 1, 0, 0},
|
||||
{ 0, 1, 0},
|
||||
|
@ -1540,5 +1539,4 @@ static void get_orthonormal_basis(double basis[3][3],
|
|||
}
|
||||
|
||||
mat_transpose_matrix_d3(basis, basis_T);
|
||||
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -45,6 +45,7 @@ typedef struct {
|
|||
int size;
|
||||
double tolerance;
|
||||
double angle_tolerance;
|
||||
double (*orig_lattice)[3]; /* 3x3 matrix */
|
||||
} Primitive;
|
||||
|
||||
Primitive * prm_alloc_primitive(const int size);
|
||||
|
|
|
@ -66,7 +66,7 @@ typedef enum {
|
|||
R_CENTER,
|
||||
} Centering;
|
||||
|
||||
Spacegroup * spa_search_spacegroup(const Cell * primitive,
|
||||
Spacegroup * spa_search_spacegroup(const Primitive * primitive,
|
||||
const int hall_number,
|
||||
const double symprec,
|
||||
const double angle_tolerance);
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
#define __version_H__
|
||||
|
||||
#define SPGLIB_MAJOR_VERSION 1
|
||||
#define SPGLIB_MINOR_VERSION 13
|
||||
#define SPGLIB_MICRO_VERSION 0
|
||||
#define SPGLIB_MINOR_VERSION 14
|
||||
#define SPGLIB_MICRO_VERSION 1
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue