Main Page   Data Structures   File List   Data Fields   Globals  

mmtzlib.h

Go to the documentation of this file.
00001 
00058 #ifndef CCP4_MMTZLIB_INC
00059 #define CCP4_MMTZLIB_INC
00060 
00061 #include "umtzlib.h"
00062 
00063 /* define types for mtz records */
00064 
00065 typedef umtzfile* mmtzfile;
00066 
00067 /* info about mtz column */
00068 typedef struct mmtz_column_ {
00069   char label[31];
00070   char type[2];
00071 } mmtz_column;
00072 
00073 /* info about mtz dataset */
00074 typedef struct mmtz_dataset_ {
00075   char dname[65];
00076   float wavel;
00077 } mmtz_dataset;
00078 
00079 /* info about mtz crystal */
00080 typedef struct mmtz_crystal_ {
00081   char xname[65];
00082   float cell[6];
00083   char pname[65];
00084 } mmtz_crystal;
00085 
00086 /* open a file for read/write (and read headers if necessary) */
00087 mmtzfile mmtz_open( const char* filename, const char* mode );
00088 
00089 /* close a file for read/write (and write header if necessary) */
00090 void mmtz_close( mmtzfile file );
00091 
00092 /* copy headers from one file to another (for append) */
00093 void mmtz_copy_headers( mmtzfile dest, const mmtzfile src );
00094 
00095 /* get number of reflections */
00096 int mmtz_num_rows( const mmtzfile file );
00097 
00098 /* get number of columns */
00099 int mmtz_num_cols( const mmtzfile file );
00100 
00101 /* get number of columns */
00102 int mmtz_num_datasets( const mmtzfile file );
00103 
00104 /* get number of symops */
00105 int mmtz_get_num_symops( const mmtzfile file );
00106 
00107 /* get n'th symops */
00108 char* mmtz_get_symop( const mmtzfile file, const int isym, char* symop );
00109 
00110 /* get base cell */
00111 float* mmtz_get_cell( const mmtzfile file, float* cell );
00112 
00113 /* get dataset and crystal info */
00114 void mmtz_get_setxtl( const mmtzfile file, const int icol, mmtz_dataset* set, mmtz_crystal* xtl );
00115 
00116 /* get column: Get the n'th column from the file, with dataset and crystal. */
00117 int mmtz_get_column( const mmtzfile file, const int icol, mmtz_column* col, mmtz_dataset* set, mmtz_crystal* xtl );
00118 
00119 /* add column: supply column, dataset, crystal. */
00120 int mmtz_add_column( mmtzfile file, const mmtz_column* col, const mmtz_dataset* set, const mmtz_crystal* xtl );
00121 
00122 /* write the initial headers to a new mtz */
00123 void mmtz_init_headers( mmtzfile file, const char* title, const float cell[6] );
00124 
00125 /* write sort order header to a new mtz */
00126 void mmtz_add_sort_header( mmtzfile file, const char* sortorder );
00127 
00128 /* write spacegroup header to a new mtz file */
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 /* write a symop header to a new mtz file */
00132 void mmtz_add_symop_header( mmtzfile file, const char* symop );
00133 
00134 /* get the next row of data from the file */
00135 void mmtz_get_row( const mmtzfile file, float* fdata, int* flags );
00136 
00137 /* write a new row of data to the file */
00138 void mmtz_add_row( mmtzfile file, float* fdata, const int* flags );
00139 
00140 /* skip to the n'th row in the file */
00141 void mmtz_seek_row( const mmtzfile file, const int n );
00142 
00143 #endif

Generated at Mon Jan 7 17:06:26 2002 by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001