00001
00058 #ifndef CCP4_MMTZLIB_INC
00059 #define CCP4_MMTZLIB_INC
00060
00061 #include "umtzlib.h"
00062
00063
00064
00065 typedef umtzfile* mmtzfile;
00066
00067
00068 typedef struct mmtz_column_ {
00069 char label[31];
00070 char type[2];
00071 } mmtz_column;
00072
00073
00074 typedef struct mmtz_dataset_ {
00075 char dname[65];
00076 float wavel;
00077 } mmtz_dataset;
00078
00079
00080 typedef struct mmtz_crystal_ {
00081 char xname[65];
00082 float cell[6];
00083 char pname[65];
00084 } mmtz_crystal;
00085
00086
00087 mmtzfile mmtz_open( const char* filename, const char* mode );
00088
00089
00090 void mmtz_close( mmtzfile file );
00091
00092
00093 void mmtz_copy_headers( mmtzfile dest, const mmtzfile src );
00094
00095
00096 int mmtz_num_rows( const mmtzfile file );
00097
00098
00099 int mmtz_num_cols( const mmtzfile file );
00100
00101
00102 int mmtz_num_datasets( const mmtzfile file );
00103
00104
00105 int mmtz_get_num_symops( const mmtzfile file );
00106
00107
00108 char* mmtz_get_symop( const mmtzfile file, const int isym, char* symop );
00109
00110
00111 float* mmtz_get_cell( const mmtzfile file, float* cell );
00112
00113
00114 void mmtz_get_setxtl( const mmtzfile file, const int icol, mmtz_dataset* set, mmtz_crystal* xtl );
00115
00116
00117 int mmtz_get_column( const mmtzfile file, const int icol, mmtz_column* col, mmtz_dataset* set, mmtz_crystal* xtl );
00118
00119
00120 int mmtz_add_column( mmtzfile file, const mmtz_column* col, const mmtz_dataset* set, const mmtz_crystal* xtl );
00121
00122
00123 void mmtz_init_headers( mmtzfile file, const char* title, const float cell[6] );
00124
00125
00126 void mmtz_add_sort_header( mmtzfile file, const char* sortorder );
00127
00128
00129 void mmtz_add_syminf_header( mmtzfile file, const int nsym, const int nsymp, const char cellcode, const int ccp4_symbol, const char* hm_symbol, const char* pg_symbol );
00130
00131
00132 void mmtz_add_symop_header( mmtzfile file, const char* symop );
00133
00134
00135 void mmtz_get_row( const mmtzfile file, float* fdata, int* flags );
00136
00137
00138 void mmtz_add_row( mmtzfile file, float* fdata, const int* flags );
00139
00140
00141 void mmtz_seek_row( const mmtzfile file, const int n );
00142
00143 #endif