Commit 7e2dd190 authored by abbasaa's avatar abbasaa
Browse files

added comments

parent 85831804
......@@ -5,6 +5,7 @@
#include <fstream>
#include <getopt.h>
#include <errno.h>
#include "box_gen.cpp"
#include "mem_gen.cpp"
......@@ -54,10 +55,7 @@ void getOptions(int argc, char **argv, string& config_filename) {
<< "offset <int>\n"
<< "tmsmesh_density_value <double>\n"
<< "tmsmesh_decay_rate <double>\n"
<< "tmsmesh_isovalue <double>\n"
<< "membrane_marker <int>\n"
<< "protein_marker <int>\n"
<< "solvent_marker <int>\n";
<< "tmsmesh_isovalue <double>\n";
exit(0);
case 'f':
......@@ -117,7 +115,7 @@ string pqrToOff(map<string,string>& config){
switch (os) {
case apple:
command = "../TMSmesh/TMSmesh2 ";
command += "-i " + input_file + " -e " + tmsmesh_density + " -d " + tmsmesh_decay_rate + " -c " + tmsmesh_isovalue;
command += "-i ../pqr/" + input_file + " -e " + tmsmesh_density + " -d " + tmsmesh_decay_rate + " -c " + tmsmesh_isovalue;
protein_filename = input_file + "-d" + tmsmesh_decay_rate + "-c" + tmsmesh_isovalue + "-e" + tmsmesh_density + ".off";
break;
......@@ -143,8 +141,14 @@ string pqrToOff(map<string,string>& config){
return protein_filename;
}
void main_helper(int argc, char** argv){
/*
* 1) Reads configuration as defined in config.txt
* 2) Converts protein .pqr file to .off file
* 3) Generate surface mesh (.poly file)
* 4) Generate volume mesh (.node, .ele, .neigh)
* 5) Extract membrane and split volume mesh
*/
void mainHelper(int argc, char** argv){
// Program configuration and options
string config_filename = "config.txt";
getOptions(argc, argv, config_filename);
......@@ -189,12 +193,11 @@ void main_helper(int argc, char** argv){
}
}
// Main Program Driver
int main(int argc, char** argv) {
try {
main_helper(argc, argv);
mainHelper(argc, argv);
}
catch (const std::exception& e) {
std::cerr << e.what() << '\n';
......@@ -202,4 +205,4 @@ int main(int argc, char** argv) {
}
return 0;
}
\ No newline at end of file
}
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