|
moyoc
C interface of moyo, a fast and robust crystal symmetry finder
|
#include <stdarg.h>#include <stdbool.h>#include <stdint.h>#include <stdlib.h>
Go to the source code of this file.
Data Structures | |
| struct | MoyoSpaceGroupType |
| Space-group type information, created by moyo_space_group_type_new and freed by moyo_space_group_type_free. More... | |
| struct | MoyoLayerGroupType |
| Layer-group type information, created by moyo_layer_group_type_new and freed by moyo_layer_group_type_free. More... | |
| struct | MoyoHallSymbolEntry |
| An entry containing space-group information for a specified Hall number, created by moyo_hall_symbol_entry_new and freed by moyo_hall_symbol_entry_free. More... | |
| struct | MoyoLayerHallSymbolEntry |
| An entry containing layer-group information for a specified layer Hall number, created by moyo_layer_hall_symbol_entry_new and freed by moyo_layer_hall_symbol_entry_free. More... | |
| struct | MoyoMagneticSpaceGroupType |
| Magnetic space-group type information, created by moyo_magnetic_space_group_type_new and freed by moyo_magnetic_space_group_type_free. More... | |
| struct | MoyoOperations |
| Symmetry operations. More... | |
| struct | MoyoMagneticOperations |
| Magnetic symmetry operations. More... | |
| struct | MoyoCell |
| Crystal structure. More... | |
| struct | MoyoLayerDataset |
| A dataset of the layer-group symmetry analysis, created by moyo_layer_dataset_new and freed by moyo_layer_dataset_free. More... | |
| struct | MoyoCollinearMagneticCell |
| Collinear magnetic structure. More... | |
| struct | MoyoCollinearMagneticDataset |
| A dataset of the magnetic symmetry analysis of a collinear magnetic structure, created by moyo_collinear_magnetic_dataset_new and freed by moyo_collinear_magnetic_dataset_free. More... | |
| struct | MoyoNonCollinearMagneticCell |
| Non-collinear magnetic structure. More... | |
| struct | MoyoNonCollinearMagneticDataset |
| A dataset of the magnetic symmetry analysis of a non-collinear magnetic structure, created by moyo_noncollinear_magnetic_dataset_new and freed by moyo_noncollinear_magnetic_dataset_free. More... | |
| struct | MoyoDataset |
| A dataset of the symmetry analysis, created by moyo_dataset_new and freed by moyo_dataset_free. More... | |
| struct | MoyoLayerGroup |
| Layer group identified by moyo_layer_group_new and freed by moyo_layer_group_free. More... | |
| struct | MoyoMagneticSpaceGroup |
| Magnetic space group identified by moyo_magnetic_space_group_new and freed by moyo_magnetic_space_group_free. More... | |
| struct | MoyoPointGroup |
| Point group identified by moyo_point_group_new and freed by moyo_point_group_free. More... | |
| struct | MoyoSpaceGroup |
| Space group identified by moyo_space_group_new and freed by moyo_space_group_free. More... | |
Typedefs | |
| typedef int32_t | MoyoSetting |
| typedef int32_t | MoyoLayerSetting |
Enumerations | |
| enum | MoyoSetting { MOYO_SETTING_HALL_NUMBER , MOYO_SETTING_SPGLIB , MOYO_SETTING_STANDARD } |
| Preference for the setting of the space group. More... | |
| enum | MoyoLayerSetting { MOYO_LAYER_SETTING_HALL_NUMBER , MOYO_LAYER_SETTING_SPGLIB , MOYO_LAYER_SETTING_STANDARD } |
| Preference for the Hall setting of the layer group. More... | |
Functions | |
| const char * | moyo_version (void) |
| Return the version string of moyoc (e.g. | |
| struct MoyoSpaceGroupType * | moyo_space_group_type_new (int32_t number) |
| Look up the space-group type information for ITA number (1 - 230). | |
| void | moyo_space_group_type_free (struct MoyoSpaceGroupType *space_group_type) |
| Free a space-group type created by moyo_space_group_type_new. | |
| struct MoyoLayerGroupType * | moyo_layer_group_type_new (int32_t number) |
| Look up the layer-group type information for layer-group number (1 - 80). | |
| void | moyo_layer_group_type_free (struct MoyoLayerGroupType *layer_group_type) |
| Free a layer-group type created by moyo_layer_group_type_new. | |
| struct MoyoHallSymbolEntry * | moyo_hall_symbol_entry_new (int32_t hall_number) |
| Look up the space-group Hall symbol entry for hall_number (1 - 530). | |
| void | moyo_hall_symbol_entry_free (struct MoyoHallSymbolEntry *entry) |
| Free an entry created by moyo_hall_symbol_entry_new. | |
| struct MoyoLayerHallSymbolEntry * | moyo_layer_hall_symbol_entry_new (int32_t hall_number) |
| Look up the layer-group Hall symbol entry for hall_number (1 - 116). | |
| void | moyo_layer_hall_symbol_entry_free (struct MoyoLayerHallSymbolEntry *entry) |
| Free an entry created by moyo_layer_hall_symbol_entry_new. | |
| struct MoyoMagneticSpaceGroupType * | moyo_magnetic_space_group_type_new (int32_t uni_number) |
| Look up the magnetic space-group type information for uni_number (1 - 1651). | |
| void | moyo_magnetic_space_group_type_free (struct MoyoMagneticSpaceGroupType *magnetic_space_group_type) |
| Free a magnetic space-group type created by moyo_magnetic_space_group_type_new. | |
| struct MoyoOperations * | moyo_operations_from_number (int32_t number, MoyoSetting setting, int32_t hall_number, bool primitive) |
| Return symmetry operations for the given space-group ITA number (1 - 230). | |
| struct MoyoOperations * | moyo_operations_from_layer_number (int32_t number, MoyoLayerSetting setting, int32_t hall_number, bool primitive) |
| Return symmetry operations for the given layer-group number (1 - 80). | |
| void | moyo_operations_free (struct MoyoOperations *operations) |
| Free operations returned by moyo_operations_from_number or moyo_operations_from_layer_number. | |
| struct MoyoMagneticOperations * | moyo_magnetic_operations_from_uni_number (int32_t uni_number, bool primitive) |
| Return magnetic symmetry operations for the given UNI (and BNS) serial number uni_number (1 - 1651). | |
| void | moyo_magnetic_operations_free (struct MoyoMagneticOperations *magnetic_operations) |
| Free magnetic operations returned by moyo_magnetic_operations_from_uni_number. | |
| struct MoyoLayerDataset * | moyo_layer_dataset_new (const double(*basis)[3], const double(*positions)[3], const int32_t *numbers, int32_t num_atoms, double symprec, double angle_tolerance, MoyoLayerSetting setting, int32_t hall_number, bool rotate_basis) |
| Analyze the layer-group symmetry of the given cell and create a dataset. | |
| void | moyo_layer_dataset_free (struct MoyoLayerDataset *dataset) |
| Free a dataset created by moyo_layer_dataset_new. | |
| struct MoyoCollinearMagneticDataset * | moyo_collinear_magnetic_dataset_new (const double(*basis)[3], const double(*positions)[3], const int32_t *numbers, const double *magnetic_moments, int32_t num_atoms, double symprec, double angle_tolerance, double mag_symprec, bool is_axial, bool rotate_basis) |
| Analyze the magnetic symmetry of the given collinear magnetic cell and create a dataset. | |
| void | moyo_collinear_magnetic_dataset_free (struct MoyoCollinearMagneticDataset *dataset) |
| Free a dataset created by moyo_collinear_magnetic_dataset_new. | |
| struct MoyoNonCollinearMagneticDataset * | moyo_noncollinear_magnetic_dataset_new (const double(*basis)[3], const double(*positions)[3], const int32_t *numbers, const double(*magnetic_moments)[3], int32_t num_atoms, double symprec, double angle_tolerance, double mag_symprec, bool is_axial, bool rotate_basis) |
| Analyze the magnetic symmetry of the given non-collinear magnetic cell and create a dataset. | |
| void | moyo_noncollinear_magnetic_dataset_free (struct MoyoNonCollinearMagneticDataset *dataset) |
| Free a dataset created by moyo_noncollinear_magnetic_dataset_new. | |
| struct MoyoDataset * | moyo_dataset_new (const double(*basis)[3], const double(*positions)[3], const int32_t *numbers, int32_t num_atoms, double symprec, double angle_tolerance, MoyoSetting setting, int32_t hall_number, bool rotate_basis) |
| Analyze the symmetry of the given cell and create a dataset. | |
| void | moyo_dataset_free (struct MoyoDataset *dataset) |
| Free a dataset created by moyo_dataset_new. | |
| struct MoyoLayerGroup * | moyo_layer_group_new (const int32_t(*prim_rotations)[3][3], const double(*prim_translations)[3], int32_t num_operations, const double(*basis)[3], MoyoLayerSetting setting, int32_t hall_number, double epsilon) |
| Identify the layer group from primitive layer-cell rotations and translations. | |
| void | moyo_layer_group_free (struct MoyoLayerGroup *layer_group) |
| Free a layer group created by moyo_layer_group_new. | |
| struct MoyoMagneticSpaceGroup * | moyo_magnetic_space_group_new (const int32_t(*prim_rotations)[3][3], const double(*prim_translations)[3], const bool *prim_time_reversals, int32_t num_operations, const double(*basis)[3], double epsilon) |
| Identify the magnetic space group from primitive magnetic operations. | |
| void | moyo_magnetic_space_group_free (struct MoyoMagneticSpaceGroup *magnetic_space_group) |
| Free a magnetic space group created by moyo_magnetic_space_group_new. | |
| struct MoyoPointGroup * | moyo_point_group_new (const int32_t(*prim_rotations)[3][3], int32_t num_operations, const double(*basis)[3]) |
| Identify the point group of the given primitive rotations. | |
| void | moyo_point_group_free (struct MoyoPointGroup *point_group) |
| Free a point group created by moyo_point_group_new. | |
| struct MoyoSpaceGroup * | moyo_space_group_new (const int32_t(*prim_rotations)[3][3], const double(*prim_translations)[3], int32_t num_operations, const double(*basis)[3], MoyoSetting setting, int32_t hall_number, double epsilon) |
| Identify the space group from primitive rotations and translations. | |
| void | moyo_space_group_free (struct MoyoSpaceGroup *space_group) |
| Free a space group created by moyo_space_group_new. | |
| typedef int32_t MoyoLayerSetting |
| typedef int32_t MoyoSetting |
| enum MoyoLayerSetting |
Preference for the Hall setting of the layer group.
| enum MoyoSetting |
Preference for the setting of the space group.
| void moyo_collinear_magnetic_dataset_free | ( | struct MoyoCollinearMagneticDataset * | dataset | ) |
Free a dataset created by moyo_collinear_magnetic_dataset_new.
Passing NULL is a no-op.
dataset must be a pointer returned by moyo_collinear_magnetic_dataset_new that has not been freed yet, or NULL.
| struct MoyoCollinearMagneticDataset * moyo_collinear_magnetic_dataset_new | ( | const double(*) | basis[3], |
| const double(*) | positions[3], | ||
| const int32_t * | numbers, | ||
| const double * | magnetic_moments, | ||
| int32_t | num_atoms, | ||
| double | symprec, | ||
| double | angle_tolerance, | ||
| double | mag_symprec, | ||
| bool | is_axial, | ||
| bool | rotate_basis ) |
Analyze the magnetic symmetry of the given collinear magnetic cell and create a dataset.
basis must point to 3 basis vectors, and positions, numbers, and magnetic_moments must point to num_atoms elements each.
| void moyo_dataset_free | ( | struct MoyoDataset * | dataset | ) |
Free a dataset created by moyo_dataset_new.
Passing NULL is a no-op.
dataset must be a pointer returned by moyo_dataset_new that has not been freed yet, or NULL.
| struct MoyoDataset * moyo_dataset_new | ( | const double(*) | basis[3], |
| const double(*) | positions[3], | ||
| const int32_t * | numbers, | ||
| int32_t | num_atoms, | ||
| double | symprec, | ||
| double | angle_tolerance, | ||
| MoyoSetting | setting, | ||
| int32_t | hall_number, | ||
| bool | rotate_basis ) |
Analyze the symmetry of the given cell and create a dataset.
basis must point to 3 basis vectors, and positions and numbers must point to num_atoms elements each.
| void moyo_hall_symbol_entry_free | ( | struct MoyoHallSymbolEntry * | entry | ) |
Free an entry created by moyo_hall_symbol_entry_new.
Passing NULL is a no-op.
entry must be a pointer returned by moyo_hall_symbol_entry_new that has not been freed yet, or NULL.
| struct MoyoHallSymbolEntry * moyo_hall_symbol_entry_new | ( | int32_t | hall_number | ) |
Look up the space-group Hall symbol entry for hall_number (1 - 530).
Returns NULL if hall_number is out of range.
| void moyo_layer_dataset_free | ( | struct MoyoLayerDataset * | dataset | ) |
Free a dataset created by moyo_layer_dataset_new.
Passing NULL is a no-op.
dataset must be a pointer returned by moyo_layer_dataset_new that has not been freed yet, or NULL.
| struct MoyoLayerDataset * moyo_layer_dataset_new | ( | const double(*) | basis[3], |
| const double(*) | positions[3], | ||
| const int32_t * | numbers, | ||
| int32_t | num_atoms, | ||
| double | symprec, | ||
| double | angle_tolerance, | ||
| MoyoLayerSetting | setting, | ||
| int32_t | hall_number, | ||
| bool | rotate_basis ) |
Analyze the layer-group symmetry of the given cell and create a dataset.
basis must point to 3 basis vectors, and positions and numbers must point to num_atoms elements each.
| void moyo_layer_group_free | ( | struct MoyoLayerGroup * | layer_group | ) |
Free a layer group created by moyo_layer_group_new.
Passing NULL is a no-op.
layer_group must be a pointer returned by moyo_layer_group_new that has not been freed yet, or NULL.
| struct MoyoLayerGroup * moyo_layer_group_new | ( | const int32_t(*) | prim_rotations[3][3], |
| const double(*) | prim_translations[3], | ||
| int32_t | num_operations, | ||
| const double(*) | basis[3], | ||
| MoyoLayerSetting | setting, | ||
| int32_t | hall_number, | ||
| double | epsilon ) |
Identify the layer group from primitive layer-cell rotations and translations.
prim_rotations and prim_translations must point to num_operations elements each, and basis must point to 3 basis vectors or be NULL.
| void moyo_layer_group_type_free | ( | struct MoyoLayerGroupType * | layer_group_type | ) |
Free a layer-group type created by moyo_layer_group_type_new.
Passing NULL is a no-op.
layer_group_type must be a pointer returned by moyo_layer_group_type_new that has not been freed yet, or NULL.
| struct MoyoLayerGroupType * moyo_layer_group_type_new | ( | int32_t | number | ) |
Look up the layer-group type information for layer-group number (1 - 80).
Returns NULL if number is out of range.
| void moyo_layer_hall_symbol_entry_free | ( | struct MoyoLayerHallSymbolEntry * | entry | ) |
Free an entry created by moyo_layer_hall_symbol_entry_new.
Passing NULL is a no-op.
entry must be a pointer returned by moyo_layer_hall_symbol_entry_new that has not been freed yet, or NULL.
| struct MoyoLayerHallSymbolEntry * moyo_layer_hall_symbol_entry_new | ( | int32_t | hall_number | ) |
Look up the layer-group Hall symbol entry for hall_number (1 - 116).
Returns NULL if hall_number is out of range.
| void moyo_magnetic_operations_free | ( | struct MoyoMagneticOperations * | magnetic_operations | ) |
Free magnetic operations returned by moyo_magnetic_operations_from_uni_number.
Passing NULL is a no-op. Do not call this on magnetic operations embedded in a dataset; those are freed by the dataset's free function.
magnetic_operations must be a pointer returned by moyo_magnetic_operations_from_uni_number that has not been freed yet, or NULL.
| struct MoyoMagneticOperations * moyo_magnetic_operations_from_uni_number | ( | int32_t | uni_number, |
| bool | primitive ) |
Return magnetic symmetry operations for the given UNI (and BNS) serial number uni_number (1 - 1651).
| void moyo_magnetic_space_group_free | ( | struct MoyoMagneticSpaceGroup * | magnetic_space_group | ) |
Free a magnetic space group created by moyo_magnetic_space_group_new.
Passing NULL is a no-op.
magnetic_space_group must be a pointer returned by moyo_magnetic_space_group_new that has not been freed yet, or NULL.
| struct MoyoMagneticSpaceGroup * moyo_magnetic_space_group_new | ( | const int32_t(*) | prim_rotations[3][3], |
| const double(*) | prim_translations[3], | ||
| const bool * | prim_time_reversals, | ||
| int32_t | num_operations, | ||
| const double(*) | basis[3], | ||
| double | epsilon ) |
Identify the magnetic space group from primitive magnetic operations.
prim_rotations, prim_translations, and prim_time_reversals must point to num_operations elements each, and basis must point to 3 basis vectors or be NULL.
| void moyo_magnetic_space_group_type_free | ( | struct MoyoMagneticSpaceGroupType * | magnetic_space_group_type | ) |
Free a magnetic space-group type created by moyo_magnetic_space_group_type_new.
Passing NULL is a no-op.
magnetic_space_group_type must be a pointer returned by moyo_magnetic_space_group_type_new that has not been freed yet, or NULL.
| struct MoyoMagneticSpaceGroupType * moyo_magnetic_space_group_type_new | ( | int32_t | uni_number | ) |
Look up the magnetic space-group type information for uni_number (1 - 1651).
Returns NULL if uni_number is out of range.
| void moyo_noncollinear_magnetic_dataset_free | ( | struct MoyoNonCollinearMagneticDataset * | dataset | ) |
Free a dataset created by moyo_noncollinear_magnetic_dataset_new.
Passing NULL is a no-op.
dataset must be a pointer returned by moyo_noncollinear_magnetic_dataset_new that has not been freed yet, or NULL.
| struct MoyoNonCollinearMagneticDataset * moyo_noncollinear_magnetic_dataset_new | ( | const double(*) | basis[3], |
| const double(*) | positions[3], | ||
| const int32_t * | numbers, | ||
| const double(*) | magnetic_moments[3], | ||
| int32_t | num_atoms, | ||
| double | symprec, | ||
| double | angle_tolerance, | ||
| double | mag_symprec, | ||
| bool | is_axial, | ||
| bool | rotate_basis ) |
Analyze the magnetic symmetry of the given non-collinear magnetic cell and create a dataset.
basis must point to 3 basis vectors, and positions, numbers, and magnetic_moments must point to num_atoms elements each.
| void moyo_operations_free | ( | struct MoyoOperations * | operations | ) |
Free operations returned by moyo_operations_from_number or moyo_operations_from_layer_number.
Passing NULL is a no-op. Do not call this on operations embedded in a dataset; those are freed by the dataset's free function.
operations must be a pointer returned by moyo_operations_from_number or moyo_operations_from_layer_number that has not been freed yet, or NULL.
| struct MoyoOperations * moyo_operations_from_layer_number | ( | int32_t | number, |
| MoyoLayerSetting | setting, | ||
| int32_t | hall_number, | ||
| bool | primitive ) |
Return symmetry operations for the given layer-group number (1 - 80).
| struct MoyoOperations * moyo_operations_from_number | ( | int32_t | number, |
| MoyoSetting | setting, | ||
| int32_t | hall_number, | ||
| bool | primitive ) |
Return symmetry operations for the given space-group ITA number (1 - 230).
| void moyo_point_group_free | ( | struct MoyoPointGroup * | point_group | ) |
Free a point group created by moyo_point_group_new.
Passing NULL is a no-op.
point_group must be a pointer returned by moyo_point_group_new that has not been freed yet, or NULL.
| struct MoyoPointGroup * moyo_point_group_new | ( | const int32_t(*) | prim_rotations[3][3], |
| int32_t | num_operations, | ||
| const double(*) | basis[3] ) |
Identify the point group of the given primitive rotations.
prim_rotations must point to num_operations elements, and basis must point to 3 basis vectors or be NULL.
| void moyo_space_group_free | ( | struct MoyoSpaceGroup * | space_group | ) |
Free a space group created by moyo_space_group_new.
Passing NULL is a no-op.
space_group must be a pointer returned by moyo_space_group_new that has not been freed yet, or NULL.
| struct MoyoSpaceGroup * moyo_space_group_new | ( | const int32_t(*) | prim_rotations[3][3], |
| const double(*) | prim_translations[3], | ||
| int32_t | num_operations, | ||
| const double(*) | basis[3], | ||
| MoyoSetting | setting, | ||
| int32_t | hall_number, | ||
| double | epsilon ) |
Identify the space group from primitive rotations and translations.
prim_rotations and prim_translations must point to num_operations elements each, and basis must point to 3 basis vectors or be NULL.
| void moyo_space_group_type_free | ( | struct MoyoSpaceGroupType * | space_group_type | ) |
Free a space-group type created by moyo_space_group_type_new.
Passing NULL is a no-op.
space_group_type must be a pointer returned by moyo_space_group_type_new that has not been freed yet, or NULL.
| struct MoyoSpaceGroupType * moyo_space_group_type_new | ( | int32_t | number | ) |
Look up the space-group type information for ITA number (1 - 230).
Returns NULL if number is out of range.
| const char * moyo_version | ( | void | ) |
Return the version string of moyoc (e.g.
"0.11.0"). The returned string is statically allocated and must not be freed.