gpp4
1.3.1
|
00001 /* 00002 ccp4_unitcell.h: headers for C library for ccp4_unitcell.c 00003 Copyright (C) 2001 CCLRC, Martyn Winn 00004 00005 This library is free software: you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation, either 00008 version 3 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with This library. If not, see 00017 <http://www.gnu.org/licenses/>. 00018 00019 */ 00020 00026 #ifndef __CCP4_UNITCELL 00027 #define __CCP4_UNITCELL 00028 00029 #ifdef __cplusplus 00030 namespace CCP4uc { 00031 extern "C" { 00032 #endif 00033 00034 #include <math.h> 00035 00044 double ccp4uc_frac_orth_mat(const double cell[6], const int ncode, 00045 double ro[3][3], double rf[3][3]); 00046 00052 double ccp4uc_calc_rcell(const double cell[6], double rcell[6]); 00053 00062 void ccp4uc_orth_to_frac(const double rf[3][3], const double xo[3], double xf[3]); 00063 00070 void ccp4uc_frac_to_orth(const double ro[3][3], const double xf[3], double xo[3]); 00071 00078 void ccp4uc_orthu_to_fracu(const double rf[3][3], const double uo[6], double uf[6]); 00079 00086 void ccp4uc_fracu_to_orthu(const double ro[3][3], const double uf[6], double uo[6]); 00087 00092 double ccp4uc_calc_cell_volume(const double cell[6]); 00093 00100 int ccp4uc_cells_differ(const double cell1[6], const double cell2[6], const double tolerance); 00101 00107 int ccp4uc_is_rhombohedral(const float cell[6], const float tolerance); 00108 00114 int ccp4uc_is_hexagonal(const float cell[6], const float tolerance); 00115 00116 #ifdef __cplusplus 00117 } } 00118 #endif 00119 00120 #endif