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

Action should now provide examples in plumedfile sections

(still a stylistic warning)
parent 0c2e3680
No related branches found
No related tags found
No related merge requests found
......@@ -65,7 +65,7 @@ position. This grid is then output to a file called contour2.dat.
Notice that the commands below calculate the instantaneous position of the surface separating the solid and liquid and that as such the accumulated average is cleared
on every step.
\verbatim
\plumedfile
UNITS NATURAL
FCCUBIC ...
SPECIES=1-96000 SWITCH={CUBIC D_0=1.2 D_MAX=1.5}
......@@ -76,7 +76,7 @@ dens2: MULTICOLVARDENS DATA=fcc ORIGIN=1 DIR=xyz NBINS=14,14,50 ZREDUCED ZLOWER=
ss2: FIND_CONTOUR_SURFACE GRID=dens2 CONTOUR=0.42 SEARCHDIR=z STRIDE=1 CLEAR=1
DUMPGRID GRID=ss2 FILE=contour2.dat FMT=%8.4f STRIDE=1
\endverbatim
\endplumedfile
*/
//+ENDPLUMEDOC
......
......@@ -411,7 +411,7 @@ BEGINFILE{
# now it is considered equivalent to a verbatim
# later on we might make plumedfile compulsory instead of verbatim
if(in_plumed_doc && (in_plumed_doc in provide_examples) && match($0,"^ *\\\\plumedfile *$")){
provide_verbatim[in_plumed_doc]=1
provide_plumedfile[in_plumed_doc]=1
}
#print match($0,"^ *\\\\verbatim *$"),"X" $0 "X"
......@@ -548,11 +548,11 @@ END{
# DOC: Every action that is registered should contain an `Example` section in its documentation.
# DOC: Notice that if the `Example` section is not added the manual will not show the registered keywords.
error("action_without_examples","action " action " at " plumed_doc_action[action] " has no example")
} else if(!(action in provide_verbatim)){
} else if(!(action in provide_plumedfile)){
# DOC: :action_without_verbatim:
# DOC: Every action that is registered should contain an example in the form of a `verbatim` section.
# DOC: Every action that is registered should contain an example in the form of a `plumedfile` section.
# DOC: This is currently a stylistic warning since there are many actions not satisfying this requirement.
style("action_without_verbatim","action " action " at " provide_examples[action] " has no verbatim")
style("action_without_plumedfile","action " action " at " provide_examples[action] " has no plumedfile")
}
}
......
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