Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

csymlib.h

Go to the documentation of this file.
00001 /*
00002      csymlib.h: header file for csymlib.c
00003      Copyright (C) 2001  CCLRC, Martyn Winn
00004 
00005      This library is free software and is distributed under the terms and
00006      conditions of the CCP4 licence agreement as `Part 0' (Annex 2)
00007      software, which is version 2.1 of the GNU Lesser General Public
00008      Licence (LGPL) with the following additional clause:
00009 
00010         `You may also combine or link a "work that uses the Library" to
00011         produce a work containing portions of the Library, and distribute
00012         that work under terms of your choice, provided that you give
00013         prominent notice with each copy of the work that the specified
00014         version of the Library is used in it, and that you include or
00015         provide public access to the complete corresponding
00016         machine-readable source code for the Library including whatever
00017         changes were used in the work. (i.e. If you make changes to the
00018         Library you must distribute those, but you do not need to
00019         distribute source or object code to those portions of the work
00020         not covered by this licence.)'
00021 
00022      Note that this clause grants an additional right and does not impose
00023      any additional restriction, and so does not affect compatibility
00024      with the GNU General Public Licence (GPL). If you wish to negotiate
00025      other terms, please contact the maintainer.
00026 
00027      You can redistribute it and/or modify the library under the terms of
00028      the GNU Lesser General Public License as published by the Free Software
00029      Foundation; either version 2.1 of the License, or (at your option) any
00030      later version.
00031 
00032      This library is distributed in the hope that it will be useful, but
00033      WITHOUT ANY WARRANTY; without even the implied warranty of
00034      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00035      Lesser General Public License for more details.
00036 
00037      You should have received a copy of the CCP4 licence and/or GNU
00038      Lesser General Public License along with this library; if not, write
00039      to the CCP4 Secretary, Daresbury Laboratory, Warrington WA4 4AD, UK.
00040      The GNU Lesser General Public can also be obtained by writing to the
00041      Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
00042      MA 02111-1307 USA
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 /* note that definitions in ccp4_spg.h are within the CSym namespace */
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