Commit 6d123756 by maarten

refactored MapMaker

git-svn-id: svn+ssh://gitlab/srv/svn-repos/pdb-redo/trunk@246 a1961a4f-ab94-4bcc-80e8-33b5a54de466
parent 924d37b6
...@@ -50,6 +50,11 @@ using clipper::Spacegroup; ...@@ -50,6 +50,11 @@ using clipper::Spacegroup;
using clipper::Cell; using clipper::Cell;
using clipper::Grid_sampling; using clipper::Grid_sampling;
// --------------------------------------------------------------------
bool IsMTZFile(const boost::filesystem::path& p);
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
class MapMaker class MapMaker
...@@ -67,30 +72,27 @@ class MapMaker ...@@ -67,30 +72,27 @@ class MapMaker
MapMaker(const MapMaker&) = delete; MapMaker(const MapMaker&) = delete;
MapMaker& operator=(const MapMaker&) = delete; MapMaker& operator=(const MapMaker&) = delete;
void loadFromMTZ(const boost::filesystem::path& mtzFile, void loadMTZ(const boost::filesystem::path& mtzFile,
float samplingRate = 4.5, float samplingRate = 4.5,
std::initializer_list<std::string> fbLabels = { "FWT", "PHWT" }, std::initializer_list<std::string> fbLabels = { "FWT", "PHWT" },
std::initializer_list<std::string> fdLabels = { "DELFWT", "PHDELWT" }, std::initializer_list<std::string> fdLabels = { "DELFWT", "PHDELWT" },
std::initializer_list<std::string> foLabels = { "FP", "SIGFP" }, std::initializer_list<std::string> foLabels = { "FP", "SIGFP" },
std::initializer_list<std::string> fcLabels = { "FC_ALL", "PHIC_ALL" }); std::initializer_list<std::string> fcLabels = { "FC_ALL", "PHIC_ALL" });
void loadFromReflections(const boost::filesystem::path& hklin, void loadMaps(
const Structure& structure, bool noBulk, AnisoScalingFlag anisoScaling, const boost::filesystem::path& fbMapFile,
float samplingRate = 4.5, bool electronScattering = false); const boost::filesystem::path& fdMapFile,
float reshi, float reslo);
void recalculateFromMTZ(const boost::filesystem::path& mtzFile, // following works on both mtz files and structure factor files in CIF format
void calculate(const boost::filesystem::path& hklin,
const Structure& structure, const Structure& structure,
bool noBulk, AnisoScalingFlag anisoScaling, bool noBulk, AnisoScalingFlag anisoScaling,
float samplingRate = 4.5, bool electronScattering = false, float samplingRate = 4.5, bool electronScattering = false,
std::initializer_list<std::string> foLabels = { "FP", "SIGFP" }, std::initializer_list<std::string> foLabels = { "FP", "SIGFP" },
std::initializer_list<std::string> freeLabels = { "FREE" }); std::initializer_list<std::string> freeLabels = { "FREE" });
void loadFromMapFiles(
const boost::filesystem::path& fbMapFile,
const boost::filesystem::path& fdMapFile,
float reshi, float reslo);
void writeMTZ(const boost::filesystem::path& file, void writeMTZ(const boost::filesystem::path& file,
const std::string& project, const std::string& crystal); const std::string& project, const std::string& crystal);
...@@ -109,13 +111,18 @@ class MapMaker ...@@ -109,13 +111,18 @@ class MapMaker
private: private:
void fixMTZ(); void loadFoFreeFromReflectionsFile(const boost::filesystem::path& hklin);
void printStats(); void loadFoFreeFromMTZFile(const boost::filesystem::path& hklin,
std::initializer_list<std::string> foLabels,
std::initializer_list<std::string> freeLabels);
void recalc(const Structure& structure, void recalc(const Structure& structure,
bool noBulk, AnisoScalingFlag anisoScaling, bool noBulk, AnisoScalingFlag anisoScaling,
float samplingRate = 4.5, bool electronScattering = false); float samplingRate = 4.5, bool electronScattering = false);
void fixMTZ();
void printStats();
MapType mFb, mFd; MapType mFb, mFd;
Grid_sampling mGrid; Grid_sampling mGrid;
float mSamplingRate; float mSamplingRate;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment