00001
00002
00003
00004 #ifndef HKL_MERGED_LIST_HEADER
00005 #define HKL_MERGED_LIST_HEADER
00006
00007 #include <cstring>
00008 #include <string>
00009 #include <vector>
00010
00011
00012 #include <clipper/clipper.h>
00013 #include "clipper/clipper-ccp4.h"
00014 using clipper::Message;
00015 using clipper::Message_fatal;
00016 using clipper::data32::F_phi;
00017
00018 #include "hkl_datatypes.hh"
00019 #include "hkl_symmetry.hh"
00020 #include "range.hh"
00021 #include "mtz_merge_io.hh"
00022
00023
00024 #include "Output.hh"
00025 using phaser_io::LOGFILE;
00026
00027 namespace MLIST
00028 {
00029 enum mlist_status{EMPTY, HEADER, DATA, UNMERGED};
00030 }
00031
00032 namespace scala{
00033
00034 std::vector<clipper::String>
00035 ProcessLabels(const std::vector<clipper::String>& ColLab,
00036 const std::string& ColumnLabel,
00037 bool& IorF);
00038
00039 class hkl_merged_list
00040
00041
00042
00043
00044
00045 {
00046 public:
00047 hkl_merged_list() : status(MLIST::EMPTY) {}
00048
00049 hkl_merged_list(const std::string& mtzname,
00050 const bool& verbose,
00051 phaser_io::Output& output);
00052
00053 hkl_merged_list(const hkl_merged_list& List);
00054
00055 hkl_merged_list& operator= (const hkl_merged_list& List);
00056
00057
00058 void init(const std::string& mtzname,
00059 const bool& verbose,
00060 phaser_io::Output& output);
00061
00062 void read(const MtzIO::column_labels& column_list,
00063 const double& ResoLimit,
00064 const bool& verbose,
00065 phaser_io::Output& output);
00066
00067
00068
00069
00070
00071
00072
00073 void CreateFromAtoms(const std::string& xyzin,
00074 const std::string& spacegroup,
00075 const Scell& input_cell,
00076 const double& FCresolution,
00077 const bool& verbose,
00078 phaser_io::Output& output);
00079
00080 bool Unmerged() const {return (status == MLIST::UNMERGED);}
00081
00082
00083 ResoRange ResRange() const {return ResoRange(10000., ResMax);}
00084 double HighRes() const {return ResMax;;}
00085 hkl_symmetry symmetry() const;
00086 std::string SpaceGroupSymbol() const;
00087
00088 int num_obs() const;
00089
00090 Scell Cell() const {return fcell;}
00091
00092
00093
00094
00095
00096
00097 IsigI Isig(const Hkl& h) const;
00098
00099
00100 void start() const;
00101
00102 bool next(IsigI& Is) const;
00103
00104 Hkl hkl() const;
00105
00106 double invresolsq() const;
00107
00108 void PrintHeaderStuff(phaser_io::Output& output) const;
00109
00110 private:
00111 MLIST::mlist_status status;
00112 clipper::HKL_info hkl_info_list;
00113 clipper::HKL_data<clipper::data32::I_sigI> IsigData;
00114 mutable clipper::HKL_info::HKL_reference_index hkl_index;
00115 mutable bool at_start;
00116
00117 MtzIO::MtzMrgFile mtzfilein;
00118 Scell fcell;
00119 hkl_symmetry fsymmetry;
00120
00121 std::string filename;
00122 double ResMax;
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135 void SFcalc(const std::string& xyzin,
00136 const std::string& spacegroup,
00137 const Scell& input_cell,
00138 const clipper::ftype64& resolution,
00139 clipper::HKL_info& hkls,
00140 clipper::HKL_data<F_phi>& fc);
00141
00142
00143 };
00144 }
00145 #endif