diff options
author | Thomas White <taw@physics.org> | 2011-11-15 12:17:59 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:40 +0100 |
commit | 469efb904b59f137ac9e85e5ff23edd0c113de5c (patch) | |
tree | 71fab5f5715ec9f88984450cdabb592cd49dd46d /libcrystfel/src/symmetry.h | |
parent | 38089071300b8e04ed42236dd08d9055094fb3b8 (diff) |
Move a load more stuff into libcrystfel
Diffstat (limited to 'libcrystfel/src/symmetry.h')
-rw-r--r-- | libcrystfel/src/symmetry.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/libcrystfel/src/symmetry.h b/libcrystfel/src/symmetry.h new file mode 100644 index 00000000..071ebbde --- /dev/null +++ b/libcrystfel/src/symmetry.h @@ -0,0 +1,63 @@ +/* + * symmetry.h + * + * Symmetry + * + * (c) 2006-2010 Thomas White <taw@physics.org> + * + * Part of CrystFEL - crystallography with a FEL + * + */ + + +#ifndef SYMMETRY_H +#define SYMMETRY_H + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +/** + * SymOpList + * + * The SymOpList is an opaque data structure containing a list of point symmetry + * operations. It could represent an point group or a list of indexing + * ambiguities (twin laws), or similar. + **/ +typedef struct _symoplist SymOpList; + +/** + * SymOpMask + * + * The SymOpMask is an opaque data structure containing a list of flags + * associated with point symmetry operations in a specific %SymOpList. It is + * used to filter the operations in the %SymOpList to avoid duplicating + * equivalent reflections when the reflection is somehow special (e.g. 'hk0'). + **/ +typedef struct _symopmask SymOpMask; + +extern void free_symoplist(SymOpList *ops); +extern SymOpList *get_pointgroup(const char *sym); + +extern SymOpMask *new_symopmask(const SymOpList *list); +extern void free_symopmask(SymOpMask *m); + +extern void special_position(const SymOpList *ops, SymOpMask *m, + signed int h, signed int k, signed int l); +extern void get_asymm(const SymOpList *ops, + signed int h, signed int k, signed int l, + signed int *hp, signed int *kp, signed int *lp); +extern int num_equivs(const SymOpList *ops, const SymOpMask *m); +extern void get_equiv(const SymOpList *ops, const SymOpMask *m, int idx, + signed int h, signed int k, signed int l, + signed int *he, signed int *ke, signed int *le); + +extern SymOpList *get_ambiguities(const SymOpList *source, + const SymOpList *target); +extern int is_subgroup(const SymOpList *source, const SymOpList *target); + +extern int is_centrosymmetric(const SymOpList *s); +extern const char *symmetry_name(const SymOpList *ops); +extern void describe_symmetry(const SymOpList *s); + +#endif /* SYMMETRY_H */ |