00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef MTZ_MERGE_IO_HEADER
00010 #define MTZ_MERGE_IO_HEADER
00011
00012 #include <vector>
00013
00014 #include "hkl_controls.hh"
00015
00016
00017 #include "clipper/clipper.h"
00018 #include "clipper/clipper-ccp4.h"
00019 using clipper::Message;
00020 using clipper::Message_fatal;
00021
00022
00023 #include "hkl_datatypes.hh"
00024 #include "controls.hh"
00025 #include "mtz_merge_io.hh"
00026 #include "range.hh"
00027 #include "columnlabels.hh"
00028 #include "hkl_symmetry.hh"
00029
00030 namespace MtzIO {
00031
00032 class MtzMrgFile {
00033 public:
00035 MtzMrgFile();
00037 ~MtzMrgFile();
00038
00039
00040 bool open_read(const std::string& filename);
00041
00042
00043
00044 ClipperLabelPair ReadData(clipper::CCP4MTZfile& mtzin,
00045 const double& ResoLimit,
00046 const MtzIO::column_labels& column_list,
00047 clipper::HKL_info& hkl_info_list,
00048 clipper::HKL_data<clipper::data32::I_sigI>& IsigData,
00049 clipper::MTZdataset& mtzdataset,
00050 const bool& verbose,
00051 std::string& output);
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068 FileRead MakeHklList(const std::string& mtzname,
00069 file_select& file_sel,
00070 col_controls& column_selection,
00071 MtzIO::column_labels& column_list,
00072 const scala::PxdName& InputPxdName,
00073 const scala::Scell& cell,
00074 std::string& output,
00075 const int& verbose,
00076 hkl_unmerge_list& hkl_list);
00077
00078
00079
00080 std::string Filename() const {return filenamein;}
00081
00082 bool Merged() const {return merged;}
00083
00084 clipper::Resolution MtzResolution() const {return mtzfile_resolution;}
00085
00086 Scell Cell() const {return mcell;}
00087 std::string Spacegroupsymbol() const {return spacegroupsymbol;}
00088
00089 private:
00090 std::string filenamein;
00091 bool fileopen;
00092 bool merged;
00093
00094 clipper::Resolution mtzfile_resolution;
00095 clipper::MTZdataset mtzdataset;
00096
00097 double ResMax;
00098 Scell mcell;
00099 std::string spacegroupsymbol;
00100 scala::SpaceGroup spacegroup;
00101
00102 bool at_start;
00103
00104
00105
00106 bool next(clipper::HKL_info::HKL_reference_index& hkl_index);
00107 };
00108
00109
00110 }
00111 #endif