Planned maintenance on Wednesday, 2021-01-20, 17:00-18:00. Expect some interruptions during that time

Commit d41e474a authored by David Rohr's avatar David Rohr

fix comment style

parent 65ca8537
This diff is collapsed.
......@@ -14,8 +14,8 @@
template <int GPUAlgo>
__device__ static inline void update_prob(const myfloat_t logpro, const int iRefMap, const int iOrient, const int iConv, const int cent_x, const int cent_y, bioem_Probability* pProb, myfloat_t* buf3 = NULL, int* bufint = NULL)
{
/******* Summing total Probabilities *************/
/******* Need a constant because of numerical divergence*****/
// ******* Summing total Probabilities *************
// ******* Need a constant because of numerical divergence*****
if(pProb[iRefMap].Constoadd < logpro)
{
pProb[iRefMap].Total = pProb[iRefMap].Total * exp(-logpro + pProb[iRefMap].Constoadd);
......@@ -35,7 +35,7 @@ __device__ static inline void update_prob(const myfloat_t logpro, const int iRef
pProb[iRefMap].forAngles[iOrient] += exp(logpro - pProb[iRefMap].ConstAngle[iOrient]);
}
/********** Getting parameters that maximize the probability ***********/
// ********** Getting parameters that maximize the probability ***********
if(pProb[iRefMap].max_prob < logpro)
{
pProb[iRefMap].max_prob = logpro;
......@@ -64,7 +64,7 @@ __device__ static inline myfloat_t calc_logpro(const bioem_param_device& param,
const myfloat_t firstele = param.Ntotpi * (sumsquareref * sumsquare - crossproMapConv * crossproMapConv) +
2 * sumref * sum * crossproMapConv - sumsquareref * sum * sum - sumref * sumref * sumsquare;
//******* Calculating log of Prob*********/
/// ******* Calculating log of Prob*********
// As in fortran code: logpro=(3-Ntotpi)*0.5*log(firstele/pConvMap[iOrient].ForLogProbfromConv[iConv])+(Ntotpi*0.5-2)*log(Ntotpi-2)-0.5*log(pConvMap[iOrient].ForLogProbfromConv[iConv])+0.5*log(PI)+(1-Ntotpi*0.5)*(log(2*PI)+1);
const myfloat_t logpro = (3 - param.Ntotpi) * 0.5 * log(firstele) + (param.Ntotpi * 0.5 - 2) * log((param.Ntotpi - 2) * ForLogProb);
return(logpro);
......@@ -72,9 +72,9 @@ __device__ static inline myfloat_t calc_logpro(const bioem_param_device& param,
__device__ static inline void calProb(int iRefMap, int iOrient, int iConv, myfloat_t sumC, myfloat_t sumsquareC, float value, int disx, int disy, bioem_Probability* pProb, const bioem_param_device& param, const bioem_RefMap& RefMap)
{
/********************************************************/
/*********** Calculates the BioEM probability ***********/
/********************************************************/
// ********************************************************
// *********** Calculates the BioEM probability ***********
// ********************************************************
const myfloat_t logpro = calc_logpro(param, sumC, sumsquareC, value, RefMap.sum_RefMap[iRefMap], RefMap.sumsquare_RefMap[iRefMap]);
......
......@@ -21,9 +21,9 @@
int main(int argc, char* argv[])
{
/**************************************************************************************/
/********************************* Main BioEM code **********************************/
/************************************************************************************/
// **************************************************************************************
// ********************************* Main BioEM code **********************************
// ************************************************************************************
#pragma omp parallel
{
......@@ -43,17 +43,17 @@ int main(int argc, char* argv[])
bio = new bioem;
}
/************ Configuration and Pre-calculating necessary objects *****************/
// ************ Configuration and Pre-calculating necessary objects *****************
printf("Configuring\n");
if (bio->configure(argc, argv)) return(1);
/******************************* Run BioEM routine ******************************/
// ******************************* Run BioEM routine ******************************
printf("Running\n");
timer.Start();
bio->run();
timer.Stop();
/************************************ End **********************************/
// ************************************ End **********************************
printf ("The code ran for %f seconds.\n", timer.GetElapsedTime());
delete bio;
......
......@@ -15,9 +15,9 @@ int bioem_RefMap::readRefMaps(bioem_param& param)
{
numPixels = param.param_device.NumberPixels;
refMapSize = param.param_device.NumberPixels * param.param_device.NumberPixels;
/**************************************************************************************/
/***********************Reading reference Particle Maps************************/
/**************************************************************************************/
// **************************************************************************************
// ***********************Reading reference Particle Maps************************
// **************************************************************************************
int allocsize = 0;
if (param.loadMap)
{
......@@ -143,9 +143,9 @@ int bioem_RefMap::readRefMaps(bioem_param& param)
int bioem_RefMap::PreCalculateMapsFFT(bioem_param& param)
{
/**************************************************************************************/
/********** Routine that pre-calculates Kernels for Convolution **********************/
/************************************************************************************/
// **************************************************************************************
// ********** Routine that pre-calculates Kernels for Convolution **********************
// ************************************************************************************
myfloat_t* localMap;
......
......@@ -11,9 +11,9 @@ using namespace std;
int bioem_model::readModel()
{
/**************************************************************************************/
/***************Reading reference Models either PDB or x,y,z,r,d format****************/
/**************************************************************************************/
// **************************************************************************************
// ***************Reading reference Models either PDB or x,y,z,r,d format****************
// **************************************************************************************
ofstream exampleReadCoor;
exampleReadCoor.open ("COORDREAD");
......@@ -173,7 +173,7 @@ int bioem_model::readModel()
myfloat_t bioem_model::getAminoAcidRad(char *name)
{
/*************** Function that gets the radius for each amino acid ****************/
// *************** Function that gets the radius for each amino acid ****************
myfloat_t iaa = 0;
if(std::strcmp(name, "CYS") == 0)iaa = 2.75;
......@@ -208,7 +208,7 @@ myfloat_t bioem_model::getAminoAcidRad(char *name)
myfloat_t bioem_model::getAminoAcidDensity(char *name)
{
/*************** Function that gets the number of electrons for each amino acid ****************/
// *************** Function that gets the number of electrons for each amino acid ****************
myfloat_t iaa = 0.0;
if(std::strcmp(name, "CYS") == 0)iaa = 64.0;
......
......@@ -25,7 +25,7 @@ bioem_param::bioem_param()
numberGridPointsCTF_amp = 0;
numberGridPointsCTF_phase = 0;
/****center displacement paramters Equal in both directions***/
// ****center displacement paramters Equal in both directions***
param_device.maxDisplaceCenter = 0;
numberGridPointsDisplaceCenter = 0;
......@@ -37,9 +37,9 @@ bioem_param::bioem_param()
int bioem_param::readParameters()
{
/**************************************************************************************/
/***************************** Reading Input Parameters ******************************/
/**************************************************************************************/
// **************************************************************************************
// ***************************** Reading Input Parameters ******************************
// **************************************************************************************
ifstream input(fileinput);
if (!input.good())
......@@ -220,9 +220,9 @@ void bioem_param::releaseFFTPlans()
int bioem_param::CalculateGridsParam() //TO DO FOR QUATERNIONS
{
/**************************************************************************************/
/**************** Routine that pre-calculates Euler angle grids **********************/
/************************************************************************************/
// **************************************************************************************
// **************** Routine that pre-calculates Euler angle grids **********************
// ************************************************************************************
myfloat_t grid_alpha, cos_grid_beta;
int n = 0;
......@@ -248,13 +248,13 @@ int bioem_param::CalculateGridsParam() //TO DO FOR QUATERNIONS
}
nTotGridAngles = n;
/********** Calculating normalized volumen element *********/
// ********** Calculating normalized volumen element *********
param_device.volu = grid_alpha * grid_alpha * cos_grid_beta * (myfloat_t) param_device.GridSpaceCenter * pixelSize * (myfloat_t) param_device.GridSpaceCenter * pixelSize
* gridCTF_phase * gridCTF_amp * gridEnvelop / (2.f * M_PI) / (2.f * M_PI) / 2.f / (2.f * (myfloat_t) param_device.maxDisplaceCenter) / (2.f * (myfloat_t) param_device.maxDisplaceCenter) / ((myfloat_t) numberGridPointsCTF_amp * gridCTF_amp + startGridCTF_amp)
/ ((myfloat_t) numberGridPointsCTF_phase * gridCTF_phase + startGridCTF_phase) / ((myfloat_t) numberGridPointsEnvelop * gridEnvelop + startGridEnvelop);
/*** Number of total pixels***/
// *** Number of total pixels***
param_device.Ntotpi = (myfloat_t) (param_device.NumberPixels * param_device.NumberPixels);
param_device.NtotDist = (2 * (int) (param_device.maxDisplaceCenter / param_device.GridSpaceCenter) + 1 ) * (2 * (int) (param_device.maxDisplaceCenter / param_device.GridSpaceCenter) + 1);
......@@ -265,9 +265,9 @@ int bioem_param::CalculateGridsParam() //TO DO FOR QUATERNIONS
int bioem_param::CalculateRefCTF()
{
/**************************************************************************************/
/********** Routine that pre-calculates Kernels for Convolution **********************/
/************************************************************************************/
// **************************************************************************************
// ********** Routine that pre-calculates Kernels for Convolution **********************
// ************************************************************************************
myfloat_t amp, env, phase, ctf, radsq;
myfloat_t* localCTF;
......
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