Commit 37bca30f authored by Vedran Miletić's avatar Vedran Miletić

Uniformized the help text of all rb* commands

parent f4e71b1c
......@@ -32,11 +32,13 @@ const std::string EXEVERSION =
" ($Id: //depot/dev/client3/rdock/2013.1/src/exe/rbcavity.cxx#3 $)";
void PrintUsage(void) {
std::cout << "rbcavity - calculate docking cavities" << std::endl;
std::cout << "Usage:\trbcavity -r <ReceptorPrmFile> [-W] [-R] [-d] [-v] [-l "
"<dist>] [-s] [-b <border> [-m]"
std::cout << std::endl
<< "rbcavity - calculate docking cavities" << std::endl;
std::cout << std::endl
<< "Usage:\trbcavity -r <ReceptorPrmFile> [-W] [-R] [-d] [-v] [-l "
"<dist>] [-s] [-b <border>] [-m]"
<< std::endl;
std::cout << "Options:" << std::endl;
std::cout << std::endl << "Options:" << std::endl;
std::cout
<< "\t\t-r <PrmFile> - receptor param file (contains active site params)"
<< std::endl;
......@@ -71,12 +73,6 @@ void PrintUsage(void) {
/////////////////////////////////////////////////////////////////////
int main(int argc, char *argv[]) {
// Display brief help message if no args
if (argc < 2) {
PrintUsage();
return 1;
}
// Handle obsolete arguments, if any
for (int i = 0; i < argc; i++) {
std::string opt = argv[i];
......@@ -98,6 +94,12 @@ int main(int argc, char *argv[]) {
// Print a standard header
Rbt::PrintStdHeader(std::cout, strExeName + EXEVERSION);
// Display brief help message if no args
if (argc < 2) {
PrintUsage();
return 1;
}
// Command line arguments and default values
std::string strReceptorPrmFile;
bool bReadAS(false); // If true, read Active Site from file
......
......@@ -15,6 +15,9 @@
#include "RbtFileError.h"
#include "RbtVdwGridSF.h"
const std::string EXEVERSION =
" ($Id: //depot/dev/client3/rdock/2013.1/src/exe/rbconvgrid.cxx#3 $)";
/////////////////////////////////////////////////////////////////////
// MAIN PROGRAM STARTS HERE
/////////////////////////////////////////////////////////////////////
......@@ -25,6 +28,15 @@ int main(int argc, char *argv[]) {
std::string strOutputFile("insight.grid");
int iGrid = 999;
// Strip off the path to the executable, leaving just the file name
std::string strExeName(argv[0]);
std::string::size_type i = strExeName.rfind("/");
if (i != std::string::npos)
strExeName.erase(0, i + 1);
// Print a standard header
Rbt::PrintStdHeader(std::cout, strExeName + EXEVERSION);
// Brief help message
if (argc == 1) {
std::cout
......
......@@ -86,12 +86,6 @@ void PrintUsage(void) {
/////////////////////////////////////////////////////////////////////
int main(int argc, char *argv[]) {
// Brief help message
if (argc < 2) {
PrintUsage();
return 1;
}
// Handle obsolete arguments, if any
for (int i = 0; i < argc; i++) {
std::string opt = argv[i];
......@@ -115,6 +109,12 @@ int main(int argc, char *argv[]) {
// Print a standard header
Rbt::PrintStdHeader(std::cout, strExeName + EXEVERSION);
// Brief help message
if (argc < 2) {
PrintUsage();
return 1;
}
// Command line arguments and default values
std::string strLigandMdlFile;
bool bOutput(false);
......
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