Skip to content
Snippets Groups Projects
Commit 606abedd authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Merge branch 'v2.0'

parents 38c41d4e 61d58da8
No related branches found
No related tags found
No related merge requests found
...@@ -141,7 +141,7 @@ case 2: ...@@ -141,7 +141,7 @@ case 2:
\verbatim \verbatim
WHOLEMOLECULES ENTITY0=1-174 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 PRINT ARG=cs
\endverbatim \endverbatim
...@@ -179,7 +179,7 @@ void CS2Backbone::registerKeywords( Keywords& keys ){ ...@@ -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","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","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","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("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.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."); keys.addFlag("CYS-DISU",false,"Set to TRUE if your system has disulphide bridges.");
...@@ -385,6 +385,8 @@ void CS2Backbone::calculate() ...@@ -385,6 +385,8 @@ void CS2Backbone::calculate()
if(printout) { if(printout) {
string csfile; string csfile;
char tmps1[21], tmps2[21]; 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()); sprintf(tmps1, "%li", getStep());
if(ensemble) { if(ensemble) {
sprintf(tmps2, "%i", multi_sim_comm.Get_rank()); sprintf(tmps2, "%i", multi_sim_comm.Get_rank());
......
...@@ -38,7 +38,7 @@ keys(k) ...@@ -38,7 +38,7 @@ keys(k)
} }
void CLTool::registerKeywords( Keywords& keys ){ 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 ): CLTool::CLTool(const CLToolOptions& co ):
...@@ -106,6 +106,9 @@ bool CLTool::readCommandLineArgs( int argc, char**argv, FILE*out ){ ...@@ -106,6 +106,9 @@ bool CLTool::readCommandLineArgs( int argc, char**argv, FILE*out ){
} }
if(!found){ 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(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; printhelp=true;
} }
} }
...@@ -160,7 +163,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){ ...@@ -160,7 +163,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){
if(argc==2){ if(argc==2){
mystdin=fopen(argv[1],"r"); mystdin=fopen(argv[1],"r");
if(!mystdin){ 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; return false;
} }
} }
...@@ -183,7 +189,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){ ...@@ -183,7 +189,10 @@ bool CLTool::readInputFile( int argc, char**argv, FILE* in, FILE*out ){
} }
} }
if(!found){ 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); if(mystdin) fclose(mystdin);
return false; return false;
} }
......
...@@ -183,7 +183,7 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){ ...@@ -183,7 +183,7 @@ int CLToolMain::run(int argc, char **argv,FILE*in,FILE*out,Communicator& pc){
if(printhelp){ if(printhelp){
string msg= string msg=
"Usage: plumed [options] [command] [command options]\n" "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" "Options:\n"
" [help|-h|--help] : to print this help\n" " [help|-h|--help] : to print this help\n"
" [--is-installed] : fails if plumed is not installed\n" " [--is-installed] : fails if plumed is not installed\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment