00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00130 #ifndef __CSymLib__
00131 #define __CSymLib__
00132
00133 static char rcsidhs[] = "$Id: csymlib_8h-source.html,v 1.8 2004/07/05 14:36:56 mdw Exp $";
00134
00135
00136 #include "ccp4_spg.h"
00137
00138 #ifdef __cplusplus
00139 namespace CSym {
00140 extern "C" {
00141 #endif
00142
00147 CCP4SPG *ccp4spg_load_by_standard_num(const int numspg);
00148
00153 CCP4SPG *ccp4spg_load_by_ccp4_num(const int ccp4numspg);
00154
00159 CCP4SPG *ccp4spg_load_by_spgname(const char *spgname);
00160
00168 CCP4SPG *ccp4spg_load_by_ccp4_spgname(const char *ccp4spgname);
00169
00175 CCP4SPG * ccp4_spgrp_reverse_lookup(const int nsym1, const ccp4_symop *op1);
00176
00188 CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
00189 const char *spgname, const char *ccp4spgname,
00190 const int nsym1, const ccp4_symop *op1);
00191
00196 void ccp4spg_mem_tidy(void);
00197
00205 int symfr_driver (const char *line, float rot[][4][4]);
00206
00210 void ccp4spg_free(CCP4SPG **sp);
00211
00217 void ccp4spg_register_by_ccp4_num(int numspg);
00218
00225 void ccp4spg_register_by_symops(int nops, float rsm[][4][4]);
00226
00233 int ccp4_spg_get_centering(const char *symbol_Hall, float cent_ops[4][3]);
00234
00240 int ccp4spg_load_laue(CCP4SPG* spacegroup, const int nlaue);
00241
00245 int ASU_1b (const int h, const int k, const int l);
00246
00250 int ASU_2_m (const int h, const int k, const int l);
00251
00255 int ASU_mmm (const int h, const int k, const int l);
00256
00260 int ASU_4_m (const int h, const int k, const int l);
00261
00265 int ASU_4_mmm(const int h, const int k, const int l);
00266
00270 int ASU_3b (const int h, const int k, const int l);
00271
00275 int ASU_3bm (const int h, const int k, const int l);
00276
00280 int ASU_3bmx (const int h, const int k, const int l);
00281
00285 int ASU_6_m (const int h, const int k, const int l);
00286
00290 int ASU_6_mmm(const int h, const int k, const int l);
00291
00295 int ASU_m3b (const int h, const int k, const int l);
00296
00300 int ASU_m3bm (const int h, const int k, const int l);
00301
00306 char *ccp4spg_symbol_Hall(CCP4SPG* sp);
00307
00313 ccp4_symop ccp4_symop_invert( const ccp4_symop op1 );
00314
00322 int ccp4spg_name_equal(const char *spgname1, const char *spgname2);
00323
00335 int ccp4spg_name_equal_to_lib(const char *spgname_lib, const char *spgname_match);
00336
00344 char *ccp4spg_to_shortname(char *shortname, const char *longname);
00345
00352 void ccp4spg_name_de_colon(char *name);
00353
00361 int ccp4spg_pgname_equal(const char *pgname1, const char *pgname2);
00362
00368 ccp4_symop *ccp4spg_norm_trans(ccp4_symop *op);
00369
00382 int ccp4_spgrp_equal( int nsym1, const ccp4_symop *op1, int nsym2, const ccp4_symop *op2);
00383
00389 int ccp4_symop_code(ccp4_symop op);
00390
00397 int ccp4_int_compare( const void *p1, const void *p2 );
00398
00406 int ccp4spg_is_in_pm_asu(const CCP4SPG* sp, const int h, const int k, const int l);
00407
00415 int ccp4spg_is_in_asu(const CCP4SPG* sp, const int h, const int k, const int l);
00416
00431 int ccp4spg_put_in_asu(const CCP4SPG* sp, const int hin, const int kin, const int lin,
00432 int *hout, int *kout, int *lout );
00433
00446 void ccp4spg_generate_indices(const CCP4SPG* sp, const int isym,
00447 const int hin, const int kin, const int lin,
00448 int *hout, int *kout, int *lout );
00449
00460 float ccp4spg_phase_shift(const int hin, const int kin, const int lin,
00461 const float phasin, const float trans[3], const int isign);
00462
00468 int ccp4spg_do_chb(const float chb[3][3]);
00469
00475 void ccp4spg_set_centric_zones(CCP4SPG* sp);
00476
00486 int ccp4spg_is_centric(const CCP4SPG* sp, const int h, const int k, const int l);
00487
00495 int ccp4spg_check_centric_zone(const int nzone, const int h, const int k, const int l);
00496
00505 float ccp4spg_centric_phase(const CCP4SPG* sp, const int h, const int k, const int l);
00506
00511 void ccp4spg_print_centric_zones(const CCP4SPG* sp);
00512
00518 char *ccp4spg_describe_centric_zone(const int nzone, char *centric_zone);
00519
00525 void ccp4spg_set_epsilon_zones(CCP4SPG* sp);
00526
00535 int ccp4spg_get_multiplicity(const CCP4SPG* sp, const int h, const int k, const int l);
00536
00544 int ccp4spg_check_epsilon_zone(const int nzone, const int h, const int k, const int l);
00545
00550 void ccp4spg_print_epsilon_zones(const CCP4SPG* sp);
00551
00557 char *ccp4spg_describe_epsilon_zone(const int nzone, char *epsilon_zone);
00558
00559
00567 int ccp4spg_is_sysabs(const CCP4SPG* sp, const int h, const int k, const int l);
00568
00580 int ccp4spg_generate_origins(const char *namspg, const int nsym, const float rsym[][4][4],
00581 float origins[][3], int *polarx, int *polary, int *polarz,
00582 const int iprint);
00583
00588 void ccp4spg_print_recip_spgrp(const CCP4SPG* sp);
00589
00594 void ccp4spg_print_recip_ops(const CCP4SPG* sp);
00595
00602 int range_to_limits(const char *range, float limits[2]);
00603
00615 void set_fft_grid(CCP4SPG* sp, const int nxmin, const int nymin, const int nzmin,
00616 const float sample, int *nx, int *ny, int *nz);
00617
00623 int all_factors_le_19(const int n);
00624
00632 int get_grid_sample(const int minsmp, const int nmul, const float sample);
00633
00641 int ccp4spg_check_symm_cell(int nsym, float rsym[][4][4], float cell[6]);
00642
00643 #ifdef __cplusplus
00644 } }
00645 #endif
00646 #endif