![]() |
![]() |
![]() |
CrystFEL Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include "cell.h" typedef UnitCell; UnitCell * cell_new (void
); UnitCell * cell_new_from_cell (UnitCell *orig
); UnitCell * cell_new_from_direct_axes (struct rvec as
,struct rvec bs
,struct rvec cs
); UnitCell * cell_new_from_parameters (double a
,double b
,double c
,double alpha
,double beta
,double gamma
); UnitCell * cell_new_from_reciprocal_axes (struct rvec as
,struct rvec bs
,struct rvec cs
); void cell_free (UnitCell *cell
); int cell_get_cartesian (UnitCell *cell
,double *ax
,double *ay
,double *az
,double *bx
,double *by
,double *bz
,double *cx
,double *cy
,double *cz
); int cell_get_parameters (UnitCell *cell
,double *a
,double *b
,double *c
,double *alpha
,double *beta
,double *gamma
); const char * cell_get_pointgroup (UnitCell *cell
); int cell_get_reciprocal (UnitCell *cell
,double *asx
,double *asy
,double *asz
,double *bsx
,double *bsy
,double *bsz
,double *csx
,double *csy
,double *csz
); const char * cell_get_spacegroup (UnitCell *cell
); void cell_set_cartesian (UnitCell *cell
,double ax
,double ay
,double az
,double bx
,double by
,double bz
,double cx
,double cy
,double cz
); void cell_set_cartesian_a (UnitCell *cell
,double ax
,double ay
,double az
); void cell_set_cartesian_b (UnitCell *cell
,double bx
,double by
,double bz
); void cell_set_cartesian_c (UnitCell *cell
,double cx
,double cy
,double cz
); void cell_set_parameters (UnitCell *cell
,double a
,double b
,double c
,double alpha
,double beta
,double gamma
); void cell_set_pointgroup (UnitCell *cell
,const char *sym
); void cell_set_reciprocal (UnitCell *cell
,double asx
,double asy
,double asz
,double bsx
,double bsy
,double bsz
,double csx
,double csy
,double csz
); void cell_set_spacegroup (UnitCell *cell
,const char *sym
); UnitCell * cell_rotate (UnitCell *in
,struct quaternion quat
); UnitCell * rotate_cell (UnitCell *in
,double omega
,double phi
,double rot
); void cell_print (UnitCell *cell
); double resolution (UnitCell *cell
,signed int h
,signed int k
,signed int l
); UnitCell * match_cell (UnitCell *cell
,UnitCell *tempcell
,int verbose
,float *ltl
,int reduce
); UnitCell * match_cell_ab (UnitCell *cell
,UnitCell *tempcell
);
typedef struct _unitcell UnitCell;
This data structure is opaque. You must use the available accessor functions to read and write its contents.
UnitCell * cell_new (void
);
Create a new UnitCell
.
Returns : |
the new unit cell, or NULL on failure. |
UnitCell * cell_new_from_direct_axes (struct rvec as
,struct rvec bs
,struct rvec cs
);
UnitCell * cell_new_from_parameters (double a
,double b
,double c
,double alpha
,double beta
,double gamma
);
UnitCell * cell_new_from_reciprocal_axes (struct rvec as
,struct rvec bs
,struct rvec cs
);
void cell_free (UnitCell *cell
);
Frees a UnitCell
, and all internal resources concerning that cell.
|
A UnitCell to free.
|
int cell_get_cartesian (UnitCell *cell
,double *ax
,double *ay
,double *az
,double *bx
,double *by
,double *bz
,double *cx
,double *cy
,double *cz
);
int cell_get_parameters (UnitCell *cell
,double *a
,double *b
,double *c
,double *alpha
,double *beta
,double *gamma
);
int cell_get_reciprocal (UnitCell *cell
,double *asx
,double *asy
,double *asz
,double *bsx
,double *bsy
,double *bsz
,double *csx
,double *csy
,double *csz
);
void cell_set_cartesian (UnitCell *cell
,double ax
,double ay
,double az
,double bx
,double by
,double bz
,double cx
,double cy
,double cz
);
void cell_set_cartesian_a (UnitCell *cell
,double ax
,double ay
,double az
);
void cell_set_cartesian_b (UnitCell *cell
,double bx
,double by
,double bz
);
void cell_set_cartesian_c (UnitCell *cell
,double cx
,double cy
,double cz
);
void cell_set_parameters (UnitCell *cell
,double a
,double b
,double c
,double alpha
,double beta
,double gamma
);
void cell_set_reciprocal (UnitCell *cell
,double asx
,double asy
,double asz
,double bsx
,double bsy
,double bsz
,double csx
,double csy
,double csz
);
UnitCell * cell_rotate (UnitCell *in
,struct quaternion quat
);
Rotate a UnitCell
using a quaternion
.
|
A UnitCell to rotate
|
|
A quaternion
|
Returns : |
a newly allocated rotated copy of in .
|
UnitCell * match_cell (UnitCell *cell
,UnitCell *tempcell
,int verbose
,float *ltl
,int reduce
);