diff --git a/regtest/contour/rt-parse-only/shortcuts.json.reference b/regtest/contour/rt-parse-only/shortcuts.json.reference index fe7a825394..e58a079ef5 100644 --- a/regtest/contour/rt-parse-only/shortcuts.json.reference +++ b/regtest/contour/rt-parse-only/shortcuts.json.reference @@ -13,7 +13,7 @@ }, "fcc" : { "defaults" : " PHI=0.0 THETA=0.0 PSI=0.0", - "expansion" : "fcc_grp: GROUP ATOMS=1-5184 \nfcc_mat: CONTACT_MATRIX GROUP=1-5184 SWITCH={CUBIC D_0=1.2 D_MAX=1.5} COMPONENTS \nfcc_vfunc: FCCUBIC_FUNC ARG=fcc_mat.x,fcc_mat.y,fcc_mat.z ALPHA=27 \nfcc_wvfunc: CUSTOM ARG=fcc_vfunc,fcc_mat.w FUNC=x*y PERIODIC=NO \nfcc_ones: ONES SIZE=5184\nfcc: MATRIX_VECTOR_PRODUCT ARG=fcc_wvfunc,fcc_ones \nfcc_denom: MATRIX_VECTOR_PRODUCT ARG=fcc_mat.w,fcc_ones \nfcc_n: CUSTOM ARG=fcc,fcc_denom FUNC=x/y PERIODIC=NO " + "expansion" : "fcc_grp: GROUP ATOMS=1-5184 \nfcc_mat: CONTACT_MATRIX GROUP=1-5184 SWITCH={CUBIC D_0=1.2 D_MAX=1.5} COMPONENTS \nfcc_vfunc: FCCUBIC_FUNC ARG=fcc_mat.x,fcc_mat.y,fcc_mat.z ALPHA=27\nfcc_wvfunc: CUSTOM ARG=fcc_vfunc,fcc_mat.w FUNC=x*y PERIODIC=NO\nfcc_ones: ONES SIZE=5184\nfcc: MATRIX_VECTOR_PRODUCT ARG=fcc_wvfunc,fcc_ones\nfcc_denom: MATRIX_VECTOR_PRODUCT ARG=fcc_mat.w,fcc_ones\nfcc_n: CUSTOM ARG=fcc,fcc_denom FUNC=x/y PERIODIC=NO" }, "ones" : { "expansion" : "ones: CONSTANT NOLOG VALUES=1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1" diff --git a/regtest/multicolvar/rt-parse-only/shortcuts.json.reference b/regtest/multicolvar/rt-parse-only/shortcuts.json.reference index 4bcac5ad12..0b9b15e922 100644 --- a/regtest/multicolvar/rt-parse-only/shortcuts.json.reference +++ b/regtest/multicolvar/rt-parse-only/shortcuts.json.reference @@ -1,5 +1,5 @@ { "dallk" : { - "expansion" : "dallk_vatom1: CENTER ATOMS=1,2 \ndallk_vatom2: CENTER ATOMS=3,4 \ndallk_vatom3: CENTER ATOMS=5,6 \ndallk_grp: GROUP ATOMS=dallk_vatom1,dallk_vatom2,dallk_vatom3 \ndallk: DISTANCE ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 \ndallk_lt1: LESS_THAN ARG=dallk SWITCH={RATIONAL R_0=1.0} \ndallk_lessthan-1: SUM ARG=dallk_lt1 PERIODIC=NO \ndallk_lt2: LESS_THAN ARG=dallk SWITCH={RATIONAL R_0=1.5} \ndallk_lessthan-2: SUM ARG=dallk_lt2 PERIODIC=NO \ndallk_lowest: LOWEST ARG=dallk \ndallk_mean: MEAN ARG=dallk PERIODIC=NO " + "expansion" : "dallk_vatom1: CENTER ATOMS=1,2 \ndallk_vatom2: CENTER ATOMS=3,4 \ndallk_vatom3: CENTER ATOMS=5,6 \ndallk_grp: GROUP ATOMS=dallk_vatom1,dallk_vatom2,dallk_vatom3 \ndallk: DISTANCE ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 \ndallk_lt1: LESS_THAN ARG=dallk SWITCH={RATIONAL R_0=1.0}\ndallk_lessthan-1: SUM ARG=dallk_lt1 PERIODIC=NO\ndallk_lt2: LESS_THAN ARG=dallk SWITCH={RATIONAL R_0=1.5}\ndallk_lessthan-2: SUM ARG=dallk_lt2 PERIODIC=NO\ndallk_lowest: LOWEST ARG=dallk\ndallk_mean: MEAN ARG=dallk PERIODIC=NO" } } diff --git a/regtest/symfunc/rt-parse-only/shortcuts.json.reference b/regtest/symfunc/rt-parse-only/shortcuts.json.reference index 99c54df990..eafdeee381 100644 --- a/regtest/symfunc/rt-parse-only/shortcuts.json.reference +++ b/regtest/symfunc/rt-parse-only/shortcuts.json.reference @@ -1,5 +1,5 @@ { "q1" : { - "expansion" : "q1_grp: GROUP ATOMS=1-10 \nq1_mat: CONTACT_MATRIX GROUP=1-10 SWITCH={RATIONAL R_0=1} COMPONENTS \nq1_sh: SPHERICAL_HARMONIC ARG=q1_mat.x,q1_mat.y,q1_mat.z,q1_mat.w L=1 \nq1_denom_ones: ONES SIZE=10\nq1_denom: MATRIX_VECTOR_PRODUCT ARG=q1_mat.w,q1_denom_ones \nq1_sp: MATRIX_VECTOR_PRODUCT ARG=q1_sh.*,q1_denom_ones \nq1_norm2: COMBINE PERIODIC=NO POWERS=2,2,2,2,2,2 ARG=q1_sp.rm-n1,q1_sp.im-n1,q1_sp.rm-0,q1_sp.im-0,q1_sp.rm-p1,q1_sp.im-p1 \nq1_norm: CUSTOM ARG=q1_norm2 FUNC=sqrt(x) PERIODIC=NO \nq1: CUSTOM ARG=q1_norm,q1_denom FUNC=x/y PERIODIC=NO " + "expansion" : "q1_grp: GROUP ATOMS=1-10 \nq1_mat: CONTACT_MATRIX GROUP=1-10 SWITCH={RATIONAL R_0=1} COMPONENTS \nq1_sh: SPHERICAL_HARMONIC ARG=q1_mat.x,q1_mat.y,q1_mat.z,q1_mat.w L=1\nq1_denom_ones: ONES SIZE=10\nq1_denom: MATRIX_VECTOR_PRODUCT ARG=q1_mat.w,q1_denom_ones\nq1_sp: MATRIX_VECTOR_PRODUCT ARG=q1_sh.*,q1_denom_ones\nq1_norm2: COMBINE PERIODIC=NO POWERS=2,2,2,2,2,2 ARG=q1_sp.rm-n1,q1_sp.im-n1,q1_sp.rm-0,q1_sp.im-0,q1_sp.rm-p1,q1_sp.im-p1\nq1_norm: CUSTOM ARG=q1_norm2 FUNC=sqrt(x) PERIODIC=NO\nq1: CUSTOM ARG=q1_norm,q1_denom FUNC=x/y PERIODIC=NO" } } diff --git a/regtest/wham/rt-parse-only/shortcuts.json.reference b/regtest/wham/rt-parse-only/shortcuts.json.reference index d8dc2e5683..5dfdc0220f 100644 --- a/regtest/wham/rt-parse-only/shortcuts.json.reference +++ b/regtest/wham/rt-parse-only/shortcuts.json.reference @@ -1,7 +1,7 @@ { "hh" : { "defaults" : " STRIDE=1", - "expansion" : "hh_gather: GATHER_REPLICAS ARG=rp.bias\nhh_gatherv: CONCATENATE ARG=hh_gather.*\nhh_collect: COLLECT TYPE=vector ARG=hh_gatherv STRIDE=1 \nhh_wham: WHAM ARG=hh_collect TEMP=300\nhh_data_phi: COLLECT ARG=phi \nhh: KDE ARG=hh_data_phi HEIGHTS=hh_wham KERNEL=DISCRETE GRID_MIN=-pi GRID_MAX=pi GRID_BIN=50 " + "expansion" : "hh_gather: GATHER_REPLICAS ARG=rp.bias\nhh_gatherv: CONCATENATE ARG=hh_gather.*\nhh_collect: COLLECT TYPE=vector ARG=hh_gatherv STRIDE=1\nhh_wham: WHAM ARG=hh_collect TEMP=300\nhh_data_phi: COLLECT ARG=phi\nhh: KDE ARG=hh_data_phi HEIGHTS=hh_wham KERNEL=DISCRETE GRID_MIN=-pi GRID_MAX=pi GRID_BIN=50" }, "rp" : { "defaults" : " SLOPE=0.0" diff --git a/src/adjmat/AdjacencyMatrixBase.cpp b/src/adjmat/AdjacencyMatrixBase.cpp index a97bc0fb8a..3e9d6f3e8c 100644 --- a/src/adjmat/AdjacencyMatrixBase.cpp +++ b/src/adjmat/AdjacencyMatrixBase.cpp @@ -28,7 +28,7 @@ namespace PLMD { namespace adjmat { void AdjacencyMatrixBase::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords( keys ); keys.remove("ARG"); + ActionWithMatrix::registerKeywords( keys ); keys.add("atoms","GROUP","the atoms for which you would like to calculate the adjacency matrix"); keys.add("atoms","GROUPA",""); keys.add("atoms","GROUPB",""); diff --git a/src/adjmat/Neighbors.cpp b/src/adjmat/Neighbors.cpp index 1e5b8240c7..b56465d836 100644 --- a/src/adjmat/Neighbors.cpp +++ b/src/adjmat/Neighbors.cpp @@ -52,7 +52,8 @@ class Neighbors : public ActionWithMatrix { PLUMED_REGISTER_ACTION(Neighbors,"NEIGHBORS") void Neighbors::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords( keys ); keys.use("ARG"); + ActionWithMatrix::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","matrix","the label of an adjacency/distance matrix that will be used to find the nearest neighbors"); keys.add("compulsory","NLOWEST","0","in each row of the output matrix set the elements that correspond to the n lowest elements in each row of the input matrix equal to one"); keys.add("compulsory","NHIGHEST","0","in each row of the output matrix set the elements that correspond to the n highest elements in each row of the input matrix equal to one"); keys.setValueDescription("matrix","a matrix in which the ij element is one if the ij-element of the input matrix is one of the NLOWEST/NHIGHEST elements on that row of the input matrix and zero otherwise"); diff --git a/src/adjmat/TorsionsMatrix.cpp b/src/adjmat/TorsionsMatrix.cpp index 39d736a03c..2815d818e8 100644 --- a/src/adjmat/TorsionsMatrix.cpp +++ b/src/adjmat/TorsionsMatrix.cpp @@ -52,7 +52,8 @@ class TorsionsMatrix : public ActionWithMatrix { PLUMED_REGISTER_ACTION(TorsionsMatrix,"TORSIONS_MATRIX") void TorsionsMatrix::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","matrix","an Nx3 and a 3xN matrix that contain the bond vectors that you would like to determine the torsion angles between"); keys.add("atoms","POSITIONS1","the positions to use for the molecules specified using the first argument"); keys.add("atoms","POSITIONS2","the positions to use for the molecules specified using the second argument"); keys.setValueDescription("matrix","the matrix of torsions between the two vectors of input directors"); diff --git a/src/annfunc/ANN.cpp b/src/annfunc/ANN.cpp index b18d63978f..7b97739b20 100644 --- a/src/annfunc/ANN.cpp +++ b/src/annfunc/ANN.cpp @@ -111,7 +111,7 @@ PLUMED_REGISTER_ACTION(ANN,"ANN") void ANN::registerKeywords( Keywords& keys ) { Function::registerKeywords(keys); - keys.use("ARG"); keys.use("PERIODIC"); + keys.use("PERIODIC"); keys.add("compulsory", "NUM_LAYERS", "number of layers of the neural network"); keys.add("compulsory", "NUM_NODES", "numbers of nodes in each layer of the neural network"); keys.add("compulsory", "ACTIVATIONS", "activation functions for the neural network"); diff --git a/src/bias/ABMD.cpp b/src/bias/ABMD.cpp index 24e0295d85..7923208a11 100644 --- a/src/bias/ABMD.cpp +++ b/src/bias/ABMD.cpp @@ -96,7 +96,6 @@ PLUMED_REGISTER_ACTION(ABMD,"ABMD") void ABMD::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","TO","The array of target values"); keys.add("compulsory","KAPPA","The array of force constants."); keys.add("optional","MIN","Array of starting values for the bias (set rho_m(t), otherwise it is set using the current value of ARG)"); diff --git a/src/bias/Bias.cpp b/src/bias/Bias.cpp index 6e0c38e3bb..e6f198bff0 100644 --- a/src/bias/Bias.cpp +++ b/src/bias/Bias.cpp @@ -52,6 +52,7 @@ void Bias::registerKeywords( Keywords& keys ) { ActionPilot::registerKeywords(keys); ActionWithValue::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the scalars on which the bias will act"); keys.add("hidden","STRIDE","the frequency with which the forces due to the bias should be calculated. This can be used to correctly set up multistep algorithms"); keys.addOutputComponent("bias","default","scalar","the instantaneous value of the bias potential"); } diff --git a/src/bias/BiasValue.cpp b/src/bias/BiasValue.cpp index 928803eb31..c4272f7d17 100644 --- a/src/bias/BiasValue.cpp +++ b/src/bias/BiasValue.cpp @@ -83,7 +83,7 @@ PLUMED_REGISTER_ACTION(BiasValue,"BIASVALUE") void BiasValue::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar/vector","the labels of the scalar/vector arguments whose values will be used as a bias on the system"); // Should be _bias below keys.addOutputComponent("_bias","default","scalar","one or multiple instances of this quantity can be referenced elsewhere in the input file. " "these quantities will named with the arguments of the bias followed by " diff --git a/src/bias/ExtendedLagrangian.cpp b/src/bias/ExtendedLagrangian.cpp index 8a5aff4b1d..ba66be13ea 100644 --- a/src/bias/ExtendedLagrangian.cpp +++ b/src/bias/ExtendedLagrangian.cpp @@ -129,7 +129,6 @@ PLUMED_REGISTER_ACTION(ExtendedLagrangian,"EXTENDED_LAGRANGIAN") void ExtendedLagrangian::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","KAPPA","specifies that the restraint is harmonic and what the values of the force constants on each of the variables are"); keys.add("compulsory","TAU","specifies that the restraint is harmonic and what the values of the force constants on each of the variables are"); keys.add("compulsory","FRICTION","0.0","add a friction to the variable"); diff --git a/src/bias/External.cpp b/src/bias/External.cpp index ce422c1682..5d01ea5184 100644 --- a/src/bias/External.cpp +++ b/src/bias/External.cpp @@ -122,7 +122,6 @@ PLUMED_REGISTER_ACTION(External,"EXTERNAL") void External::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","FILE","the name of the file containing the external potential."); keys.addFlag("NOSPLINE",false,"specifies that no spline interpolation is to be used when calculating the energy and forces due to the external potential"); keys.addFlag("SPARSE",false,"specifies that the external potential uses a sparse grid"); diff --git a/src/bias/LWalls.cpp b/src/bias/LWalls.cpp index cfeb3f8384..ac933883ed 100644 --- a/src/bias/LWalls.cpp +++ b/src/bias/LWalls.cpp @@ -87,7 +87,7 @@ PLUMED_REGISTER_ACTION(LWalls,"LOWER_WALLS_SCALAR") void LWalls::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); keys.setDisplayName("LOWER_WALLS"); - keys.use("ARG"); keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); + keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); keys.add("compulsory","AT","the positions of the wall. The a_i in the expression for a wall."); keys.add("compulsory","KAPPA","the force constant for the wall. The k_i in the expression for a wall."); keys.add("compulsory","OFFSET","0.0","the offset for the start of the wall. The o_i in the expression for a wall."); diff --git a/src/bias/MaxEnt.cpp b/src/bias/MaxEnt.cpp index be999919cd..74dfff9f2f 100644 --- a/src/bias/MaxEnt.cpp +++ b/src/bias/MaxEnt.cpp @@ -163,7 +163,6 @@ PLUMED_REGISTER_ACTION(MaxEnt,"MAXENT") void MaxEnt::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","KAPPA","0.0","specifies the initial value for the learning rate"); keys.add("compulsory","TAU","Specify the dumping time for the learning rate."); keys.add("compulsory","TYPE","specify the restraint type. " diff --git a/src/bias/MetaD.cpp b/src/bias/MetaD.cpp index 3d45b71cd8..fc0325c8c8 100644 --- a/src/bias/MetaD.cpp +++ b/src/bias/MetaD.cpp @@ -530,7 +530,6 @@ void MetaD::registerKeywords(Keywords& keys) { keys.addOutputComponent("pace","FREQUENCY_ADAPTIVE","scalar","the hill addition frequency when employing frequency adaptive metadynamics"); keys.addOutputComponent("nlker","NLIST","scalar","number of hills in the neighbor list"); keys.addOutputComponent("nlsteps","NLIST","scalar","number of steps from last neighbor list update"); - keys.use("ARG"); keys.add("compulsory","SIGMA","the widths of the Gaussian hills"); keys.add("compulsory","PACE","the frequency for hill addition"); keys.add("compulsory","FILE","HILLS","a file in which the list of added hills is stored"); diff --git a/src/bias/MovingRestraint.cpp b/src/bias/MovingRestraint.cpp index bfbf9ce221..fae1def8e6 100644 --- a/src/bias/MovingRestraint.cpp +++ b/src/bias/MovingRestraint.cpp @@ -124,7 +124,6 @@ PLUMED_REGISTER_ACTION(MovingRestraint,"MOVINGRESTRAINT") void MovingRestraint::registerKeywords( Keywords& keys ) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","VERSE","B","Tells plumed whether the restraint is only acting for CV larger (U) or smaller (L) than " "the restraint or whether it is acting on both sides (B)"); keys.add("numbered","STEP","This keyword appears multiple times as STEPx with x=0,1,2,...,n. Each value given represents " diff --git a/src/bias/PBMetaD.cpp b/src/bias/PBMetaD.cpp index 3f7c4b1b8d..7a4661c171 100644 --- a/src/bias/PBMetaD.cpp +++ b/src/bias/PBMetaD.cpp @@ -330,7 +330,6 @@ PLUMED_REGISTER_ACTION(PBMetaD,"PBMETAD") void PBMetaD::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","SIGMA","the widths of the Gaussian hills"); keys.add("compulsory","PACE","the frequency for hill addition, one for all biases"); keys.add("optional","FILE","files in which the lists of added hills are stored, default names are assigned using arguments if FILE is not found"); @@ -351,7 +350,7 @@ void PBMetaD::registerKeywords(Keywords& keys) { keys.add("optional","ADAPTIVE","use a geometric (=GEOM) or diffusion (=DIFF) based hills width scheme. Sigma is one number that has distance units or timestep dimensions"); keys.add("optional","SIGMA_MAX","the upper bounds for the sigmas (in CV units) when using adaptive hills. Negative number means no bounds "); keys.add("optional","SIGMA_MIN","the lower bounds for the sigmas (in CV units) when using adaptive hills. Negative number means no bounds "); - keys.add("numbered","PF", "specify which CVs belong in a partitioned family. Once a PF is specified, all CVs in ARG must be placed in a PF even if there is one CV per PF”"); + keys.addInputKeyword("numbered","PF", "scalar", "specify which CVs belong in a partitioned family. Once a PF is specified, all CVs in ARG must be placed in a PF even if there is one CV per PF”"); keys.add("optional","SELECTOR", "add forces and do update based on the value of SELECTOR"); keys.add("optional","SELECTOR_ID", "value of SELECTOR"); keys.add("optional","WALKERS_ID", "walker id"); diff --git a/src/bias/Restraint.cpp b/src/bias/Restraint.cpp index fb0f9a6b9b..f097d5f899 100644 --- a/src/bias/Restraint.cpp +++ b/src/bias/Restraint.cpp @@ -79,8 +79,7 @@ class Restraint : public Bias { PLUMED_REGISTER_ACTION(Restraint,"RESTRAINT_SCALAR") void Restraint::registerKeywords(Keywords& keys) { - Bias::registerKeywords(keys); - keys.use("ARG"); keys.setDisplayName("RESTRAINT"); + Bias::registerKeywords(keys); keys.setDisplayName("RESTRAINT"); keys.add("compulsory","SLOPE","0.0","specifies that the restraint is linear and what the values of the force constants on each of the variables are"); keys.add("compulsory","KAPPA","0.0","specifies that the restraint is harmonic and what the values of the force constants on each of the variables are"); keys.add("compulsory","AT","the position of the restraint"); diff --git a/src/bias/RestraintShortcut.cpp b/src/bias/RestraintShortcut.cpp index 24ff3247bf..ac0d17668c 100644 --- a/src/bias/RestraintShortcut.cpp +++ b/src/bias/RestraintShortcut.cpp @@ -38,7 +38,7 @@ PLUMED_REGISTER_ACTION(RestraintShortcut,"RESTRAINT") void RestraintShortcut::registerKeywords(Keywords& keys) { ActionShortcut::registerKeywords( keys ); - keys.add("numbered","ARG","the arguments on which the bias is acting"); + keys.addInputKeyword("numbered","ARG","scalar/vector","the values the harmonic restraint acts upon"); keys.add("compulsory","SLOPE","0.0","specifies that the restraint is linear and what the values of the force constants on each of the variables are"); keys.add("compulsory","KAPPA","0.0","specifies that the restraint is harmonic and what the values of the force constants on each of the variables are"); keys.add("compulsory","AT","the position of the restraint"); diff --git a/src/bias/ReweightBias.cpp b/src/bias/ReweightBias.cpp index 96a9da14ec..85cc51a6f1 100644 --- a/src/bias/ReweightBias.cpp +++ b/src/bias/ReweightBias.cpp @@ -78,8 +78,8 @@ class ReweightBias : public ReweightBase { PLUMED_REGISTER_ACTION(ReweightBias,"REWEIGHT_BIAS") void ReweightBias::registerKeywords(Keywords& keys ) { - ReweightBase::registerKeywords( keys ); keys.remove("ARG"); - keys.add("compulsory","ARG","*.bias","the biases that must be taken into account when reweighting"); + ReweightBase::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar","*.bias","the biases that must be taken into account when reweighting"); keys.setValueDescription("scalar","the weight to use for this frame to negate the effect the bias"); } diff --git a/src/bias/ReweightMetad.cpp b/src/bias/ReweightMetad.cpp index 7438540b78..886d44a2ba 100644 --- a/src/bias/ReweightMetad.cpp +++ b/src/bias/ReweightMetad.cpp @@ -75,8 +75,8 @@ class ReweightMetad : public ReweightBase { PLUMED_REGISTER_ACTION(ReweightMetad,"REWEIGHT_METAD") void ReweightMetad::registerKeywords(Keywords& keys ) { - ReweightBase::registerKeywords( keys ); keys.remove("ARG"); - keys.add("compulsory","ARG","*.rbias","the biases that must be taken into account when reweighting"); + ReweightBase::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar","*.rbias","the biases that must be taken into account when reweighting"); keys.setValueDescription("scalar","the weight to use for this frame to negate the effect the metadynamics bias"); } diff --git a/src/bias/ReweightTemperaturePressure.cpp b/src/bias/ReweightTemperaturePressure.cpp index 7931485799..3699e3fd4c 100644 --- a/src/bias/ReweightTemperaturePressure.cpp +++ b/src/bias/ReweightTemperaturePressure.cpp @@ -189,9 +189,8 @@ PLUMED_REGISTER_ACTION(ReweightTemperaturePressure,"REWEIGHT_TEMP_PRESS") void ReweightTemperaturePressure::registerKeywords(Keywords& keys ) { ReweightBase::registerKeywords( keys ); - keys.remove("ARG"); - keys.add("optional","ENERGY","Energy"); - keys.add("optional","VOLUME","Volume"); + keys.addInputKeyword("optional","ENERGY","scalar","Energy"); + keys.addInputKeyword("optional","VOLUME","scalar","Volume"); keys.add("optional","REWEIGHT_PRESSURE","Reweighting pressure"); keys.add("optional","PRESSURE","The system pressure"); keys.add("optional","REWEIGHT_TEMP","Reweighting temperature"); diff --git a/src/bias/UWalls.cpp b/src/bias/UWalls.cpp index 15bdda72e2..635aca09c8 100644 --- a/src/bias/UWalls.cpp +++ b/src/bias/UWalls.cpp @@ -86,7 +86,7 @@ PLUMED_REGISTER_ACTION(UWalls,"UPPER_WALLS_SCALAR") void UWalls::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); keys.setDisplayName("UPPER_WALLS"); - keys.use("ARG"); keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); + keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); keys.add("compulsory","AT","the positions of the wall. The a_i in the expression for a wall."); keys.add("compulsory","KAPPA","the force constant for the wall. The k_i in the expression for a wall."); keys.add("compulsory","OFFSET","0.0","the offset for the start of the wall. The o_i in the expression for a wall."); diff --git a/src/bias/Walls.cpp b/src/bias/Walls.cpp index 668e8588fb..28d5c89e04 100644 --- a/src/bias/Walls.cpp +++ b/src/bias/Walls.cpp @@ -39,7 +39,7 @@ PLUMED_REGISTER_ACTION(Walls,"LOWER_WALLS") void Walls::registerKeywords(Keywords& keys) { ActionShortcut::registerKeywords(keys); - keys.add("numbered","ARG","the arguments on which the bias is acting"); + keys.addInputKeyword("numbered","ARG","scalar/vector","the arguments on which the bias is acting"); keys.add("compulsory","AT","the positions of the wall. The a_i in the expression for a wall."); keys.add("compulsory","KAPPA","the force constant for the wall. The k_i in the expression for a wall."); keys.add("compulsory","OFFSET","0.0","the offset for the start of the wall. The o_i in the expression for a wall."); diff --git a/src/cltools/GenJson.cpp b/src/cltools/GenJson.cpp index 57d8873848..a7d599bab1 100644 --- a/src/cltools/GenJson.cpp +++ b/src/cltools/GenJson.cpp @@ -121,7 +121,9 @@ int GenJson::main(FILE* in, FILE*out,Communicator& pc) { } std::size_t dot=desc.find_first_of("."); std::string mydescrip = desc.substr(0,dot); if( mydescrip.find("\\")!=std::string::npos ) error("found invalid backslash character documentation for keyword " + keys.getKeyword(j) + " in action " + action_names[i] ); - std::cout<<" \""<0 ) std::cout<<" \""<&arg) { + if( keywords.getArgumentType(key).length()==0 ) warning("keyword " + key + " for reading arguments should is registered using Keyword::add rather than Keyword::addInputKeyword. The keyword will thus not appear in the correct place in the manual"); std::string def; std::vector c; arg.clear(); parseVector(key,c); if( c.size()==0 && (keywords.style(key,"compulsory") || keywords.style(key,"hidden")) ) { if( keywords.getDefaultValue(key,def) ) c.push_back( def ); @@ -57,6 +58,7 @@ void ActionWithArguments::parseArgumentList(const std::string&key,std::vector&arg) { + if( keywords.getArgumentType(key).length()==0 ) warning("keyword " + key + " for reading argument should is registered using Keyword::add rather than Keyword::addInputKeyword. The keyword will thus not appear in the correct place in the manual"); std::vector c; arg.clear(); if(parseNumberedVector(key,i,c)) { @@ -189,6 +191,9 @@ void ActionWithArguments::interpretArgumentList(const std::vector& } } } + for(unsigned i=0; ikeywords.checkArgumentType( arg[i]->getRank(), arg[i]->hasDerivatives() ) ) readact->warning("documentation for input type is not provided in " + readact->getName() ); + } } void ActionWithArguments::expandArgKeywordInPDB( const PDB& pdb ) { diff --git a/src/core/ActionWithMatrix.cpp b/src/core/ActionWithMatrix.cpp index bc0609f41b..2ddadb5384 100644 --- a/src/core/ActionWithMatrix.cpp +++ b/src/core/ActionWithMatrix.cpp @@ -25,7 +25,7 @@ namespace PLMD { void ActionWithMatrix::registerKeywords( Keywords& keys ) { - ActionWithVector::registerKeywords( keys ); keys.use("ARG"); + ActionWithVector::registerKeywords( keys ); } ActionWithMatrix::ActionWithMatrix(const ActionOptions&ao): diff --git a/src/crystdistrib/QuaternionBondProductMatrix.cpp b/src/crystdistrib/QuaternionBondProductMatrix.cpp index 0fea48baae..ce14058cc2 100644 --- a/src/crystdistrib/QuaternionBondProductMatrix.cpp +++ b/src/crystdistrib/QuaternionBondProductMatrix.cpp @@ -73,7 +73,8 @@ PLUMED_REGISTER_ACTION(QuaternionBondProductMatrix,"QUATERNION_BOND_PRODUCT_MATR void QuaternionBondProductMatrix::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","vector/matrix","this action takes 8 arguments. The first four should be the w,i,j and k components of a quaternion vector. The second four should be contact matrix and the matrices should be the x, y and z components of the bond vectors"); keys.addOutputComponent("w","default","matrix","the real component of quaternion"); keys.addOutputComponent("i","default","matrix","the i component of the quaternion"); keys.addOutputComponent("j","default","matrix","the j component of the quaternion"); diff --git a/src/crystdistrib/QuaternionProductMatrix.cpp b/src/crystdistrib/QuaternionProductMatrix.cpp index 0210f87810..a14cca09c4 100644 --- a/src/crystdistrib/QuaternionProductMatrix.cpp +++ b/src/crystdistrib/QuaternionProductMatrix.cpp @@ -50,7 +50,8 @@ class QuaternionProductMatrix : public ActionWithMatrix { PLUMED_REGISTER_ACTION(QuaternionProductMatrix,"QUATERNION_PRODUCT_MATRIX") void QuaternionProductMatrix::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","vector","the labels of the quaternion vectors that you are outer product of"); keys.addOutputComponent("w","default","matrix","the real component of quaternion"); keys.addOutputComponent("i","default","matrix","the i component of the quaternion"); keys.addOutputComponent("j","default","matrix","the j component of the quaternion"); diff --git a/src/dimred/ArrangePoints.cpp b/src/dimred/ArrangePoints.cpp index 19d1f265a0..5296042c94 100644 --- a/src/dimred/ArrangePoints.cpp +++ b/src/dimred/ArrangePoints.cpp @@ -70,10 +70,11 @@ PLUMED_REGISTER_ACTION(ArrangePoints,"ARRANGE_POINTS") void ArrangePoints::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); - keys.add("numbered","TARGET","the matrix of target quantities that you would like to match"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","vector","the initial positions for the projections"); + keys.addInputKeyword("numbered","TARGET","matrix","the matrix of target quantities that you would like to match"); keys.add("numbered","FUNC","a function that is applied on the distances between the points in the low dimensional space"); - keys.add("numbered","WEIGHTS","the matrix with the weights of the target quantities"); + keys.addInputKeyword("numbered","WEIGHTS","matrix","the matrix with the weights of the target quantities"); keys.add("compulsory","MINTYPE","conjgrad","the method to use for the minimisation"); keys.add("compulsory","MAXITER","1000","maximum number of optimization cycles for optimisation algorithms"); keys.add("compulsory","CGTOL","1E-6","the tolerance for the conjugate gradient minimization"); diff --git a/src/dimred/ProjectPoints.cpp b/src/dimred/ProjectPoints.cpp index f200e12247..128eeadf31 100644 --- a/src/dimred/ProjectPoints.cpp +++ b/src/dimred/ProjectPoints.cpp @@ -60,10 +60,11 @@ class ProjectPoints : public ActionWithVector { PLUMED_REGISTER_ACTION(ProjectPoints,"PROJECT_POINTS") void ProjectPoints::registerKeywords( Keywords& keys ) { - ActionWithVector::registerKeywords( keys ); keys.use("ARG"); - keys.add("numbered","TARGET","the matrix of target quantities that you would like to match"); + ActionWithVector::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","vector","the projections of the landmark points"); + keys.addInputKeyword("numbered","TARGET","vector/matrix","the matrix of target quantities that you would like to match"); keys.add("numbered","FUNC","a function that is applied on the distances between the points in the low dimensional space"); - keys.add("numbered","WEIGHTS","the matrix with the weights of the target quantities"); + keys.addInputKeyword("numbered","WEIGHTS","vector","the matrix with the weights of the target quantities"); keys.add("compulsory","CGTOL","1E-6","the tolerance for the conjugate gradient minimization"); keys.addOutputComponent("coord","default","scalar/vector","the coordinates of the points in the low dimensional space"); } diff --git a/src/drr/DynamicReferenceRestraining.cpp b/src/drr/DynamicReferenceRestraining.cpp index 77c40ff532..c85ece3ece 100644 --- a/src/drr/DynamicReferenceRestraining.cpp +++ b/src/drr/DynamicReferenceRestraining.cpp @@ -246,7 +246,6 @@ PLUMED_REGISTER_ACTION(DynamicReferenceRestraining, "DRR") void DynamicReferenceRestraining::registerKeywords(Keywords &keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("optional", "KAPPA", "specifies that the restraint is harmonic and " "what the values of the force constants on " "each of the variables are (default to " diff --git a/src/eds/EDS.cpp b/src/eds/EDS.cpp index f2be25e4d0..8444f48cbf 100644 --- a/src/eds/EDS.cpp +++ b/src/eds/EDS.cpp @@ -281,10 +281,9 @@ PLUMED_REGISTER_ACTION(EDS, "EDS") void EDS::registerKeywords(Keywords &keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("optional", "CENTER", "The desired centers (equilibrium values) which will be sought during the adaptive linear biasing. This is for fixed centers"); - keys.add("optional", "CENTER_ARG", "The desired centers (equilibrium values) which will be sought during the adaptive linear biasing. " - "CENTER_ARG is for calculated centers, e.g. from a CV or analysis. "); + keys.addInputKeyword("optional", "CENTER_ARG", "scalar", "The desired centers (equilibrium values) which will be sought during the adaptive linear biasing. " + "CENTER_ARG is for calculated centers, e.g. from a CV or analysis. "); keys.add("optional", "PERIOD", "Steps over which to adjust bias for adaptive or ramping"); keys.add("compulsory", "RANGE", "25.0", "The (starting) maximum increase in coupling constant per PERIOD (in k_B T/[BIAS_SCALE unit]) for each CV biased"); @@ -298,7 +297,7 @@ void EDS::registerKeywords(Keywords &keys) "Must be in interval [1,0), where 1 indicates all and any other indicates a stochastic update. " "If not set, default is 1 / N, where N is the number of CVs. "); keys.add("optional", "VIRIAL", "Add an update penalty for having non-zero virial contributions. Only makes sense with multiple correlated CVs."); - keys.add("optional", "LOGWEIGHTS", "Add weights to use for computing statistics. For example, if biasing with metadynamics."); + keys.addInputKeyword("optional", "LOGWEIGHTS", "scalar", "Add weights to use for computing statistics. For example, if biasing with metadynamics."); keys.addFlag("LM", false, "Use Levenberg-Marquadt algorithm along with simultaneous keyword. Otherwise use gradient descent."); keys.add("compulsory", "LM_MIXING", "1", "Initial mixing parameter when using Levenberg-Marquadt minimization."); keys.add("optional", "RESTART_FMT", "the format that should be used to output real numbers in EDS restarts"); diff --git a/src/fisst/FISST.cpp b/src/fisst/FISST.cpp index 4e65c461ee..2db59fb765 100644 --- a/src/fisst/FISST.cpp +++ b/src/fisst/FISST.cpp @@ -166,7 +166,6 @@ PLUMED_REGISTER_ACTION(FISST,"FISST") void FISST::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","PERIOD","Steps corresponding to the learning rate"); keys.add("optional","RESET_PERIOD","Reset the learning statistics every time this number of steps comes around."); keys.add("compulsory","NINTERPOLATE","Number of grid points on which to do interpolation."); diff --git a/src/fourier/FourierTransform.cpp b/src/fourier/FourierTransform.cpp index a66cf6091b..1207f2f3fd 100644 --- a/src/fourier/FourierTransform.cpp +++ b/src/fourier/FourierTransform.cpp @@ -87,7 +87,8 @@ class FourierTransform : public gridtools::ActionWithGrid { PLUMED_REGISTER_ACTION(FourierTransform,"FOURIER_TRANSFORM") void FourierTransform::registerKeywords( Keywords& keys ) { - ActionWithGrid::registerKeywords( keys ); keys.use("ARG"); + ActionWithGrid::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","grid","the label of the grid that you want to fourer transform"); keys.add("optional","FT_TYPE","choose what kind of data you want as output on the grid. Possible values are: ABS = compute the complex modulus of Fourier coefficients (DEFAULT); NORM = compute the norm (i.e. ABS^2) of Fourier coefficients; COMPLEX = store the FFTW complex output on the grid (as a vector)."); keys.add("compulsory","FOURIER_PARAMETERS","default","what kind of normalization is applied to the output and if the Fourier transform in FORWARD or BACKWARD. This keyword takes the form FOURIER_PARAMETERS=A,B, where A and B can be 0, 1 or -1. The default values are A=1 (no normalization at all) and B=1 (forward FFT). Other possible choices for A are: " "A=-1: normalize by the number of data, " diff --git a/src/function/Ensemble.cpp b/src/function/Ensemble.cpp index 137dc77ab8..1121f9d976 100644 --- a/src/function/Ensemble.cpp +++ b/src/function/Ensemble.cpp @@ -73,7 +73,6 @@ PLUMED_REGISTER_ACTION(Ensemble,"ENSEMBLE") void Ensemble::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.addFlag("REWEIGHT",false,"simple REWEIGHT using the latest ARG as energy"); keys.addFlag("CENTRAL",false,"calculate a central moment instead of a standard moment"); keys.add("optional","TEMP","the system temperature - this is only needed if you are reweighting"); diff --git a/src/function/FuncPathGeneral.cpp b/src/function/FuncPathGeneral.cpp index be30f5bed4..4dd0ada991 100644 --- a/src/function/FuncPathGeneral.cpp +++ b/src/function/FuncPathGeneral.cpp @@ -155,7 +155,6 @@ void FuncPathGeneral::loadReference() { void FuncPathGeneral::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory", "LAMBDA", "Lambda parameter required for smoothing"); keys.add("compulsory", "COEFFICIENTS", "Coefficients to be assigned to the CVs"); keys.add("compulsory", "REFERENCE", "Colvar file needed to provide the CV milestones"); diff --git a/src/function/FuncPathMSD.cpp b/src/function/FuncPathMSD.cpp index 1905ceb412..5070c284f9 100644 --- a/src/function/FuncPathMSD.cpp +++ b/src/function/FuncPathMSD.cpp @@ -219,7 +219,6 @@ PLUMED_REGISTER_ACTION(FuncPathMSD,"FUNCPATHMSD") void FuncPathMSD::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","LAMBDA","the lambda parameter is needed for smoothing, is in the units of plumed"); keys.add("optional","NEIGH_SIZE","size of the neighbor list"); keys.add("optional","NEIGH_STRIDE","how often the neighbor list needs to be calculated in time units"); diff --git a/src/function/FuncSumHills.cpp b/src/function/FuncSumHills.cpp index f3ce2fbbee..627063b717 100644 --- a/src/function/FuncSumHills.cpp +++ b/src/function/FuncSumHills.cpp @@ -200,7 +200,6 @@ PLUMED_REGISTER_ACTION(FuncSumHills,"FUNCSUMHILLS") void FuncSumHills::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.add("optional","HILLSFILES"," source file for hills creation(may be the same as HILLS)"); // this can be a vector! keys.add("optional","HISTOFILES"," source file for histogram creation(may be the same as HILLS)"); // also this can be a vector! keys.add("optional","HISTOSIGMA"," sigmas for binning when the histogram correction is needed "); diff --git a/src/function/Function.cpp b/src/function/Function.cpp index 053c4a9943..8ca01b585d 100644 --- a/src/function/Function.cpp +++ b/src/function/Function.cpp @@ -30,6 +30,7 @@ void Function::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionWithValue::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values from which the function is calculated"); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); } diff --git a/src/function/FunctionOfMatrix.h b/src/function/FunctionOfMatrix.h index dd56dcbdec..048942acc1 100644 --- a/src/function/FunctionOfMatrix.h +++ b/src/function/FunctionOfMatrix.h @@ -75,8 +75,9 @@ class FunctionOfMatrix : public ActionWithMatrix { template void FunctionOfMatrix::registerKeywords(Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); std::string name = keys.getDisplayName(); + ActionWithMatrix::registerKeywords(keys); std::string name = keys.getDisplayName(); std::size_t und=name.find("_MATRIX"); keys.setDisplayName( name.substr(0,und) ); + keys.addInputKeyword("compulsory","ARG","scalar/matrix","the labels of the scalar and matrices that on which the function is being calculated elementwise"); keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); T tfunc; tfunc.registerKeywords( keys ); diff --git a/src/function/FunctionOfScalar.h b/src/function/FunctionOfScalar.h index 897fce271f..b9bef49d02 100644 --- a/src/function/FunctionOfScalar.h +++ b/src/function/FunctionOfScalar.h @@ -54,12 +54,13 @@ class FunctionOfScalar : public Function { template void FunctionOfScalar::registerKeywords(Keywords& keys) { - Function::registerKeywords(keys); keys.use("ARG"); std::string name = keys.getDisplayName(); + Function::registerKeywords(keys); std::string name = keys.getDisplayName(); std::size_t und=name.find("_SCALAR"); keys.setDisplayName( name.substr(0,und) ); keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); T tfunc; tfunc.registerKeywords( keys ); if( keys.getDisplayName()=="SUM" ) keys.setValueDescription("scalar","the sum of all the input arguments"); else if( keys.getDisplayName()=="MEAN" ) keys.setValueDescription("scalar","the mean of all the input arguments"); + else if( keys.getDisplayName()=="EVALUATE_FUNCTION_FROM_GRID" ) keys.addInputKeyword("compulsory","ARG","scalar/grid",""); } template diff --git a/src/function/FunctionOfVector.h b/src/function/FunctionOfVector.h index 9460f10258..dafebfed4a 100644 --- a/src/function/FunctionOfVector.h +++ b/src/function/FunctionOfVector.h @@ -74,8 +74,9 @@ class FunctionOfVector : public ActionWithVector { template void FunctionOfVector::registerKeywords(Keywords& keys ) { - Action::registerKeywords(keys); ActionWithValue::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); keys.use("ARG"); + Action::registerKeywords(keys); ActionWithValue::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); std::string name = keys.getDisplayName(); std::size_t und=name.find("_VECTOR"); keys.setDisplayName( name.substr(0,und) ); + keys.addInputKeyword("compulsory","ARG","scalar/vector","the labels of the scalar and vector that on which the function is being calculated elementwise"); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); T tfunc; tfunc.registerKeywords( keys ); diff --git a/src/function/FunctionShortcut.h b/src/function/FunctionShortcut.h index 7a730dbddb..9dc006dbbf 100644 --- a/src/function/FunctionShortcut.h +++ b/src/function/FunctionShortcut.h @@ -46,10 +46,12 @@ class FunctionShortcut : public ActionShortcut { template void FunctionShortcut::registerKeywords(Keywords& keys ) { ActionShortcut::registerKeywords( keys ); - keys.add("numbered","ARG","the input to this function"); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); keys.addActionNameSuffix("_SCALAR"); keys.addActionNameSuffix("_VECTOR"); keys.addActionNameSuffix("_MATRIX"); keys.addActionNameSuffix("_GRID"); T tfunc; tfunc.registerKeywords( keys ); + if( keys.getDisplayName()=="SUM" || keys.getDisplayName()=="CUSTOM" || keys.getDisplayName()=="MATHEVAL" ) { + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix/grid","the values input to this function"); + } else keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the values input to this function"); } template diff --git a/src/function/LocalEnsemble.cpp b/src/function/LocalEnsemble.cpp index f417f3fb8c..61a80a9794 100644 --- a/src/function/LocalEnsemble.cpp +++ b/src/function/LocalEnsemble.cpp @@ -90,7 +90,7 @@ PLUMED_REGISTER_ACTION(LocalEnsemble,"LOCALENSEMBLE") void LocalEnsemble::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("numbered","ARG","scalar","the labels of the actions that you want to use"); keys.add("compulsory","NUM","the number of local replicas"); useCustomisableComponents(keys); } diff --git a/src/function/Stats.cpp b/src/function/Stats.cpp index d68378d965..f3876c6aac 100644 --- a/src/function/Stats.cpp +++ b/src/function/Stats.cpp @@ -71,8 +71,7 @@ PLUMED_REGISTER_ACTION(Stats,"STATS") void Stats::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); - keys.add("optional","PARARG","the input for this action is the scalar output from one or more other actions without derivatives."); + keys.addInputKeyword("optional","PARARG","scalar","the input for this action is the scalar output from one or more other actions without derivatives."); keys.add("optional","PARAMETERS","the parameters of the arguments in your function"); keys.addFlag("SQDEVSUM",false,"calculates only SQDEVSUM"); keys.addFlag("SQDEV",false,"calculates and store the SQDEV as components"); diff --git a/src/funnel/Funnel.cpp b/src/funnel/Funnel.cpp index 7a9c83b851..0f0594050c 100644 --- a/src/funnel/Funnel.cpp +++ b/src/funnel/Funnel.cpp @@ -144,7 +144,6 @@ PLUMED_REGISTER_ACTION(Funnel,"FUNNEL") void Funnel::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.addFlag("NOSPLINE",false,"specifies that no spline interpolation is to be used when calculating the energy and forces due to the external potential"); keys.addFlag("SPARSE",false,"specifies that the external potential uses a sparse grid"); keys.addFlag("SPHERE",false, "The Funnel potential including the binding site can be spherical instead of a cone"); diff --git a/src/generic/Accumulate.cpp b/src/generic/Accumulate.cpp index 8730b7f65c..efa093db43 100644 --- a/src/generic/Accumulate.cpp +++ b/src/generic/Accumulate.cpp @@ -62,7 +62,8 @@ PLUMED_REGISTER_ACTION(Accumulate,"ACCUMULATE") void Accumulate::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - keys.use("ARG"); keys.use("UPDATE_FROM"); keys.use("UPDATE_UNTIL"); + keys.use("UPDATE_FROM"); keys.use("UPDATE_UNTIL"); + keys.addInputKeyword("compulsory","ARG","scalar/grid","the label of the argument that is being added to on each timestep"); keys.add("compulsory","STRIDE","1","the frequency with which the data should be collected and added to the quantity being averaged"); keys.add("compulsory","CLEAR","0","the frequency with which to clear all the accumulated data. The default value " "of 0 implies that all the data will be used and that the grid will never be cleared"); diff --git a/src/generic/Average.cpp b/src/generic/Average.cpp index 7aefebc604..9fa22b7016 100644 --- a/src/generic/Average.cpp +++ b/src/generic/Average.cpp @@ -100,7 +100,7 @@ PLUMED_REGISTER_ACTION(Average,"AVERAGE") void Average::registerKeywords( Keywords& keys ) { ActionShortcut::registerKeywords( keys ); - keys.add("compulsory","ARG","the quantity that is being averaged"); + keys.addInputKeyword("compulsory","ARG","scalar/grid","the quantity that is being averaged"); keys.add("optional","LOGWEIGHTS","the logarithm of the quantity to use as the weights when calculating averages"); keys.add("compulsory","STRIDE","1","the frequency with which to store data for averaging"); keys.add("compulsory","CLEAR","0","the frequency with whihc to clear the data that is being averaged"); diff --git a/src/generic/Collect.cpp b/src/generic/Collect.cpp index 39660eaa08..5e7221e5a9 100644 --- a/src/generic/Collect.cpp +++ b/src/generic/Collect.cpp @@ -62,7 +62,8 @@ PLUMED_REGISTER_ACTION(Collect,"COLLECT") void Collect::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - keys.use("ARG"); keys.use("UPDATE_FROM"); keys.use("UPDATE_UNTIL"); + keys.use("UPDATE_FROM"); keys.use("UPDATE_UNTIL"); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the label of the value whose time series is being stored for later analysis"); keys.add("compulsory","STRIDE","1","the frequency with which the data should be collected and added to the quantity being averaged"); keys.add("compulsory","CLEAR","0","the frequency with which to clear all the accumulated data. The default value " "of 0 implies that all the data will be used and that the grid will never be cleared"); diff --git a/src/generic/Committor.cpp b/src/generic/Committor.cpp index 20ed416c21..6944f57ec8 100644 --- a/src/generic/Committor.cpp +++ b/src/generic/Committor.cpp @@ -80,7 +80,7 @@ void Committor::registerKeywords( Keywords& keys ) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values which is being used to define the committor surface"); keys.add("numbered", "BASIN_LL","List of lower limits for basin #"); keys.add("numbered", "BASIN_UL","List of upper limits for basin #"); keys.reset_style("BASIN_LL","compulsory"); keys.reset_style("BASIN_UL","compulsory"); diff --git a/src/generic/CreateMask.cpp b/src/generic/CreateMask.cpp index b94096f669..ae5bcdd919 100644 --- a/src/generic/CreateMask.cpp +++ b/src/generic/CreateMask.cpp @@ -56,7 +56,8 @@ PLUMED_REGISTER_ACTION(CreateMask,"CREATE_MASK") void CreateMask::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","vector","the label of the vector that you would like to construct a mask for"); keys.add("compulsory","TYPE","the way the zeros are supposed to be set"); keys.add("compulsory","NZEROS","the number of zeros that you want to put in the mask"); keys.add("optional","SEED","the seed to use for the random number generator"); diff --git a/src/generic/DumpAtoms.cpp b/src/generic/DumpAtoms.cpp index 3db26f4a9f..2ee63cd5ba 100644 --- a/src/generic/DumpAtoms.cpp +++ b/src/generic/DumpAtoms.cpp @@ -152,7 +152,8 @@ void DumpAtoms::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); ActionAtomistic::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("optional","ARG","vector","the labels of vectors that should be output in the xyz file. The number of elements in the vector should equal the number of atoms output"); keys.add("compulsory","STRIDE","1","the frequency with which the atoms should be output"); keys.add("atoms", "ATOMS", "the atom indices whose positions you would like to print out"); keys.add("compulsory", "FILE", "file on which to output coordinates; extension is automatically detected"); diff --git a/src/generic/DumpDerivatives.cpp b/src/generic/DumpDerivatives.cpp index e359bcf057..ddd91e9277 100644 --- a/src/generic/DumpDerivatives.cpp +++ b/src/generic/DumpDerivatives.cpp @@ -74,7 +74,7 @@ void DumpDerivatives::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values whose derivatives should be output"); keys.add("compulsory","STRIDE","1","the frequency with which the derivatives should be output"); keys.add("compulsory","FILE","the name of the file on which to output the derivatives"); keys.add("compulsory","FMT","%15.10f","the format with which the derivatives should be output"); diff --git a/src/generic/DumpForces.cpp b/src/generic/DumpForces.cpp index 8fc1411f63..36c562dace 100644 --- a/src/generic/DumpForces.cpp +++ b/src/generic/DumpForces.cpp @@ -72,7 +72,7 @@ void DumpForces::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values whose forces should be output"); keys.add("compulsory","STRIDE","1","the frequency with which the forces should be output"); keys.add("compulsory","FILE","the name of the file on which to output the forces"); keys.add("compulsory","FMT","%15.10f","the format with which the derivatives should be output"); diff --git a/src/generic/DumpPDB.cpp b/src/generic/DumpPDB.cpp index 7ab771d0ee..714b43aca1 100644 --- a/src/generic/DumpPDB.cpp +++ b/src/generic/DumpPDB.cpp @@ -67,7 +67,8 @@ PLUMED_REGISTER_ACTION(DumpPDB,"DUMPPDB") void DumpPDB::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("optional","ARG","vector/matrix","the values that are being output in the PDB file"); keys.add("optional","ATOMS","value containing positions of atoms that should be output"); keys.add("compulsory","STRIDE","0","the frequency with which the atoms should be output"); keys.add("compulsory","FILE","the name of the file on which to output these quantities"); diff --git a/src/generic/DumpProjections.cpp b/src/generic/DumpProjections.cpp index 87d02d7a18..d3a139fef9 100644 --- a/src/generic/DumpProjections.cpp +++ b/src/generic/DumpProjections.cpp @@ -70,7 +70,7 @@ void DumpProjections::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values whose gradients should be outpu"); keys.add("compulsory","STRIDE","1","the frequency with which the derivatives should be output"); keys.add("compulsory","FILE","the name of the file on which to output the derivatives"); keys.add("compulsory","FMT","%15.10f","the format with which the derivatives should be output"); diff --git a/src/generic/DumpVector.cpp b/src/generic/DumpVector.cpp index 51f3b7a963..8985d09211 100644 --- a/src/generic/DumpVector.cpp +++ b/src/generic/DumpVector.cpp @@ -61,7 +61,8 @@ PLUMED_REGISTER_ACTION(DumpVector,"DUMPVECTOR") void DumpVector::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","vector/matrix","the labels of vectors/matrices that should be output in the file"); keys.add("compulsory","STRIDE","0","the frequency with which the grid should be output to the file."); keys.add("compulsory","FILE","density","the file on which to write the vetors"); keys.add("optional","FMT","the format that should be used to output real numbers"); diff --git a/src/generic/GatherReplicas.cpp b/src/generic/GatherReplicas.cpp index fa093e303b..6575312f8f 100644 --- a/src/generic/GatherReplicas.cpp +++ b/src/generic/GatherReplicas.cpp @@ -54,7 +54,7 @@ PLUMED_REGISTER_ACTION(GatherReplicas,"GATHER_REPLICAS") void GatherReplicas::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); - keys.remove("ARG"); keys.add("compulsory","ARG","the argument from the various replicas that you would like to gather"); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix/grid","the argument from the various replicas that you would like to gather"); keys.addOutputComponent("rep","default","scalar/vector/matrix/grid","the input arguments for each of the replicas"); } diff --git a/src/generic/PDB2Constant.cpp b/src/generic/PDB2Constant.cpp index b587ec03c9..fd58a312b6 100644 --- a/src/generic/PDB2Constant.cpp +++ b/src/generic/PDB2Constant.cpp @@ -50,7 +50,7 @@ void PDB2Constant::registerKeywords(Keywords& keys) { keys.add("compulsory","REFERENCE","a file in pdb format containing the reference structure"); keys.add("compulsory","NUMBER","0","if there are multiple structures in the pdb file you can specify that you want the RMSD from a specific structure by specifying its place in the file here. If NUMBER=0 then the RMSD from all structures are computed"); keys.addFlag("NOARGS",false,"the arguments that are being read from the PDB file are not in the plumed input"); - keys.add("optional","ARG","read this single argument from the input rather than the atomic structure"); + keys.addInputKeyword("optional","ARG","scalar/vector","read this single argument from the input rather than the atomic structure"); keys.setValueDescription("scalar/vector/matrix","a value that is constructed from the information in the PDB file"); keys.needsAction("CONSTANT"); } diff --git a/src/generic/Print.cpp b/src/generic/Print.cpp index 4f3ca3bfdf..603c633bdc 100644 --- a/src/generic/Print.cpp +++ b/src/generic/Print.cpp @@ -99,7 +99,7 @@ void Print::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the labels of the values that you would like to print to the file"); keys.add("compulsory","STRIDE","1","the frequency with which the quantities of interest should be output"); keys.add("optional","FILE","the name of the file on which to output these quantities"); keys.add("optional","FMT","the format that should be used to output real numbers"); diff --git a/src/generic/PrintNDX.cpp b/src/generic/PrintNDX.cpp index afe4a25116..ce2d533fe5 100644 --- a/src/generic/PrintNDX.cpp +++ b/src/generic/PrintNDX.cpp @@ -66,7 +66,7 @@ void PrintNDX::registerKeywords(Keywords& keys) { ActionPilot::registerKeywords(keys); ActionAtomistic::registerKeywords( keys ); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("optional","ARG","vector","the labels of vectors that should be used when printind the NDX file"); keys.add("atoms","ATOMS","the list of atoms that have the corresponding arguments"); keys.add("compulsory","STRIDE","1","the frequency with which the quantities of interest should be output"); keys.add("optional","FILE","the name of the file on which to output these quantities"); diff --git a/src/generic/UpdateIf.cpp b/src/generic/UpdateIf.cpp index a7abb36d04..331e572364 100644 --- a/src/generic/UpdateIf.cpp +++ b/src/generic/UpdateIf.cpp @@ -100,7 +100,7 @@ void UpdateIf::registerKeywords(Keywords& keys) { Action::registerKeywords(keys); ActionPilot::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of values that should be used to make the decision on whether to update or not"); keys.add("compulsory","STRIDE","1","the frequency with which the quantities of interest should be output"); keys.addFlag("END",false,"end"); keys.add("optional","LESS_THAN","upper bound"); diff --git a/src/gridtools/DumpGrid.cpp b/src/gridtools/DumpGrid.cpp index d6eedd3277..791150e4be 100644 --- a/src/gridtools/DumpGrid.cpp +++ b/src/gridtools/DumpGrid.cpp @@ -198,7 +198,8 @@ PLUMED_REGISTER_ACTION(DumpGrid,"DUMPGRID") void DumpGrid::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","grid","the label for the grid that you would like to output"); keys.add("optional","GRID","the grid you would like to print (can also use ARG for specifying what is being printed)"); keys.add("compulsory","STRIDE","0","the frequency with which the grid should be output to the file. Default of zero means dump at end of calculation"); keys.add("compulsory","FILE","density","the file on which to write the grid."); diff --git a/src/gridtools/EvaluateFunctionOnGrid.cpp b/src/gridtools/EvaluateFunctionOnGrid.cpp index 9add313e8f..aaf0b29a76 100644 --- a/src/gridtools/EvaluateFunctionOnGrid.cpp +++ b/src/gridtools/EvaluateFunctionOnGrid.cpp @@ -71,8 +71,8 @@ PLUMED_REGISTER_ACTION(VectorEvalGrid,"EVALUATE_FUNCTION_FROM_GRID_VECTOR") void EvaluateFunctionOnGrid::registerKeywords(Keywords& keys ) { ActionShortcut::registerKeywords( keys ); - keys.add("compulsory","GRID","the name of the grid that we are using to evaluate the function"); - keys.add("optional","ARG","the arguments that you would like to use when evaluating the function. If not specified these are determined from the names of the grid dimensions"); + keys.addInputKeyword("compulsory","GRID","grid","the name of the grid that we are using to evaluate the function"); + keys.addInputKeyword("optional","ARG","scalar/vector","the arguments that you would like to use when evaluating the function. If not specified these are determined from the names of the grid dimensions"); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); EvaluateGridFunction ii; ii.registerKeywords( keys ); keys.addActionNameSuffix("_SCALAR"); keys.addActionNameSuffix("_VECTOR"); diff --git a/src/gridtools/FindGridOptimum.cpp b/src/gridtools/FindGridOptimum.cpp index 429120c160..a2d946a40b 100644 --- a/src/gridtools/FindGridOptimum.cpp +++ b/src/gridtools/FindGridOptimum.cpp @@ -67,7 +67,8 @@ PLUMED_REGISTER_ACTION(FindGridOptimum,"FIND_GRID_MAXIMUM") PLUMED_REGISTER_ACTION(FindGridOptimum,"FIND_GRID_MINIMUM") void FindGridOptimum::registerKeywords( Keywords& keys ) { - ActionWithGrid::registerKeywords( keys ); keys.use("ARG"); + ActionWithGrid::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","grid","the label for the function on the grid that you would like to find the optimum in"); keys.addFlag("NOINTERPOL",false,"do not interpolate the function when finding the optimum"); keys.add("compulsory","CGTOL","1E-4","the tolerance for the conjugate gradient optimization"); keys.addOutputComponent("optval","default","scalar","the value of the function at the optimum"); diff --git a/src/gridtools/FunctionOfGrid.h b/src/gridtools/FunctionOfGrid.h index 33bebe6d7e..efa417408c 100644 --- a/src/gridtools/FunctionOfGrid.h +++ b/src/gridtools/FunctionOfGrid.h @@ -58,16 +58,19 @@ class FunctionOfGrid : public ActionWithGrid { template void FunctionOfGrid::registerKeywords(Keywords& keys ) { - ActionWithGrid::registerKeywords(keys); keys.use("ARG"); std::string name = keys.getDisplayName(); + ActionWithGrid::registerKeywords(keys); std::string name = keys.getDisplayName(); std::size_t und=name.find("_GRID"); keys.setDisplayName( name.substr(0,und) ); keys.reserve("compulsory","PERIODIC","if the output of your function is periodic then you should specify the periodicity of the function. If the output is not periodic you must state this using PERIODIC=NO"); T tfunc; tfunc.registerKeywords( keys ); if( typeid(tfunc)==typeid(function::Custom()) ) keys.add("hidden","NO_ACTION_LOG","suppresses printing from action on the log"); if( keys.getDisplayName()=="INTEGRATE") { keys.setValueDescription("scalar","the numerical integral of the input function over its whole domain"); + keys.addInputKeyword("compulsory","ARG","grid","the label of the function on a grid that is being integrated"); } else if( keys.getDisplayName()=="SUM") { keys.setValueDescription("scalar","the sum of the value of the function over all the grid points where it has been evaluated"); + keys.addInputKeyword("compulsory","ARG","grid","the label of the function on a grid from which we are computing a sum"); } else if( keys.outputComponentExists(".#!value") ) { keys.setValueDescription("grid","the grid obtained by doing an element-wise application of " + keys.getOutputComponentDescription(".#!value") + " to the input grid"); + keys.addInputKeyword("compulsory","ARG","scalar/grid","the labels of the scalars and functions on a grid that we are using to compute the required function"); } } diff --git a/src/gridtools/Histogram.cpp b/src/gridtools/Histogram.cpp index 614fe73df4..b8b1d15a4f 100644 --- a/src/gridtools/Histogram.cpp +++ b/src/gridtools/Histogram.cpp @@ -204,7 +204,7 @@ PLUMED_REGISTER_ACTION(Histogram,"HISTOGRAM") void Histogram::registerKeywords( Keywords& keys ) { ActionShortcut::registerKeywords( keys ); keys.use("UPDATE_FROM"); keys.use("UPDATE_UNTIL"); keys.add("compulsory","NORMALIZATION","ndata","This controls how the data is normalized it can be set equal to true, false or ndata. See above for an explanation"); - keys.add("optional","ARG","the quantity that is being averaged"); + keys.addInputKeyword("optional","ARG","scalar/vector/matrix","the quantities that are being used to construct the histogram"); keys.add("optional","DATA","an alternative to the ARG keyword"); keys.add("compulsory","GRID_MIN","auto","the lower bounds for the grid"); keys.add("compulsory","GRID_MAX","auto","the upper bounds for the grid"); diff --git a/src/gridtools/InterpolateGrid.cpp b/src/gridtools/InterpolateGrid.cpp index bab2a08477..603da9c138 100644 --- a/src/gridtools/InterpolateGrid.cpp +++ b/src/gridtools/InterpolateGrid.cpp @@ -75,7 +75,8 @@ PLUMED_REGISTER_ACTION(InterpolateGrid,"INTERPOLATE_GRID") void InterpolateGrid::registerKeywords( Keywords& keys ) { ActionWithGrid::registerKeywords( keys ); - keys.add("optional","GRID_BIN","the number of bins for the grid"); keys.use("ARG"); + keys.add("optional","GRID_BIN","the number of bins for the grid"); + keys.addInputKeyword("compulsory","ARG","grid","the label for function on the grid that you would like to interpolate"); keys.add("optional","GRID_SPACING","the approximate grid spacing (to be used as an alternative or together with GRID_BIN)"); keys.addFlag("MIDPOINTS",false,"interpolate the values of the function at the midpoints of the grid coordinates of the input grid"); EvaluateGridFunction ii; ii.registerKeywords( keys ); diff --git a/src/gridtools/KDE.cpp b/src/gridtools/KDE.cpp index b9f1d5011f..90d499275d 100644 --- a/src/gridtools/KDE.cpp +++ b/src/gridtools/KDE.cpp @@ -94,7 +94,8 @@ PLUMED_REGISTER_ACTION(KDE,"KDE") PLUMED_REGISTER_ACTION(KDE,"SPHERICAL_KDE") void KDE::registerKeywords( Keywords& keys ) { - ActionWithGrid::registerKeywords( keys ); keys.use("ARG"); + ActionWithGrid::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the label for the value that should be used to construct the histogram"); keys.add("optional","HEIGHTS","this keyword takes the label of an action that calculates a vector of values. The elements of this vector " "are used as weights for the Gaussians."); keys.add("optional","VOLUMES","this keyword take the label of an action that calculates a vector of values. The elements of this vector " diff --git a/src/isdb/Caliber.cpp b/src/isdb/Caliber.cpp index ade29b488b..6794060d04 100644 --- a/src/isdb/Caliber.cpp +++ b/src/isdb/Caliber.cpp @@ -124,7 +124,6 @@ PLUMED_REGISTER_ACTION(Caliber,"CALIBER") void Caliber::registerKeywords( Keywords& keys ) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.addFlag("NOENSEMBLE",false,"don't perform any replica-averaging"); keys.add("compulsory","FILE","the name of the file containing the time-resolved values"); keys.add("compulsory","KAPPA","a force constant, this can be use to scale a constant estimated on-the-fly using AVERAGING"); diff --git a/src/isdb/EMMI.cpp b/src/isdb/EMMI.cpp index 01187721d4..699b5cfad1 100644 --- a/src/isdb/EMMI.cpp +++ b/src/isdb/EMMI.cpp @@ -389,7 +389,7 @@ void EMMI::registerKeywords( Keywords& keys ) { ActionAtomistic::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); - keys.use("ARG"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the values from which the function is calculated"); keys.add("atoms","ATOMS","atoms for which we calculate the density map, typically all heavy atoms"); keys.addFlag("NOPBC",false,"ignore the periodic boundary conditions when calculating distances"); keys.add("compulsory","GMM_FILE","file with the parameters of the GMM components"); diff --git a/src/isdb/Metainference.cpp b/src/isdb/Metainference.cpp index 422df13526..7ccd93b60f 100644 --- a/src/isdb/Metainference.cpp +++ b/src/isdb/Metainference.cpp @@ -286,8 +286,7 @@ PLUMED_REGISTER_ACTION(Metainference,"METAINFERENCE") void Metainference::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); - keys.add("optional","PARARG","reference values for the experimental data, these can be provided as arguments without derivatives"); + keys.addInputKeyword("optional","PARARG","scalar","reference values for the experimental data, these can be provided as arguments without derivatives"); keys.add("optional","PARAMETERS","reference values for the experimental data"); keys.addFlag("NOENSEMBLE",false,"don't perform any replica-averaging"); keys.addFlag("REWEIGHT",false,"simple REWEIGHT using the latest ARG as energy"); diff --git a/src/isdb/MetainferenceBase.cpp b/src/isdb/MetainferenceBase.cpp index 39230165bd..6059b48f5c 100644 --- a/src/isdb/MetainferenceBase.cpp +++ b/src/isdb/MetainferenceBase.cpp @@ -36,7 +36,7 @@ void MetainferenceBase::registerKeywords( Keywords& keys ) { ActionAtomistic::registerKeywords(keys); ActionWithValue::registerKeywords(keys); ActionWithArguments::registerKeywords(keys); - keys.use("ARG"); + keys.addInputKeyword("optional","ARG","scalar","the labels of the values from which the function is calculated"); keys.addFlag("DOSCORE",false,"activate metainference"); keys.addFlag("NOENSEMBLE",false,"don't perform any replica-averaging"); keys.addFlag("REWEIGHT",false,"simple REWEIGHT using the ARG as energy"); diff --git a/src/isdb/Rescale.cpp b/src/isdb/Rescale.cpp index 6963c5728e..750463398e 100644 --- a/src/isdb/Rescale.cpp +++ b/src/isdb/Rescale.cpp @@ -163,7 +163,6 @@ PLUMED_REGISTER_ACTION(Rescale,"RESCALE") void Rescale::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","TEMP","temperature"); keys.add("compulsory","SELECTOR", "name of the SELECTOR used for rescaling"); keys.add("compulsory","MAX_RESCALE","maximum values for rescaling"); diff --git a/src/isdb/Select.cpp b/src/isdb/Select.cpp index f271c873d8..f7afb8d0e6 100644 --- a/src/isdb/Select.cpp +++ b/src/isdb/Select.cpp @@ -80,7 +80,6 @@ PLUMED_REGISTER_ACTION(Select,"SELECT") void Select::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","SELECTOR","name of the variable used to select"); keys.setValueDescription("scalar","the value of the selected argument"); } diff --git a/src/landmarks/CollectFrames.cpp b/src/landmarks/CollectFrames.cpp index 961dbf18f0..8ef6c8a8dc 100644 --- a/src/landmarks/CollectFrames.cpp +++ b/src/landmarks/CollectFrames.cpp @@ -49,10 +49,10 @@ PLUMED_REGISTER_ACTION(CollectFrames,"COLLECT_FRAMES") void CollectFrames::registerKeywords( Keywords& keys ) { ActionShortcut::registerKeywords( keys ); + keys.addInputKeyword("optional","ARG","scalar/vector","the labels of the values whose time series you would like to collect for later analysis"); keys.add("compulsory","STRIDE","1","the frequency with which data should be stored for analysis. By default data is collected on every step"); keys.add("compulsory","CLEAR","0","the frequency with which data should all be deleted and restarted"); keys.add("compulsory","ALIGN","OPTIMAL","if storing atoms how would you like the alignment to be done can be SIMPLE/OPTIMAL"); - keys.add("optional","ARG","the arguments you would like to collect"); keys.add("optional","ATOMS","list of atomic positions that you would like to collect and store for later analysis"); keys.add("optional","LOGWEIGHTS","list of actions that calculates log weights that should be used to weight configurations when calculating averages"); keys.addOutputComponent("data","default","matrix","the data that is being collected by this action"); diff --git a/src/logmfd/LogMFD.cpp b/src/logmfd/LogMFD.cpp index 754dcd2fd0..9748eef0b6 100644 --- a/src/logmfd/LogMFD.cpp +++ b/src/logmfd/LogMFD.cpp @@ -461,7 +461,6 @@ PLUMED_REGISTER_ACTION(LogMFD,"LOGMFD") */ void LogMFD::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","INTERVAL", "Period of MD steps (N_m) to update fictitious dynamical variables." ); keys.add("compulsory","DELTA_T", diff --git a/src/mapping/GeometricPath.cpp b/src/mapping/GeometricPath.cpp index 3ef9d0c0d4..578ebe3ec5 100644 --- a/src/mapping/GeometricPath.cpp +++ b/src/mapping/GeometricPath.cpp @@ -50,9 +50,9 @@ class GeometricPath : public ActionWithVector { PLUMED_REGISTER_ACTION(GeometricPath,"GEOMETRIC_PATH") void GeometricPath::registerKeywords(Keywords& keys) { - ActionWithVector::registerKeywords(keys); keys.use("ARG"); + ActionWithVector::registerKeywords(keys); PathProjectionCalculator::registerKeywords(keys); - keys.add("compulsory","PROPERTY","the coordinates we are projecting these points onto"); + keys.addInputKeyword("compulsory","PROPERTY","vector","the label of a value that contains the coordinates we are projecting these points onto"); keys.addOutputComponent("s","default","scalar","the position on the path"); keys.addOutputComponent("z","default","scalar","the distance from the path"); keys.needsAction("GEOMETRIC_PATH"); keys.needsAction("PDB2CONSTANT"); diff --git a/src/mapping/PCAVars.cpp b/src/mapping/PCAVars.cpp index b3fe022e21..099bc96b9e 100644 --- a/src/mapping/PCAVars.cpp +++ b/src/mapping/PCAVars.cpp @@ -181,7 +181,7 @@ void PCAVars::registerKeywords( Keywords& keys ) { keys.add("compulsory","TYPE","OPTIMAL-FAST","the manner in which distances are calculated. More information on the different " "metrics that are available in PLUMED can be found in the section of the manual on " "\\ref dists"); - keys.add("optional","ARG","if there are arguments to be used specify them here"); + keys.addInputKeyword("optional","ARG","scalar/vector","if there are arguments to be used specify them here"); keys.addFlag("NOPBC",false,"do not use periodic boundary conditions when computing this quantity"); keys.addOutputComponent("eig","default","vector","the projections on the eigenvalues"); keys.addOutputComponent("residual","default","scalar","the residual distance that is not projected on any of the eigenvalues"); diff --git a/src/mapping/Path.cpp b/src/mapping/Path.cpp index c60f98dd5a..0d3f23cea5 100644 --- a/src/mapping/Path.cpp +++ b/src/mapping/Path.cpp @@ -223,7 +223,7 @@ void Path::registerInputFileKeywords( Keywords& keys ) { keys.add("compulsory","TYPE","OPTIMAL-FAST","the manner in which distances are calculated. More information on the different " "metrics that are available in PLUMED can be found in the section of the manual on " "\\ref dists"); - keys.add("optional","ARG","the list of arguments you would like to use in your definition of the path"); + keys.addInputKeyword("optional","ARG","scalar","the list of arguments you would like to use in your definition of the path"); keys.add("optional","COEFFICIENTS","the coefficients of the displacements along each argument that should be used when calculating the euclidean distance"); keys.addFlag("NOPBC",false,"ignore the periodic boundary conditions when calculating distances"); keys.addFlag("NOSPATH",false,"do not calculate the spath CV"); diff --git a/src/mapping/PathDisplacements.cpp b/src/mapping/PathDisplacements.cpp index d4ec2eea0a..f6609175c7 100644 --- a/src/mapping/PathDisplacements.cpp +++ b/src/mapping/PathDisplacements.cpp @@ -60,7 +60,7 @@ PLUMED_REGISTER_ACTION(PathDisplacements,"AVERAGE_PATH_DISPLACEMENT") void PathDisplacements::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionPilot::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); PathProjectionCalculator::registerKeywords( keys ); + ActionWithArguments::registerKeywords( keys ); PathProjectionCalculator::registerKeywords( keys ); keys.add("compulsory","STRIDE","1","the frequency with which the average displacements should be collected and added to the average displacements"); keys.add("compulsory","HALFLIFE","-1","the number of MD steps after which a previously measured path distance weighs only 50 percent in the average. This option may increase convergence by allowing to forget the memory of a bad initial guess path. The default is to set this to infinity"); keys.add("compulsory","CLEAR","0","the frequency with which to clear all the accumulated data. The default value " diff --git a/src/mapping/PathProjectionCalculator.cpp b/src/mapping/PathProjectionCalculator.cpp index fe22867246..606d319bbb 100644 --- a/src/mapping/PathProjectionCalculator.cpp +++ b/src/mapping/PathProjectionCalculator.cpp @@ -30,9 +30,10 @@ namespace PLMD { namespace mapping { void PathProjectionCalculator::registerKeywords(Keywords& keys) { + keys.addInputKeyword("compulsory","ARG","matrix","the labels of the matrix that contains the vectors of displacements from each frame in the path"); keys.add("compulsory","METRIC","the method to use for computing the displacement vectors between the reference frames"); keys.add("compulsory","METRIC_COMPONENT","if the final action in your metric contains multiple components this keyword is used to specify the component that should be used"); - keys.add("compulsory","REFERENCE","labels for actions that contain reference coordinates for each point on the path"); + keys.addInputKeyword("compulsory","REFERENCE","vector","labels for actions that contain reference coordinates for each point on the path"); } PathProjectionCalculator::PathProjectionCalculator( Action* act ): diff --git a/src/matrixtools/Determinent.cpp b/src/matrixtools/Determinent.cpp index c673b66dfd..5a2c023da8 100644 --- a/src/matrixtools/Determinent.cpp +++ b/src/matrixtools/Determinent.cpp @@ -44,7 +44,7 @@ PLUMED_REGISTER_ACTION(Determinant,"DETERMINANT") void Determinant::registerKeywords( Keywords& keys ) { ActionShortcut::registerKeywords(keys); - keys.add("compulsory","ARG","The matrix that we are calculating the determinant for"); + keys.addInputKeyword("compulsory","ARG","matrix","The matrix that we are calculating the determinant for"); keys.setValueDescription("scalar","the determinant of the matrix"); } diff --git a/src/matrixtools/MatrixOperationBase.cpp b/src/matrixtools/MatrixOperationBase.cpp index e2b2a4d7b0..ce719eab53 100644 --- a/src/matrixtools/MatrixOperationBase.cpp +++ b/src/matrixtools/MatrixOperationBase.cpp @@ -26,7 +26,8 @@ namespace matrixtools { void MatrixOperationBase::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - keys.use("ARG"); keys.remove("NUMERICAL_DERIVATIVES"); + keys.addInputKeyword("compulsory","ARG","matrix","the input matrix"); + keys.remove("NUMERICAL_DERIVATIVES"); keys.add("optional","MATRIX","the input matrix (can use ARG instead)"); } diff --git a/src/matrixtools/MatrixTimesMatrix.cpp b/src/matrixtools/MatrixTimesMatrix.cpp index 6ae5590fcd..8840354dc1 100644 --- a/src/matrixtools/MatrixTimesMatrix.cpp +++ b/src/matrixtools/MatrixTimesMatrix.cpp @@ -64,7 +64,8 @@ PLUMED_REGISTER_ACTION(MatrixTimesMatrix,"MATRIX_PRODUCT") PLUMED_REGISTER_ACTION(MatrixTimesMatrix,"DISSIMILARITIES") void MatrixTimesMatrix::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","matrix","the label of the two matrices from which the product is calculated"); keys.addFlag("SQUARED",false,"calculate the squares of the dissimilarities (this option cannot be used with MATRIX_PRODUCT)"); keys.setValueDescription("matrix","the product of the two input matrices"); } diff --git a/src/matrixtools/MatrixTimesVector.cpp b/src/matrixtools/MatrixTimesVector.cpp index 2ef142dac0..fe8c3ed498 100644 --- a/src/matrixtools/MatrixTimesVector.cpp +++ b/src/matrixtools/MatrixTimesVector.cpp @@ -56,7 +56,8 @@ class MatrixTimesVector : public ActionWithMatrix { PLUMED_REGISTER_ACTION(MatrixTimesVector,"MATRIX_VECTOR_PRODUCT") void MatrixTimesVector::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","matrix/vector/scalar","the label for the matrix and the vector/scalar that are being multiplied. Alternatively, you can provide labels for multiple matrices and a single vector or labels for a single matrix and multiple vectors. In these cases multiple matrix vector products will be computed."); keys.setValueDescription("vector","the vector that is obtained by taking the product between the matrix and the vector that were input"); ActionWithValue::useCustomisableComponents(keys); } diff --git a/src/matrixtools/OuterProduct.cpp b/src/matrixtools/OuterProduct.cpp index 8fcd804f42..518927003a 100644 --- a/src/matrixtools/OuterProduct.cpp +++ b/src/matrixtools/OuterProduct.cpp @@ -55,7 +55,8 @@ class OuterProduct : public ActionWithMatrix { PLUMED_REGISTER_ACTION(OuterProduct,"OUTER_PRODUCT") void OuterProduct::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","vector","the labels of the two vectors from which the outer product is being computed"); keys.add("compulsory","FUNC","x*y","the function of the input vectors that should be put in the elements of the outer product"); keys.addFlag("ELEMENTS_ON_DIAGONAL_ARE_ZERO",false,"set all diagonal elements to zero"); keys.setValueDescription("matrix","a matrix containing the outer product of the two input vectors that was obtained using the function that was input"); diff --git a/src/matrixtools/TransposeMatrix.cpp b/src/matrixtools/TransposeMatrix.cpp index 1047073262..92b23da488 100644 --- a/src/matrixtools/TransposeMatrix.cpp +++ b/src/matrixtools/TransposeMatrix.cpp @@ -55,6 +55,7 @@ PLUMED_REGISTER_ACTION(TransposeMatrix,"TRANSPOSE") void TransposeMatrix::registerKeywords( Keywords& keys ) { MatrixOperationBase::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","vector/matrix","the label of the vector or matrix that should be transposed"); keys.setValueDescription("vector/matrix","the transpose of the input matrix"); } diff --git a/src/matrixtools/Voronoi.cpp b/src/matrixtools/Voronoi.cpp index 3ac9817e04..a28b074c2c 100644 --- a/src/matrixtools/Voronoi.cpp +++ b/src/matrixtools/Voronoi.cpp @@ -51,7 +51,8 @@ class Voronoi : public ActionWithMatrix { PLUMED_REGISTER_ACTION(Voronoi,"VORONOI") void Voronoi::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords(keys); keys.use("ARG"); + ActionWithMatrix::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","matrix","the distance/adjacency matrix that should be used to perform the voronoi analysis"); keys.setValueDescription("matrix","a matrix in which element ij is equal to one if the ij component of the input matrix is lower than all the ik elements of the matrix where k is not j and zero otherwise"); } diff --git a/src/maze/Optimizer_Bias.cpp b/src/maze/Optimizer_Bias.cpp index c6a39b58a5..1500346ef7 100644 --- a/src/maze/Optimizer_Bias.cpp +++ b/src/maze/Optimizer_Bias.cpp @@ -200,8 +200,6 @@ PLUMED_REGISTER_ACTION(OptimizerBias, "MAZE_OPTIMIZER_BIAS") void OptimizerBias::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); - keys.add( "compulsory", "BIASING_RATE", diff --git a/src/opes/ECVcustom.cpp b/src/opes/ECVcustom.cpp index 8e87f18b5c..62fd80b44d 100644 --- a/src/opes/ECVcustom.cpp +++ b/src/opes/ECVcustom.cpp @@ -87,8 +87,7 @@ PLUMED_REGISTER_ACTION(ECVcustom,"ECV_CUSTOM") void ECVcustom::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.remove("ARG"); - keys.add("compulsory","ARG","the labels of the single ECVs. Delta U_i, in energy units"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the single ECVs. Delta U_i, in energy units"); keys.addFlag("ADD_P0",false,"add the unbiased Boltzmann distribution to the target distribution, to make sure to sample it"); keys.addFlag("DIMENSIONLESS",false,"consider ARG as dimensionless rather than an energy, thus do not multiply it by beta"); keys.add("optional","BARRIER","a guess of the free energy barrier to be overcome (better to stay higher than lower)"); diff --git a/src/opes/ECVlinear.cpp b/src/opes/ECVlinear.cpp index 48650d607d..7375229ea0 100644 --- a/src/opes/ECVlinear.cpp +++ b/src/opes/ECVlinear.cpp @@ -97,8 +97,7 @@ PLUMED_REGISTER_ACTION(ECVlinear,"ECV_LINEAR") void ECVlinear::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.remove("ARG"); - keys.add("compulsory","ARG","the label of the Hamiltonian difference. Delta U"); + keys.addInputKeyword("compulsory","ARG","scalar","the label of the Hamiltonian difference. Delta U"); keys.add("compulsory","LAMBDA","0","the lambda at which the underlying simulation runs"); keys.add("optional","LAMBDA_MIN","( default=0 ) the minimum of the lambda range"); keys.add("optional","LAMBDA_MAX","( default=1 ) the maximum of the lambda range"); diff --git a/src/opes/ECVmultiThermal.cpp b/src/opes/ECVmultiThermal.cpp index 9ab1ce1a49..1d7b22e2a5 100644 --- a/src/opes/ECVmultiThermal.cpp +++ b/src/opes/ECVmultiThermal.cpp @@ -103,8 +103,7 @@ PLUMED_REGISTER_ACTION(ECVmultiThermal,"ECV_MULTITHERMAL") void ECVmultiThermal::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.remove("ARG"); - keys.add("compulsory","ARG","the label of the internal energy of the system. If volume is fixed it is calculated by the ENERGY colvar"); + keys.addInputKeyword("compulsory","ARG","scalar","the label of the internal energy of the system. If volume is fixed it is calculated by the ENERGY colvar"); keys.add("optional","TEMP_MIN","the minimum of the temperature range"); keys.add("optional","TEMP_MAX","the maximum of the temperature range"); keys.add("optional","TEMP_STEPS","the number of steps in temperature"); diff --git a/src/opes/ECVmultiThermalBaric.cpp b/src/opes/ECVmultiThermalBaric.cpp index 059fec82cc..614fea208f 100644 --- a/src/opes/ECVmultiThermalBaric.cpp +++ b/src/opes/ECVmultiThermalBaric.cpp @@ -110,8 +110,7 @@ PLUMED_REGISTER_ACTION(ECVmultiThermalBaric,"ECV_MULTITHERMAL_MULTIBARIC") void ECVmultiThermalBaric::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.remove("ARG"); - keys.add("compulsory","ARG","the labels of the potential energy and of the volume of the system. You can calculate them with ENERGY and VOLUME respectively"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the potential energy and of the volume of the system. You can calculate them with ENERGY and VOLUME respectively"); //temperature keys.add("optional","TEMP_MIN","the minimum of the temperature range"); keys.add("optional","TEMP_MAX","the maximum of the temperature range"); diff --git a/src/opes/ECVumbrellasFile.cpp b/src/opes/ECVumbrellasFile.cpp index 6f1342bdd4..371dc78453 100644 --- a/src/opes/ECVumbrellasFile.cpp +++ b/src/opes/ECVumbrellasFile.cpp @@ -98,7 +98,6 @@ PLUMED_REGISTER_ACTION(ECVumbrellasFile,"ECV_UMBRELLAS_FILE") void ECVumbrellasFile::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","FILE","the name of the file containing the umbrellas"); keys.add("optional","BARRIER","a guess of the free energy barrier to be overcome (better to stay higher than lower)"); keys.addFlag("ADD_P0",false,"add the unbiased Boltzmann distribution to the target distribution, to make sure to sample it"); diff --git a/src/opes/ECVumbrellasLine.cpp b/src/opes/ECVumbrellasLine.cpp index 0ab817422f..dc9e455b8e 100644 --- a/src/opes/ECVumbrellasLine.cpp +++ b/src/opes/ECVumbrellasLine.cpp @@ -99,7 +99,6 @@ PLUMED_REGISTER_ACTION(ECVumbrellasLine,"ECV_UMBRELLAS_LINE") void ECVumbrellasLine::registerKeywords(Keywords& keys) { ExpansionCVs::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","CV_MIN","the minimum of the CV range to be explored"); keys.add("compulsory","CV_MAX","the maximum of the CV range to be explored"); keys.add("compulsory","SIGMA","sigma of the umbrella Gaussians"); diff --git a/src/opes/ExpansionCVs.cpp b/src/opes/ExpansionCVs.cpp index 4d2b3632c9..e2e9c8663a 100644 --- a/src/opes/ExpansionCVs.cpp +++ b/src/opes/ExpansionCVs.cpp @@ -30,6 +30,7 @@ void ExpansionCVs::registerKeywords(Keywords& keys) ActionWithArguments::registerKeywords(keys); ActionWithValue::useCustomisableComponents(keys); keys.add("compulsory","TEMP","-1","temperature. If not specified tries to get it from MD engine"); + keys.addInputKeyword("compulsory","ARG","scalar","the labels of the scalar values that are input to this action"); } ExpansionCVs::ExpansionCVs(const ActionOptions&ao) diff --git a/src/opes/OPESexpanded.cpp b/src/opes/OPESexpanded.cpp index 4d63004b46..ab2c118bec 100644 --- a/src/opes/OPESexpanded.cpp +++ b/src/opes/OPESexpanded.cpp @@ -181,8 +181,7 @@ PLUMED_REGISTER_ACTION(OPESexpanded,"OPES_EXPANDED") void OPESexpanded::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.remove("ARG"); - keys.add("compulsory","ARG","the label of the ECVs that define the expansion. You can use an * to make sure all the output components of the ECVs are used, as in the examples above"); + keys.addInputKeyword("compulsory","ARG","scalar","the label of the ECVs that define the expansion. You can use an * to make sure all the output components of the ECVs are used, as in the examples above"); keys.add("compulsory","PACE","how often the bias is updated"); keys.add("compulsory","OBSERVATION_STEPS","100","number of unbiased initial PACE steps to collect statistics for initialization"); //DeltaFs and state files diff --git a/src/opes/OPESmetad.cpp b/src/opes/OPESmetad.cpp index cea53924cb..00eb8a743f 100644 --- a/src/opes/OPESmetad.cpp +++ b/src/opes/OPESmetad.cpp @@ -302,7 +302,6 @@ template void OPESmetad::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("compulsory","TEMP","-1","temperature. If not set, it is taken from MD engine, but not all MD codes provide it"); keys.add("compulsory","PACE","the frequency for kernel deposition"); std::string info_sigma("the initial widths of the kernels"); @@ -337,9 +336,9 @@ void OPESmetad::registerKeywords(Keywords& keys) keys.add("optional","STATE_WSTRIDE","number of MD steps between writing the STATE_WFILE. Default is only on CPT events (but not all MD codes set them)"); keys.addFlag("STORE_STATES",false,"append to STATE_WFILE instead of ovewriting it each time"); //miscellaneous - keys.add("optional","EXCLUDED_REGION","kernels are not deposited when the action provided here has a nonzero value, see example above"); + keys.addInputKeyword("optional","EXCLUDED_REGION","scalar","kernels are not deposited when the action provided here has a nonzero value, see example above"); if(!mode::explore) - keys.add("optional","EXTRA_BIAS","consider also these other bias potentials for the internal reweighting. This can be used e.g. for sampling a custom target distribution (see example above)"); + keys.addInputKeyword("optional","EXTRA_BIAS","scalar","consider also these other bias potentials for the internal reweighting. This can be used e.g. for sampling a custom target distribution (see example above)"); keys.addFlag("CALC_WORK",false,"calculate the total accumulated work done by the bias since last restart"); keys.addFlag("WALKERS_MPI",false,"switch on MPI version of multiple walkers"); keys.addFlag("SERIAL",false,"perform calculations in serial"); diff --git a/src/pytorch/PytorchModel.cpp b/src/pytorch/PytorchModel.cpp index 7a7775e759..68719163e9 100644 --- a/src/pytorch/PytorchModel.cpp +++ b/src/pytorch/PytorchModel.cpp @@ -94,7 +94,6 @@ PLUMED_REGISTER_ACTION(PytorchModel,"PYTORCH_MODEL") void PytorchModel::registerKeywords(Keywords& keys) { Function::registerKeywords(keys); - keys.use("ARG"); keys.add("optional","FILE","Filename of the PyTorch compiled model"); keys.addOutputComponent("node", "default", "Model outputs"); } diff --git a/src/refdist/MatrixProductDiagonal.cpp b/src/refdist/MatrixProductDiagonal.cpp index e97a0f9c55..54d022b9ff 100644 --- a/src/refdist/MatrixProductDiagonal.cpp +++ b/src/refdist/MatrixProductDiagonal.cpp @@ -47,7 +47,8 @@ class MatrixProductDiagonal : public ActionWithVector { PLUMED_REGISTER_ACTION(MatrixProductDiagonal,"MATRIX_PRODUCT_DIAGONAL") void MatrixProductDiagonal::registerKeywords( Keywords& keys ) { - ActionWithVector::registerKeywords(keys); keys.use("ARG"); + ActionWithVector::registerKeywords(keys); + keys.addInputKeyword("compulsory","ARG","vector/matrix","the two vectors/matrices whose product are to be taken"); keys.setValueDescription("scalar/vector","a vector containing the diagonal elements of the matrix that obtaned by multiplying the two input matrices together"); } diff --git a/src/symfunc/ThreeBodyGFunctions.cpp b/src/symfunc/ThreeBodyGFunctions.cpp index 9f6b3f52a0..2517513f11 100644 --- a/src/symfunc/ThreeBodyGFunctions.cpp +++ b/src/symfunc/ThreeBodyGFunctions.cpp @@ -51,8 +51,9 @@ class ThreeBodyGFunctions : public ActionWithVector { PLUMED_REGISTER_ACTION(ThreeBodyGFunctions,"GSYMFUNC_THREEBODY") void ThreeBodyGFunctions::registerKeywords( Keywords& keys ) { - ActionWithVector::registerKeywords( keys ); keys.use("ARG"); - keys.add("compulsory","WEIGHT","the matrix that contains the weights that should be used for each connection"); + ActionWithVector::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","matrix","three matrices containing the bond vectors of interest"); + keys.addInputKeyword("compulsory","WEIGHT","matrix","the matrix that contains the weights that should be used for each connection"); keys.add("numbered","FUNCTION","the parameters of the function you would like to compute"); ActionWithValue::useCustomisableComponents( keys ); } diff --git a/src/tools/Keywords.cpp b/src/tools/Keywords.cpp index d409be915a..ca9af95d6e 100644 --- a/src/tools/Keywords.cpp +++ b/src/tools/Keywords.cpp @@ -197,6 +197,16 @@ void Keywords::add( const std::string & t, const std::string & k, const std::str keys.push_back(k); } +void Keywords::addInputKeyword( const std::string & t, const std::string & k, const std::string & ttt, const std::string & d ) { + if( exists(k) ) { remove(k); argument_types[k] = ttt; } else { argument_types.insert( std::pair(k,ttt) ); } + add( t, k, d ); +} + +void Keywords::addInputKeyword( const std::string & t, const std::string & k, const std::string & ttt, const std::string& def, const std::string & d ) { + if( exists(k) ) { remove(k); argument_types[k] = ttt; } else { argument_types.insert( std::pair(k,ttt) ); } + add( t, k, def, d ); +} + void Keywords::add( const std::string & t, const std::string & k, const std::string & def, const std::string & d ) { plumed_massert( !exists(k) && !reserved(k) && (t=="compulsory" || t=="hidden" ), "failing on keyword " + k ); // An optional keyword can't have a default types.insert( std::pair(k, KeyType(t)) ); @@ -676,10 +686,26 @@ bool Keywords::componentHasCorrectType( const std::string& name, const std::size return (ctypes.find(sname)->second.find("vector")!=std::string::npos); } else if( rank==2 ) { return (ctypes.find(sname)->second.find("matrix")!=std::string::npos); - } else plumed_merror("found value without type"); + } return false; } +bool Keywords::checkArgumentType( const std::size_t& rank, const bool& hasderiv ) const { + for(auto const& x : argument_types ) { + if( rank==0 && x.second.find("scalar")!=std::string::npos ) return true; + if( hasderiv && x.second.find("grid")!=std::string::npos ) return true; + if( rank==1 && x.second.find("vector")!=std::string::npos ) return true; + if( rank==2 && x.second.find("matrix")!=std::string::npos ) return true; + } + plumed_merror("WARNING: type for input argument has not been specified"); + return false; +} + +std::string Keywords::getArgumentType( const std::string& name ) const { + if( argument_types.find(name)==argument_types.end() ) return ""; + return argument_types.find(name)->second; +} + std::string Keywords::getOutputComponentFlag( const std::string& name ) const { return ckey.find(name)->second; } diff --git a/src/tools/Keywords.h b/src/tools/Keywords.h index b3319cecdd..efce8b38a0 100644 --- a/src/tools/Keywords.h +++ b/src/tools/Keywords.h @@ -76,6 +76,8 @@ class Keywords { std::map allowmultiple; /// The documentation for the keywords std::map documentation; +/// The type for the arguments in this action + std::map argument_types; /// The default values for the flags (are they on or of) std::map booldefs; /// The default values (if there are default values) for compulsory keywords @@ -182,6 +184,13 @@ class Keywords { bool outputComponentExists( const std::string& name ) const ; /// Check that type for component has been documented correctly bool componentHasCorrectType( const std::string& name, const std::size_t& rank, const bool& hasderiv ) const ; +/// Create the documentation for a keyword that reads arguments + void addInputKeyword( const std::string & t, const std::string & k, const std::string & ttt, const std::string & d ); + void addInputKeyword( const std::string & t, const std::string & k, const std::string & ttt, const std::string& def, const std::string & d ); +/// Check the documentation of the argument types + bool checkArgumentType( const std::size_t& rank, const bool& hasderiv ) const ; +/// Get the valid types that can be used as argument for this keyword + std::string getArgumentType( const std::string& name ) const ; /// Get the flag that forces this component to be calculated std::string getOutputComponentFlag( const std::string& name ) const ; /// Get the type for this output component diff --git a/src/valtools/Concatenate.cpp b/src/valtools/Concatenate.cpp index 66d4d0025d..6bdae1fe06 100644 --- a/src/valtools/Concatenate.cpp +++ b/src/valtools/Concatenate.cpp @@ -57,8 +57,9 @@ class Concatenate : PLUMED_REGISTER_ACTION(Concatenate,"CONCATENATE") void Concatenate::registerKeywords( Keywords& keys ) { - Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); - keys.add("numbered","MATRIX","specify the matrices that you wish to join together into a single matrix"); keys.reset_style("MATRIX","compulsory"); + Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("optional","ARG","scalar/vector","the values that should be concatenated together to form the output vector"); + keys.addInputKeyword("numbered","MATRIX","scalar/matrix","specify the matrices that you wish to join together into a single matrix"); keys.reset_style("MATRIX","compulsory"); keys.setValueDescription("vector/matrix","the concatenated vector/matrix that was constructed from the input values"); } diff --git a/src/valtools/Flatten.cpp b/src/valtools/Flatten.cpp index 73da99b208..07f9680d4f 100644 --- a/src/valtools/Flatten.cpp +++ b/src/valtools/Flatten.cpp @@ -55,7 +55,8 @@ PLUMED_REGISTER_ACTION(Flatten,"FLATTEN") void Flatten::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","matrix","the label for the matrix that you would like to flatten to a vector"); keys.setValueDescription("vector","a vector containing all the elements of the input matrix"); } diff --git a/src/valtools/SelectComponents.cpp b/src/valtools/SelectComponents.cpp index 3d6466090f..6a17f2353a 100644 --- a/src/valtools/SelectComponents.cpp +++ b/src/valtools/SelectComponents.cpp @@ -48,7 +48,7 @@ PLUMED_REGISTER_ACTION(SelectComponents,"SELECT_COMPONENTS") void SelectComponents::registerKeywords( Keywords& keys ) { ActionShortcut::registerKeywords( keys ); - keys.add("compulsory","ARG","the argument we are using to build the shortcut"); + keys.addInputKeyword("compulsory","ARG","vector/matrix","the value from which we are selecting components"); keys.add("compulsory","COMPONENTS","the components in the input value that you woul like to build a new vector from"); keys.needsAction("FLATTEN"); keys.needsAction("CONSTANT"); keys.needsAction("SELECT_WITH_MASK"); keys.setValueDescription("vector","a vector containing the selected components"); diff --git a/src/valtools/SelectWithMask.cpp b/src/valtools/SelectWithMask.cpp index 4d41b9c66b..83791be848 100644 --- a/src/valtools/SelectWithMask.cpp +++ b/src/valtools/SelectWithMask.cpp @@ -62,10 +62,11 @@ PLUMED_REGISTER_ACTION(SelectWithMask,"SELECT_WITH_MASK") void SelectWithMask::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.use("ARG"); - keys.add("optional","ROW_MASK","an array with ones in the rows of the matrix that you want to discard"); - keys.add("optional","COLUMN_MASK","an array with ones in the columns of the matrix that you want to discard"); - keys.add("compulsory","MASK","an array with ones in the components that you want to discard"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the label for the value upon which you are going to apply the mask"); + keys.addInputKeyword("optional","ROW_MASK","vector","an array with ones in the rows of the matrix that you want to discard"); + keys.addInputKeyword("optional","COLUMN_MASK","vector","an array with ones in the columns of the matrix that you want to discard"); + keys.addInputKeyword("compulsory","MASK","vector/matrix","an array with ones in the components that you want to discard"); keys.setValueDescription("vector/matrix","a vector/matrix of values that is obtained using a mask to select elements of interest"); } diff --git a/src/valtools/VStack.cpp b/src/valtools/VStack.cpp index 99d7574c97..39c09556c7 100644 --- a/src/valtools/VStack.cpp +++ b/src/valtools/VStack.cpp @@ -60,7 +60,8 @@ class VStack : public ActionWithMatrix { PLUMED_REGISTER_ACTION(VStack,"VSTACK") void VStack::registerKeywords( Keywords& keys ) { - ActionWithMatrix::registerKeywords( keys ); keys.use("ARG"); + ActionWithMatrix::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar/vector","the values that you would like to stack together to construct the output matrix"); keys.setValueDescription("matrix","a matrix that contains the input vectors in its columns"); } diff --git a/src/vatom/ArgsToVatom.cpp b/src/vatom/ArgsToVatom.cpp index cacbf3283f..8b0087bd02 100644 --- a/src/vatom/ArgsToVatom.cpp +++ b/src/vatom/ArgsToVatom.cpp @@ -61,14 +61,14 @@ PLUMED_REGISTER_ACTION(ArgsToVatom,"ARGS2VATOM") void ArgsToVatom::registerKeywords( Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); ActionWithArguments::registerKeywords( keys ); - keys.add("compulsory","XPOS","the x position of the atom"); - keys.add("compulsory","YPOS","the y position of the atom"); - keys.add("compulsory","ZPOS","the z position of the atom"); - keys.add("compulsory","MASS","the mass of the atom"); - keys.add("compulsory","CHARGE","the charge of the atom"); - keys.add("hidden","XBKP","x position to use in case PBC not set when using PHASES"); - keys.add("hidden","YBKP","y position to use in case PBC not set when using PHASES"); - keys.add("hidden","ZBKP","z position to use in case PBC not set when using PHASES"); + keys.addInputKeyword("compulsory","XPOS","scalar","the value to use for the x position of the atom"); + keys.addInputKeyword("compulsory","YPOS","scalar","the value to use for the y position of the atom"); + keys.addInputKeyword("compulsory","ZPOS","scalar","the value to use for the z position of the atom"); + keys.addInputKeyword("compulsory","MASS","scalar","the value to use for the mass of the atom"); + keys.addInputKeyword("compulsory","CHARGE","scalar","the value to use for the charge of the atom"); + keys.addInputKeyword("hidden","XBKP","scalar","x position to use in case PBC not set when using PHASES"); + keys.addInputKeyword("hidden","YBKP","scalar","y position to use in case PBC not set when using PHASES"); + keys.addInputKeyword("hidden","ZBKP","scalar","z position to use in case PBC not set when using PHASES"); keys.addFlag("FRACTIONAL",false,"the input arguments are calculated in fractional coordinates so you need to multiply by the cell"); keys.addOutputComponent("x","default","scalar","the x coordinate of the virtual atom"); keys.addOutputComponent("y","default","scalar","the y coordinate of the virtual atom"); diff --git a/src/ves/VesDeltaF.cpp b/src/ves/VesDeltaF.cpp index f0aaeae213..d878d27854 100644 --- a/src/ves/VesDeltaF.cpp +++ b/src/ves/VesDeltaF.cpp @@ -180,7 +180,6 @@ PLUMED_REGISTER_ACTION(VesDeltaF,"VES_DELTA_F") void VesDeltaF::registerKeywords(Keywords& keys) { Bias::registerKeywords(keys); - keys.use("ARG"); keys.add("optional","TEMP","temperature is compulsory, but it can be sometimes fetched from the MD engine"); //local free energies keys.add("numbered","FILE_F","names of files containing local free energies and derivatives. " diff --git a/src/ves/VesLinearExpansion.cpp b/src/ves/VesLinearExpansion.cpp index fc1e3948ed..8f1ce7f2c1 100644 --- a/src/ves/VesLinearExpansion.cpp +++ b/src/ves/VesLinearExpansion.cpp @@ -328,7 +328,6 @@ void VesLinearExpansion::registerKeywords( Keywords& keys ) { VesBias::useGridBinKeywords(keys); VesBias::useProjectionArgKeywords(keys); // - keys.use("ARG"); keys.add("compulsory","BASIS_FUNCTIONS","the label of the one dimensional basis functions that should be used."); keys.addOutputComponent("force2","default","scalar","the instantaneous value of the squared force due to this bias potential."); } diff --git a/src/wham/Wham.cpp b/src/wham/Wham.cpp index 9fa6797e0b..62396f450b 100644 --- a/src/wham/Wham.cpp +++ b/src/wham/Wham.cpp @@ -96,8 +96,8 @@ PLUMED_REGISTER_ACTION(Wham,"WHAM") void Wham::registerKeywords(Keywords& keys ) { Action::registerKeywords( keys ); ActionWithValue::registerKeywords( keys ); - ActionWithArguments::registerKeywords( keys ); keys.remove("ARG"); - keys.add("compulsory","ARG","the stored values for the bias"); + ActionWithArguments::registerKeywords( keys ); + keys.addInputKeyword("compulsory","ARG","scalar/vector/matrix","the stored values for the bias"); keys.add("compulsory","MAXITER","1000","maximum number of iterations for WHAM algorithm"); keys.add("compulsory","WHAMTOL","1e-10","threshold for convergence of WHAM algorithm"); keys.add("optional","TEMP","the system temperature. This is not required if your MD code passes this quantity to PLUMED");