Commit 0392963f authored by Pilar Cossio's avatar Pilar Cossio

Included Input Checks

parent 92e7d74a
This diff is collapsed.
......@@ -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");
bio->configure(argc,argv);
/******************************* 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;
......
......@@ -13,9 +13,9 @@ using namespace std;
int bioem_RefMap::readRefMaps(bioem_param& param)
{
/**************************************************************************************/
/***********************Reading reference Particle Maps************************/
/**************************************************************************************/
//**************************************************************************************
//***********************Reading reference Particle Maps************************
//**************************************************************************************
if (loadMap)
{
FILE* fp = fopen("maps.dump", "rb");
......@@ -34,7 +34,7 @@ int bioem_RefMap::readRefMaps(bioem_param& param)
fclose(fp);
cout << "Particle Maps read from Map Dump \nTotal Number of particles: " << ntotRefMap ;
cout << "\n+++++++++++++++++++++++++++++++++++++++++ \n";
cout << "\n+++++++++++++++++++++++++++++++++++++++ \n";
}
else
{
......@@ -79,11 +79,13 @@ int bioem_RefMap::readRefMaps(bioem_param& param)
for(int i=3;i<100;i++)mapname[i] = {0};
}
cout << "\n+++++++++++++++++++++++++++++++++++++++++++ \n";
cout << "Particle Maps read from MULTIPLE MRC Files in: " << filemap << "\n" ;
} else {
read_MRC(filemap,param);
cout << "\n++++++++++++++++++++++++++++++++++++++++++ \n";
cout << "Particle Maps read from ONE MRC File: " << filemap << "\n" ;
}
......@@ -160,6 +162,7 @@ int bioem_RefMap::readRefMaps(bioem_param& param)
}
cout << ".";
ntotRefMap=nummap+1;
cout << "\n++++++++++++++++++++++++++++++++++++++++++ \n";
cout << "Particle Maps read from Standard File\n" ;
}
cout << "Total Number of particles: " << ntotRefMap ;
......@@ -184,9 +187,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;
......@@ -249,7 +252,7 @@ int bioem_RefMap::read_MRC(const char* filename,bioem_param& param)
n_range_viol1 = test_mrc(filename,1);
if (n_range_viol0 < n_range_viol1) { /* guess endianism */
if (n_range_viol0 < n_range_viol1) { //* guess endianism
swap = 0;
if (n_range_viol0 > 0) {
printf(" Warning: %i header field range violations detected in file %s \n", n_range_viol0,filename);
......@@ -260,7 +263,7 @@ int bioem_RefMap::read_MRC(const char* filename,bioem_param& param)
printf("Warning: %i header field range violations detected in file %s \n", n_range_viol1,filename);
}
}
printf("++++++++++++++++++++++++++++++++++++++++++++++\n");
printf("\n+++++++++++++++++++++++++++++++++++++++++++\n");
printf("Reading Information from MRC: %s \n", filename);
header_ok *= read_int(&nc,fin,swap);
header_ok *= read_int(&nr,fin,swap);
......@@ -291,8 +294,8 @@ int bioem_RefMap::read_MRC(const char* filename,bioem_param& param)
printf("Number Columns = %8d \n",nc);
printf("Number Rows = %8d \n",nr);
printf("Number Sections = %8d \n",ns);
printf("MODE = %8d (only data type mode 2: 32-bit)\n",mode);
printf("NSYMBT = %8d (# bytes symmetry operators)\n",nsymbt);
printf("MODE = %4d (only data type mode 2: 32-bit)\n",mode);
printf("NSYMBT = %4d (# bytes symmetry operators)\n",nsymbt);
/* printf(" NCSTART = %8d (index of first column, counting from 0)\n",ncstart);
printf("> NRSTART = %8d (index of first row, counting from 0)\n",nrstart);
......@@ -444,7 +447,7 @@ int bioem_RefMap::test_mrc (const char *vol_file, int swap) {
exit(1);
}
/* read header info */
//* read header info
header_ok *= read_int(&nc,fin,swap);
header_ok *= read_int(&nr,fin,swap);
header_ok *= read_int(&ns,fin,swap);
......
......@@ -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");
......@@ -110,7 +110,7 @@ int bioem_model::readModel()
}
nPointsModel=numres;
cout << "Protein structure read from PDB\nTotal Number of Residues " << nPointsModel;
cout << "\n+++++++++++++++++++++++++++++++++++++++++ \n";
}
else //Reading model from FILE FORMAT x,y,z,rad,density
{
......@@ -140,8 +140,8 @@ int bioem_model::readModel()
numres++;
}
nPointsModel=numres;
cout << "Protein structure read from Standard File \nTotal Number of Residues " << nPointsModel ;
cout << "\n+++++++++++++++++++++++++++++++++++++++++ \n";
cout << "Protein structure read from Standard File \nTotal Number of Voxels " << nPointsModel ;
}
}
exampleReadCoor.close();
......@@ -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;
......
This diff is collapsed.
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