Skip to content

Command line tool: plotswitch

Module cltools
Description Input
(no description available) command line args

Details

plotswitch is a tool that takes a the input of a switching function and tabulates the output on the terminal

The tabulated data is compatible with gnuplot and numpy.loadtxt so you can use this tool to plot any functions that you plan to use with commands like LESS_THAN or MORE_THAN.

Without options plotswitch will tabulate 50 points between 0 and R_0, and then continue in tabulating points with the same step until the value of D_MAX is reached. If D_MAX is unset then a value of2R_0is used in place ofD_MAX`.

Without options plotswitch will tabulate data calling calculateSqr, since should be the most used option within the various colvars

Note that if R_0 happens to be between "from" and "to" the number of steps may not be exacly the number requested as this command forces the value of the function at r0 to be calculated.

The various --rational** options use the special set option for the rational, like in COORDINATION.

Examples

If this command is called without options like this:

plumed plotswitch(no description available) This action has hidden defaults. More details > plot.dat What is printed on standard output is directed to a file with this name.

The function calculated is:

If you want to use a function that is differnt to this one you use the --switch keyword as shown below:

plumed plotswitch(no description available) This action has hidden defaults. More details --switch the input to pass to the switching function, please remeber the quotes="RATIONAL NN=5 MM=9 R_0=1.3" --from the start of the interval, if negative will be set to 0=1.29999 --to the end of the interval, will be D_MAX or 2*R_0 if D_MAX is not set=1.30001 --steps the number of steps between 0 and R_O, or in the specified interval=100 > plot.dat What is printed on standard output is directed to a file with this name.

The --switch keyword here takes the input for switching functions that is discussed in the documentation for LESS_THAN. Notice also that if you use this command with an older plumed version you will see a discontinuity in dfunc at around 1.3 (if you use gnuplot with "p 'plot.dat' u 1:3 w l t 'dfunc', 'plot.dat' u 1:2 w l axis x1y2 t 'res'")

The following example shows another way of generating the plot.dat that is output by the command above:

plumed plotswitch(no description available) This action has hidden defaults. More details --rationalR_0 The r_0 parameter of the switching function, this will activate the --rational options, note that this will ignore the --switch option silently=1.3 --rationalNN The n parameter of the switching function=5 --rationalMM The m parameter of the switching function; 0 implies 2*NN=9 --rationalD_0 The d_0 parameter of the switching function=0 --from the start of the interval, if negative will be set to 0=1.29999 --to the end of the interval, will be D_MAX or 2*R_0 if D_MAX is not set=1.30001 --steps the number of steps between 0 and R_O, or in the specified interval=100 > plot.dat What is printed on standard output is directed to a file with this name.

As with LESS_THAN, there is a alternative to --switch that can be used for sepcifying the parameters of RATIONAL switching function.

Syntax

The following table describes the command line options that are available for this tool

Keyword Description
--help/-h print this help
--switch the input to pass to the switching function, please remeber the quotes
--steps the number of steps between 0 and R_O, or in the specified interval
--from the start of the interval, if negative will be set to 0
--to the end of the interval, will be D_MAX or 2*R_0 if D_MAX is not set
--plotprecision the precision to use for the tabulated results
--rationalR_0 The r_0 parameter of the switching function, this will activate the --rational options, note that this will ignore the --switch option silently
--rationalNN The n parameter of the switching function
--rationalMM The m parameter of the switching function; 0 implies 2*NN
--rationalD_0 The d_0 parameter of the switching function
--nosquare use calculate instead of calculateSqr
--centerrange centers the visualization in R_0 in a range given epsilons times r_0, note that specifying this will overide all the other range options