Skip to content

Commit

Permalink
Add patchversion scripting command
Browse files Browse the repository at this point in the history
[update-doc]
  • Loading branch information
giacomofiorin committed Oct 11, 2024
1 parent ffc5f56 commit 6590315
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
11 changes: 10 additions & 1 deletion doc/cvscript-fix-modify.tex
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@
\-~~~~\texttt{values : string - The values}
\end{mdexampleinput}
\begin{mdexampleinput}{}
\texttt{\textbf{fix\_modify Colvars patchversion}}
\\
\-~~~~\texttt{Get the Colvars patch version string (used for bugfixes only)}
\\
\-~~~~\texttt{\textbf{Returns}}
\\
\-~~~~\texttt{version : string - Colvars version}
\end{mdexampleinput}
\begin{mdexampleinput}{}
\texttt{\textbf{fix\_modify Colvars printframelabels}}
\\
\-~~~~\texttt{Return the labels that would be written to colvars.traj}
Expand Down Expand Up @@ -388,7 +397,7 @@
\begin{mdexampleinput}{}
\texttt{\textbf{fix\_modify Colvars version}}
\\
\-~~~~\texttt{Get the Colvars Module version string}
\-~~~~\texttt{Get the Colvars version string}
\\
\-~~~~\texttt{\textbf{Returns}}
\\
Expand Down
11 changes: 10 additions & 1 deletion doc/cvscript-tcl.tex
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@
\-~~~~\texttt{values : string - The values}
\end{mdexampleinput}
\begin{mdexampleinput}{}
\texttt{\textbf{cv patchversion}}
\\
\-~~~~\texttt{Get the Colvars patch version string (used for bugfixes only)}
\\
\-~~~~\texttt{\textbf{Returns}}
\\
\-~~~~\texttt{version : string - Colvars version}
\end{mdexampleinput}
\begin{mdexampleinput}{}
\texttt{\textbf{cv printframelabels}}
\\
\-~~~~\texttt{Return the labels that would be written to colvars.traj}
Expand Down Expand Up @@ -388,7 +397,7 @@
\begin{mdexampleinput}{}
\texttt{\textbf{cv version}}
\\
\-~~~~\texttt{Get the Colvars Module version string}
\-~~~~\texttt{Get the Colvars version string}
\\
\-~~~~\texttt{\textbf{Returns}}
\\
Expand Down
11 changes: 10 additions & 1 deletion src/colvarscript_commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,15 @@ CVSCRIPT(cv_printframe,
return COLVARS_OK;
)

CVSCRIPT(cv_patchversion,
"Get the Colvars patch version string (used for bugfixes only)\n"
"version : string - Colvars version",
0, 0,
"",
script->set_result_int(cvm::main()->patch_version_number());
return COLVARS_OK;
)

CVSCRIPT(cv_printframelabels,
"Return the labels that would be written to colvars.traj\n"
"Labels : string - The labels",
Expand Down Expand Up @@ -656,7 +665,7 @@ CVSCRIPT(cv_update,
)

CVSCRIPT(cv_version,
"Get the Colvars Module version string\n"
"Get the Colvars version string\n"
"version : string - Colvars version",
0, 0,
"",
Expand Down

0 comments on commit 6590315

Please sign in to comment.