diff --git a/src/colvar/CS2Backbone.cpp b/src/colvar/CS2Backbone.cpp index 3d7f0b679d70b3385dcdc21b2e9032fd8cf0a625..44911d26b8310c374e0e9bfc28e2b73b456fe4e5 100644 --- a/src/colvar/CS2Backbone.cpp +++ b/src/colvar/CS2Backbone.cpp @@ -141,7 +141,7 @@ case 2: \verbatim WHOLEMOLECULES ENTITY0=1-174 -cs: CS2BACKBONE ATOMS=1-174 DATA=data/ FF=a03_gromacs.mdb FLAT=1.0 NRES=13 TERMINI=DEFAULT,NONE CYS-DISU PRINT=1000 +cs: CS2BACKBONE ATOMS=1-174 DATA=data/ FF=a03_gromacs.mdb FLAT=1.0 NRES=13 TERMINI=DEFAULT,NONE CYS-DISU WRITE_CS=1000 PRINT ARG=cs \endverbatim @@ -179,7 +179,7 @@ void CS2Backbone::registerKeywords( Keywords& keys ){ keys.add("compulsory","FF","a03_gromacs.mdb","The ALMOST force-field to map the atoms' names."); keys.add("compulsory","FLAT","1.0","Flat region in the scoring function."); keys.add("compulsory","NEIGH_FREQ","10","Period in step for neighbour list update."); - keys.add("compulsory","WRITE_CS","0","Write chemical shifts period."); + keys.add("compulsory","WRITE_CS","0","Write the back-calculated chemical shifts every # steps."); keys.add("compulsory","NRES","Number of residues, corresponding to the number of chemical shifts."); keys.add("optional","TERMINI","Defines the protonation states of the chain-termini."); keys.addFlag("CYS-DISU",false,"Set to TRUE if your system has disulphide bridges."); @@ -385,6 +385,8 @@ void CS2Backbone::calculate() if(printout) { string csfile; char tmps1[21], tmps2[21]; + // add to the name the label of the cv in such a way to have different files + // when there is more than one defined variable sprintf(tmps1, "%li", getStep()); if(ensemble) { sprintf(tmps2, "%i", multi_sim_comm.Get_rank()); diff --git a/src/core/CLTool.cpp b/src/core/CLTool.cpp index b36763a20e6b28af6165b01749b77743021e1953..d5339a550701f7222795a7b381e622baba2589b4 100644 --- a/src/core/CLTool.cpp +++ b/src/core/CLTool.cpp @@ -38,7 +38,7 @@ keys(k) } void CLTool::registerKeywords( Keywords& keys ){ - keys.addFlag("--help",false,"print this help"); + keys.addFlag("--help/-h",false,"print this help"); } CLTool::CLTool(const CLToolOptions& co ): @@ -106,6 +106,9 @@ bool CLTool::readCommandLineArgs( int argc, char**argv, FILE*out ){ } if(!found){ fprintf(stderr,"ERROR in input for command line tool %s : %s option is unknown \n\n", name.c_str(), a.c_str() ); + fprintf(out,"Usage: %s < inputFile \n", name.c_str() ); + fprintf(out,"inputFile should contain one directive per line. The directives should come from amongst the following\n\n"); + keywords.print( out ); printhelp=true; } } @@ -160,7 +163,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){ if(argc==2){ mystdin=fopen(argv[1],"r"); if(!mystdin){ - fprintf(stderr,"ERROR: cannot open file %s\n",argv[1]); + fprintf(stderr,"ERROR: cannot open file %s\n\n",argv[1]); + fprintf(out,"Usage: %s < inputFile \n", name.c_str() ); + fprintf(out,"inputFile should contain one directive per line. The directives should come from amongst the following\n\n"); + keywords.print( out ); return false; } } @@ -183,7 +189,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){ } } if(!found){ - fprintf(stderr,"ERROR in input for command line tool %s : unknown keyword %s found in input file\n",name.c_str(),keyword.c_str()); + fprintf(stderr,"ERROR in input for command line tool %s : unknown keyword %s found in input file\n\n",name.c_str(),keyword.c_str()); + fprintf(out,"Usage: %s < inputFile \n", name.c_str() ); + fprintf(out,"inputFile should contain one directive per line. The directives should come from amongst the following\n\n"); + keywords.print( out ); if(mystdin) fclose(mystdin); return false; } diff --git a/src/core/CLToolMain.cpp b/src/core/CLToolMain.cpp index 345526007646c61e4371c5198d86c0be16fe84ba..11c57cc2d94feadcf99a0e28bd93314b30095863 100644 --- a/src/core/CLToolMain.cpp +++ b/src/core/CLToolMain.cpp @@ -183,7 +183,7 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){ if(printhelp){ string msg= "Usage: plumed [options] [command] [command options]\n" - " plumed [command] -h : to print help for a specific command\n" + " plumed [command] -h|--help: to print help for a specific command\n" "Options:\n" " [help|-h|--help] : to print this help\n" " [--is-installed] : fails if plumed is not installed\n"