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;
......
...@@ -25,6 +25,25 @@ extern int VERBOSE; ...@@ -25,6 +25,25 @@ extern int VERBOSE;
namespace libcif namespace libcif
{ {
// --------------------------------------------------------------------
bool IsMTZFile(const fs::path& p)
{
bool result = false;
fs::ifstream f(p);
if (f.is_open())
{
char sig[5] = {};
f.read(sig, 4);
result = sig == string("MTZ ");
}
return result;
}
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
Map<FTYPE>::Map() Map<FTYPE>::Map()
...@@ -120,15 +139,6 @@ template class Map<double>; ...@@ -120,15 +139,6 @@ template class Map<double>;
// -------------------------------------------------------------------- // --------------------------------------------------------------------
// MapMaker mm(mFb, mFd);
//
// if (recalculateFc)
// mm.recalculateFromMTZ(dataFile, mStructure, noBulk, aniso);
// else
// mm.loadFromMTZ(dataFile);
template<typename FTYPE> template<typename FTYPE>
MapMaker<FTYPE>::MapMaker() MapMaker<FTYPE>::MapMaker()
{ {
...@@ -140,31 +150,31 @@ MapMaker<FTYPE>::~MapMaker() ...@@ -140,31 +150,31 @@ MapMaker<FTYPE>::~MapMaker()
} }
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate, void MapMaker<FTYPE>::loadMTZ(const fs::path& hklin, float samplingRate,
initializer_list<string> fbLabels, initializer_list<string> fdLabels, initializer_list<string> fbLabels, initializer_list<string> fdLabels,
initializer_list<string> foLabels, initializer_list<string> fcLabels) initializer_list<string> foLabels, initializer_list<string> fcLabels)
{ {
if (VERBOSE) if (VERBOSE)
cerr << "Reading map from " << mtzFile << endl cerr << "Reading map from " << hklin << endl
<< " with labels: FB: " << ba::join(fbLabels, ",") << endl << " with labels: FB: " << ba::join(fbLabels, ",") << endl
<< " with labels: FD: " << ba::join(fdLabels, ",") << endl << " with labels: FD: " << ba::join(fdLabels, ",") << endl
<< " with labels: FO: " << ba::join(foLabels, ",") << endl << " with labels: FO: " << ba::join(foLabels, ",") << endl
<< " with labels: FC: " << ba::join(fcLabels, ",") << endl; << " with labels: FC: " << ba::join(fcLabels, ",") << endl;
fs::path dataFile = mtzFile; fs::path dataFile = hklin;
if (mtzFile.extension() == ".gz" or mtzFile.extension() == ".bz2") if (hklin.extension() == ".gz" or hklin.extension() == ".bz2")
{ {
// file is compressed // file is compressed
fs::path p = mtzFile.parent_path(); fs::path p = hklin.parent_path();
string s = mtzFile.filename().string(); string s = hklin.filename().string();
io::filtering_stream<io::input> in; io::filtering_stream<io::input> in;
fs::ifstream fi(mtzFile); fs::ifstream fi(hklin);
if (mtzFile.extension() == ".gz") if (hklin.extension() == ".gz")
in.push(io::gzip_decompressor()); in.push(io::gzip_decompressor());
else else
in.push(io::bzip2_decompressor()); in.push(io::bzip2_decompressor());
...@@ -181,7 +191,7 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate, ...@@ -181,7 +191,7 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate,
} }
if (not fs::exists(dataFile)) if (not fs::exists(dataFile))
throw runtime_error("Could not open mtz file " + mtzFile.string()); throw runtime_error("Could not open mtz file " + hklin.string());
const string kBasePath("/%1%/%2%/[%3%]"); const string kBasePath("/%1%/%2%/[%3%]");
...@@ -207,7 +217,7 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate, ...@@ -207,7 +217,7 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate,
mtzin.close_read(); mtzin.close_read();
if (dataFile != mtzFile) if (dataFile != hklin)
fs::remove(dataFile); fs::remove(dataFile);
Cell cell = mHKLInfo.cell(); Cell cell = mHKLInfo.cell();
...@@ -259,6 +269,24 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate, ...@@ -259,6 +269,24 @@ void MapMaker<FTYPE>::loadFromMTZ(const fs::path& mtzFile, float samplingRate,
mFd.calculateStats(); mFd.calculateStats();
} }
// --------------------------------------------------------------------
template<typename FTYPE>
void MapMaker<FTYPE>::loadMaps(
const fs::path& fbMapFile, const fs::path& fdMapFile, float reshi, float reslo)
{
mResHigh = reshi;
mResLow = reslo;
mFb.read(fbMapFile);
mFd.read(fdMapFile);
if (not mFb.cell().equals(mFd.cell()))
throw runtime_error("Fb and Fd map do not contain the same cell");
}
// --------------------------------------------------------------------
ostream& operator<<(ostream& os, const clipper::HKL& hkl) ostream& operator<<(ostream& os, const clipper::HKL& hkl)
{ {
os << "h: " << hkl.h() << ", " os << "h: " << hkl.h() << ", "
...@@ -268,197 +296,26 @@ ostream& operator<<(ostream& os, const clipper::HKL& hkl) ...@@ -268,197 +296,26 @@ ostream& operator<<(ostream& os, const clipper::HKL& hkl)
return os; return os;
}; };
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::fixMTZ() void MapMaker<FTYPE>::calculate(const fs::path& hklin,
const Structure& structure, bool noBulk, AnisoScalingFlag anisoScaling,
float samplingRate, bool electronScattering,
initializer_list<std::string> foLabels, initializer_list<std::string> freeLabels)
{ {
Spacegroup spacegroup = mHKLInfo.spacegroup(); if (IsMTZFile(hklin))
loadFoFreeFromMTZFile(hklin, foLabels, freeLabels);
enum { else
A1, // A1: FC = 2mFo - FM loadFoFreeFromReflectionsFile(hklin);
A2, // A2: FC >= 2mFo - FM
A3, // A3: FD = FM - mFo
A4, // A4: FD = 2(FM - mFo)
C5, // C5: FC = 2mFo - FM
C6, // C6: FM = mFo
C7, // C7: FD = mFo - FC
C8, // C8: FD = 2(mFo - FC)
C9, // C9: FD <= mFo - FC
T10, // 10: FM = FC (unobserved only)
T11, // 11: FD = 0 (unobserved only)
TestCount
};
vector<bool> tests(TestCount, true);
// first run the tests to see if we need to fix anything
if (VERBOSE)
cerr << "Testing MTZ file" << endl;
for (auto ih = mFbData.first(); not ih.last(); ih.next())
{
clipper::HKL_class cls(spacegroup, ih.hkl());
auto W = mPhiFomData[ih].fom();
auto FM = mFbData[ih].f();
auto PM = mFbData[ih].phi() * 180 / kPI;
auto FD = mFdData[ih].f();
auto PD = mFdData[ih].phi() * 180 / kPI;
auto FO = mFoData[ih].f();
auto FC = mFcData[ih].f();
auto PC = mFcData[ih].phi() * 180 / kPI;
auto WFO = W * FO;
if (abs(fmod(abs(PM - PC) + 180, 360) - 180) > 90)
FM = -FM;
if (abs(fmod(abs(PD - PC) + 180, 360) - 180) > 90)
FD = -FD;
if (mFoData[ih].missing() or W == 0)
{
if (tests[T10] and abs(FM - FC) > 0.05)
{
tests[T10] = false;
if (VERBOSE) cerr << "Test 10 failed at " << ih.hkl() << endl;
}
if (tests[T11] and abs(FD) > 0.05)
{
tests[T11] = false;
if (VERBOSE) cerr << "Test 11 failed at " << ih.hkl() << endl;
}
}
else if (cls.centric())
{
if (tests[C5] and abs(FC + FM - 2 * WFO) > 0.05)
{
tests[C5] = false;
if (VERBOSE) cerr << "Test C5 failed at " << ih.hkl() << endl;
}
if (tests[C6] and abs(FM - WFO) > 0.05)
{
tests[C6] = false;
if (VERBOSE) cerr << "Test C6 failed at " << ih.hkl() << endl;
}
if (tests[C7] and abs(FC + FD - WFO) > 0.05)
{
tests[C7] = false;
if (VERBOSE) cerr << "Test C7 failed at " << ih.hkl() << endl;
}
if (tests[C8] and abs(FC + 0.5 * FD - WFO) > 0.05)
{
tests[C8] = false;
if (VERBOSE) cerr << "Test C8 failed at " << ih.hkl() << endl;
}
if (tests[C9] and (1.01 * FC + Gd - WFO) < -0.05)
{
tests[C9] = false;
if (VERBOSE) cerr << "Test C9 failed at " << ih.hkl() << endl;
}
}
else
{
if (tests[A1] and abs(FC + FM - 2 * WFO) > 0.05)
{
tests[A1] = false;
if (VERBOSE) cerr << "Test A1 failed at " << ih.hkl() << endl;
}
if (tests[A2] and 1.01 * FC + FM - 2 * WFO < -0.05)
{
tests[A2] = false;
if (VERBOSE) cerr << "Test A2 failed at " << ih.hkl() << endl;
}
if (tests[A3] and abs(FM - FD - WFO) > 0.05)
{
tests[A3] = false;
if (VERBOSE) cerr << "Test A3 failed at " << ih.hkl() << endl;
}
if (tests[A4] and abs(FM - 0.5 * FD - WFO) > 0.05)
{
tests[A4] = false;
if (VERBOSE) cerr << "Test A4 failed at " << ih.hkl() << endl;
}
}
}
using clipper::HKL_class;
using clipper::data32::F_phi;
const F_phi fzero(0, 0);
// mtzfix... recalc(structure, noBulk, anisoScaling, samplingRate, electronScattering);
for (auto ih = mFbData.first(); not ih.last(); ih.next())
{
if (mFbData[ih].missing() or mFdData[ih].missing())
continue;
auto PM = mFbData[ih].phi() * 180 / kPI;
auto PD = mFdData[ih].phi() * 180 / kPI;
auto PC = mFcData[ih].phi() * 180 / kPI;
if (abs(fmod(abs(PM - PC) + 180, 360) - 180) > 90)
{
mFbData[ih].f() = -mFbData[ih].f();
mFbData[ih].phi() = mFcData[ih].phi();
}
if (abs(fmod(abs(PD - PC) + 180, 360) - 180) > 90)
{
mFdData[ih].f() = -mFdData[ih].f();
mFdData[ih].phi() = mFcData[ih].phi();
}
auto mFo = mFbData[ih] - mFdData[ih];
HKL_class cls(spacegroup, ih.hkl());
if (not mFoData[ih].missing() and mPhiFomData[ih].fom() > 0)
{
if (cls.centric())
{
if (not tests[C6])
mFbData[ih] = mFo;
if (not tests[C7] and tests[C8])
mFdData[ih].f() = mFdData[ih].f() / 2;
}
else
{
if (tests[A3] and not tests[A4])
mFdData[ih] = mFdData[ih] + mFdData[ih];
}
}
else
{
if (not tests[T10])
{
if ((not cls.centric() and tests[A1]) or
(cls.centric() and (tests[C5] or tests[C7] or tests[C8])))
{
mFbData[ih] = mFcData[ih];
}
}
if (not tests[T11])
mFdData[ih] = fzero;
}
}
} }
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::loadFromReflections(const fs::path& hklin, void MapMaker<FTYPE>::loadFoFreeFromReflectionsFile(const fs::path& hklin)
const Structure& structure, bool noBulk, AnisoScalingFlag anisoScaling,
float samplingRate, bool electronScattering)
{ {
using clipper::HKL; using clipper::HKL;
...@@ -570,25 +427,23 @@ void MapMaker<FTYPE>::loadFromReflections(const fs::path& hklin, ...@@ -570,25 +427,23 @@ void MapMaker<FTYPE>::loadFromReflections(const fs::path& hklin,
break; break;
} }
} }
// recalc();
recalc(structure, noBulk, anisoScaling, samplingRate, electronScattering);
} }
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::recalculateFromMTZ(const fs::path& mtzFile, void MapMaker<FTYPE>::loadFoFreeFromMTZFile(const fs::path& hklin,
const Structure& structure, bool noBulk, AnisoScalingFlag anisoScaling, float samplingRate, initializer_list<std::string> foLabels, initializer_list<std::string> freeLabels)
bool electronScattering, initializer_list<string> foLabels, initializer_list<string> freeLabels)
{ {
if (VERBOSE) if (VERBOSE)
cerr << "Recalculating maps from " << mtzFile << endl; cerr << "Recalculating maps from " << hklin << endl;
const string kBasePath("/%1%/%2%/[%3%]"); const string kBasePath("/%1%/%2%/[%3%]");
using clipper::CCP4MTZfile; using clipper::CCP4MTZfile;
CCP4MTZfile mtzin; CCP4MTZfile mtzin;
mtzin.open_read(mtzFile.string()); mtzin.open_read(hklin.string());
mtzin.import_hkl_info(mHKLInfo); mtzin.import_hkl_info(mHKLInfo);
mtzin.import_hkl_data(mFoData, mtzin.import_hkl_data(mFoData,
...@@ -597,10 +452,10 @@ void MapMaker<FTYPE>::recalculateFromMTZ(const fs::path& mtzFile, ...@@ -597,10 +452,10 @@ void MapMaker<FTYPE>::recalculateFromMTZ(const fs::path& mtzFile,
(boost::format(kBasePath) % "*" % "*" % ba::join(freeLabels, ",")).str()); (boost::format(kBasePath) % "*" % "*" % ba::join(freeLabels, ",")).str());
mtzin.close_read(); mtzin.close_read();
recalc(structure, noBulk, anisoScaling, samplingRate, electronScattering);
} }
// --------------------------------------------------------------------
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::recalc(const Structure& structure, void MapMaker<FTYPE>::recalc(const Structure& structure,
bool noBulk, AnisoScalingFlag anisoScaling, bool noBulk, AnisoScalingFlag anisoScaling,
...@@ -725,17 +580,190 @@ void MapMaker<FTYPE>::recalc(const Structure& structure, ...@@ -725,17 +580,190 @@ void MapMaker<FTYPE>::recalc(const Structure& structure,
} }
template<typename FTYPE> template<typename FTYPE>
void MapMaker<FTYPE>::loadFromMapFiles(const fs::path& fbMapFile, const fs::path& fdMapFile, void MapMaker<FTYPE>::fixMTZ()
float reshi, float reslo)
{ {
mResHigh = reshi; Spacegroup spacegroup = mHKLInfo.spacegroup();
mResLow = reslo;
enum {
A1, // A1: FC = 2mFo - FM
A2, // A2: FC >= 2mFo - FM
A3, // A3: FD = FM - mFo
A4, // A4: FD = 2(FM - mFo)
C5, // C5: FC = 2mFo - FM
C6, // C6: FM = mFo
C7, // C7: FD = mFo - FC
C8, // C8: FD = 2(mFo - FC)
C9, // C9: FD <= mFo - FC
T10, // 10: FM = FC (unobserved only)
T11, // 11: FD = 0 (unobserved only)
TestCount
};
vector<bool> tests(TestCount, true);
mFb.read(fbMapFile); // first run the tests to see if we need to fix anything
mFd.read(fdMapFile);
if (not mFb.cell().equals(mFd.cell())) if (VERBOSE)
throw runtime_error("Fb and Fd map do not contain the same cell"); cerr << "Testing MTZ file" << endl;
for (auto ih = mFbData.first(); not ih.last(); ih.next())
{
clipper::HKL_class cls(spacegroup, ih.hkl());
auto W = mPhiFomData[ih].fom();
auto FM = mFbData[ih].f();
auto PM = mFbData[ih].phi() * 180 / kPI;
auto FD = mFdData[ih].f();
auto PD = mFdData[ih].phi() * 180 / kPI;
auto FO = mFoData[ih].f();
auto FC = mFcData[ih].f();
auto PC = mFcData[ih].phi() * 180 / kPI;
auto WFO = W * FO;
if (abs(fmod(abs(PM - PC) + 180, 360) - 180) > 90)
FM = -FM;
if (abs(fmod(abs(PD - PC) + 180, 360) - 180) > 90)
FD = -FD;
if (mFoData[ih].missing() or W == 0)
{
if (tests[T10] and abs(FM - FC) > 0.05)
{
tests[T10] = false;
if (VERBOSE) cerr << "Test 10 failed at " << ih.hkl() << endl;
}
if (tests[T11] and abs(FD) > 0.05)
{
tests[T11] = false;
if (VERBOSE) cerr << "Test 11 failed at " << ih.hkl() << endl;
}
}
else if (cls.centric())
{
if (tests[C5] and abs(FC + FM - 2 * WFO) > 0.05)
{
tests[C5] = false;
if (VERBOSE) cerr << "Test C5 failed at " << ih.hkl() << endl;
}
if (tests[C6] and abs(FM - WFO) > 0.05)
{
tests[C6] = false;
if (VERBOSE) cerr << "Test C6 failed at " << ih.hkl() << endl;
}
if (tests[C7] and abs(FC + FD - WFO) > 0.05)
{
tests[C7] = false;
if (VERBOSE) cerr << "Test C7 failed at " << ih.hkl() << endl;
}
if (tests[C8] and abs(FC + 0.5 * FD - WFO) > 0.05)
{
tests[C8] = false;
if (VERBOSE) cerr << "Test C8 failed at " << ih.hkl() << endl;
}
if (tests[C9] and (1.01 * FC + Gd - WFO) < -0.05)
{
tests[C9] = false;
if (VERBOSE) cerr << "Test C9 failed at " << ih.hkl() << endl;
}
}
else
{
if (tests[A1] and abs(FC + FM - 2 * WFO) > 0.05)
{
tests[A1] = false;
if (VERBOSE) cerr << "Test A1 failed at " << ih.hkl() << endl;
}
if (tests[A2] and 1.01 * FC + FM - 2 * WFO < -0.05)
{
tests[A2] = false;
if (VERBOSE) cerr << "Test A2 failed at " << ih.hkl() << endl;
}
if (tests[A3] and abs(FM - FD - WFO) > 0.05)
{
tests[A3] = false;
if (VERBOSE) cerr << "Test A3 failed at " << ih.hkl() << endl;
}
if (tests[A4] and abs(FM - 0.5 * FD - WFO) > 0.05)
{
tests[A4] = false;
if (VERBOSE) cerr << "Test A4 failed at " << ih.hkl() << endl;
}
}
}
using clipper::HKL_class;
using clipper::data32::F_phi;
const F_phi fzero(0, 0);
// mtzfix...
for (auto ih = mFbData.first(); not ih.last(); ih.next())
{
if (mFbData[ih].missing() or mFdData[ih].missing())
continue;
auto PM = mFbData[ih].phi() * 180 / kPI;
auto PD = mFdData[ih].phi() * 180 / kPI;
auto PC = mFcData[ih].phi() * 180 / kPI;
if (abs(fmod(abs(PM - PC) + 180, 360) - 180) > 90)
{
mFbData[ih].f() = -mFbData[ih].f();
mFbData[ih].phi() = mFcData[ih].phi();
}
if (abs(fmod(abs(PD - PC) + 180, 360) - 180) > 90)
{
mFdData[ih].f() = -mFdData[ih].f();
mFdData[ih].phi() = mFcData[ih].phi();
}
auto mFo = mFbData[ih] - mFdData[ih];
HKL_class cls(spacegroup, ih.hkl());
if (not mFoData[ih].missing() and mPhiFomData[ih].fom() > 0)
{
if (cls.centric())
{
if (not tests[C6])
mFbData[ih] = mFo;
if (not tests[C7] and tests[C8])
mFdData[ih].f() = mFdData[ih].f() / 2;
}
else
{
if (tests[A3] and not tests[A4])
mFdData[ih] = mFdData[ih] + mFdData[ih];
}
}
else
{
if (not tests[T10])
{
if ((not cls.centric() and tests[A1]) or
(cls.centric() and (tests[C5] or tests[C7] or tests[C8])))
{
mFbData[ih] = mFcData[ih];
}
}
if (not tests[T11])
mFdData[ih] = fzero;
}
}
} }
template<typename FTYPE> template<typename FTYPE>
......
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