/* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ < BioEM software for Bayesian inference of Electron Microscopy images> Copyright (C) 2016 Pilar Cossio, David Rohr, Fabio Baruffa, Markus Rampp, Volker Lindenstruth and Gerhard Hummer. Max Planck Institute of Biophysics, Frankfurt, Germany. Frankfurt Institute for Advanced Studies, Goethe University Frankfurt, Germany. Max Planck Computing and Data Facility, Garching, Germany. Released under the GNU Public License, v3. See license statement for terms of distribution. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ #ifndef BIOEM_H #define BIOEM_H #include "defs.h" #include "bioem.h" #include "model.h" #include "map.h" #include "param.h" class bioem { friend class bioem_RefMap; friend class bioem_Probability; public: bioem(); virtual ~bioem(); int configure(int ac, char* av[]); void cleanup(); //Cleanup everything happening during configure int precalculate(); // Is it better to pass directly the input File names? int dopreCalCrossCorrelation(int iRefMap, int iRefMapLocal); int run(); int doProjections(int iMap); int createConvolutedProjectionMap(int iOreint, int iMap, mycomplex_t* lproj, myfloat_t* Mapconv, mycomplex_t* localmultFFT, myfloat_t& sumC, myfloat_t& sumsquareC); virtual int compareRefMaps(int iOrient, int iConv, myfloat_t amp, myfloat_t pha, myfloat_t env, const myfloat_t* conv_map, mycomplex_t* localmultFFT, myfloat_t sumC, myfloat_t sumsquareC, const int startMap = 0); virtual void* malloc_device_host(size_t size); virtual void free_device_host(void* ptr); int createProjection(int iMap, mycomplex_t* map); int calcross_cor(myfloat_t* localmap, myfloat_t& sum, myfloat_t& sumsquare); void calculateCCFFT(int iMap, int iOrient, int iConv, myfloat_t amp, myfloat_t pha, myfloat_t env, myfloat_t sumC, myfloat_t sumsquareC, mycomplex_t* localConvFFT, mycomplex_t* localCCT, myfloat_t* lCC); bioem_Probability pProb; string OutfileName; bool yesoutfilename; protected: virtual int deviceInit(); virtual int deviceStartRun(); virtual int deviceFinishRun(); bioem_param param; bioem_model Model; bioem_RefMap RefMap; int nReferenceMaps; //Maps in memory at a time int nReferenceMapsTotal; //Maps in total int nProjectionMaps; //Maps in memory at a time int nProjectionMapsTotal; //Maps in total int FFTAlgo; //Use the FFT Algorithm (Default 1) int DebugOutput; //Debug Output Level (Default 2) int nProjectionsAtOnce; //Number of projections to do at once via OpenMP (Default 1) }; #endif