From 55443b5b8c3d962c8e1d9d2a2e871b082a9003a3 Mon Sep 17 00:00:00 2001 From: Gareth Aneurin Tribello Date: Wed, 15 May 2024 20:47:30 +0100 Subject: [PATCH 1/2] Added documentation for stuff represented by shortcut labels to valuedict files that are output by driver with the --valuedict-ofile option This is a feature that is used by the nest --- .../basic/rt-parse-only/values.json.reference | 3 ++ .../rt-parse-only/values.json.reference | 41 +++++++++++++++++++ .../rt-parse-only/values.json.reference | 29 +++++++++++++ .../wham/rt-parse-only/values.json.reference | 6 +++ src/cltools/Driver.cpp | 2 +- src/generic/Ones.cpp | 2 +- 6 files changed, 81 insertions(+), 2 deletions(-) diff --git a/regtest/basic/rt-parse-only/values.json.reference b/regtest/basic/rt-parse-only/values.json.reference index 90eaf9d593..edee063f1b 100644 --- a/regtest/basic/rt-parse-only/values.json.reference +++ b/regtest/basic/rt-parse-only/values.json.reference @@ -23,6 +23,9 @@ "phi" : { "phi" : { "type": "scalar", "desciption": "" } }, +"shortcut_phi" : { +"phi" : { "type": "scalar", "desciption": "" } +}, "r1" : { "r1.X" : { "type": "scalar", "description": "values from the column labelled p2.X in the file named input_colvar" } }, diff --git a/regtest/contour/rt-parse-only/values.json.reference b/regtest/contour/rt-parse-only/values.json.reference index 9be5d5b003..e87c71d8f8 100644 --- a/regtest/contour/rt-parse-only/values.json.reference +++ b/regtest/contour/rt-parse-only/values.json.reference @@ -29,15 +29,30 @@ "fcc_mat.y" : { "type": "matrix", "desciption": "" } "fcc_mat.z" : { "type": "matrix", "desciption": "" } }, +"shortcut_fcc_mat" : { +"fcc_mat.w" : { "type": "matrix", "desciption": "" } +"fcc_mat.x" : { "type": "matrix", "desciption": "" } +"fcc_mat.y" : { "type": "matrix", "desciption": "" } +"fcc_mat.z" : { "type": "matrix", "desciption": "" } +}, "fcc_vfunc" : { "fcc_vfunc" : { "type": "matrix", "desciption": "" } }, +"shortcut_fcc_vfunc" : { +"fcc_vfunc" : { "type": "matrix", "desciption": "" } +}, "fcc_wvfunc" : { "fcc_wvfunc" : { "type": "matrix", "desciption": "" } }, +"shortcut_fcc_wvfunc" : { +"fcc_wvfunc" : { "type": "matrix", "desciption": "" } +}, "fcc_ones" : { "fcc_ones" : { "type": "vector", "desciption": "" } }, +"shortcut_fcc_ones" : { +"fcc_ones" : { "type": "vector", "desciption": "" } +}, "fcc" : { "fcc" : { "type": "vector", "desciption": "" } }, @@ -47,41 +62,67 @@ "fcc_n" : { "fcc_n" : { "type": "vector", "desciption": "" } }, +"shortcut_fcc_n" : { +"fcc_n" : { "type": "vector", "desciption": "" } +}, "dens_dist" : { "dens_dist.x" : { "type": "vector", "desciption": "" } "dens_dist.y" : { "type": "vector", "desciption": "" } "dens_dist.z" : { "type": "vector", "desciption": "" } }, +"shortcut_dens_dist" : { +"dens_dist.x" : { "type": "vector", "desciption": "" } +"dens_dist.y" : { "type": "vector", "desciption": "" } +"dens_dist.z" : { "type": "vector", "desciption": "" } +}, "dens_numer_sigma" : { "dens_numer_sigma" : { "type": "vector", "desciption": "" } }, "dens_numer_cov" : { "dens_numer_cov" : { "type": "vector", "desciption": "" } }, +"shortcut_dens_numer_cov" : { +"dens_numer_cov" : { "type": "vector", "desciption": "" } +}, "dens_numer_icov" : { "dens_numer_icov" : { "type": "vector", "desciption": "" } }, +"shortcut_dens_numer_icov" : { +"dens_numer_icov" : { "type": "vector", "desciption": "" } +}, "dens_numer" : { "dens_numer" : { "type": "grid", "desciption": "" } }, "ones" : { "ones" : { "type": "vector", "desciption": "" } }, +"shortcut_ones" : { +"ones" : { "type": "vector", "desciption": "" } +}, "dens_denom_sigma" : { "dens_denom_sigma" : { "type": "vector", "desciption": "" } }, "dens_denom_cov" : { "dens_denom_cov" : { "type": "vector", "desciption": "" } }, +"shortcut_dens_denom_cov" : { +"dens_denom_cov" : { "type": "vector", "desciption": "" } +}, "dens_denom_icov" : { "dens_denom_icov" : { "type": "vector", "desciption": "" } }, +"shortcut_dens_denom_icov" : { +"dens_denom_icov" : { "type": "vector", "desciption": "" } +}, "dens_denom" : { "dens_denom" : { "type": "grid", "desciption": "" } }, "dens" : { "dens" : { "type": "grid", "desciption": "" } }, +"shortcut_dens" : { +"dens" : { "type": "grid", "desciption": "" } +}, "cont" : { "cont.dens_dist.x" : { "type": "vector", "description": "a vector of coordinates for the contour along the dens_dist.x direction" }, "cont.dens_dist.y" : { "type": "vector", "description": "a vector of coordinates for the contour along the dens_dist.y direction" }, diff --git a/regtest/multicolvar/rt-parse-only/values.json.reference b/regtest/multicolvar/rt-parse-only/values.json.reference index 1e164384e5..94720f4e48 100644 --- a/regtest/multicolvar/rt-parse-only/values.json.reference +++ b/regtest/multicolvar/rt-parse-only/values.json.reference @@ -23,30 +23,59 @@ "d1" : { "d1" : { "type": "scalar", "desciption": "DISTANCE" } }, +"shortcut_d1" : { +"d1" : { "type": "scalar", "desciption": "DISTANCE" } +}, "d2" : { "d2" : { "type": "scalar", "desciption": "DISTANCE" } }, +"shortcut_d2" : { +"d2" : { "type": "scalar", "desciption": "DISTANCE" } +}, "d3" : { "d3" : { "type": "scalar", "desciption": "DISTANCE" } }, +"shortcut_d3" : { +"d3" : { "type": "scalar", "desciption": "DISTANCE" } +}, "ss" : { "ss.1" : { "type": "scalar", "desciption": "1th" } "ss.2" : { "type": "scalar", "desciption": "2th" } "ss.3" : { "type": "scalar", "desciption": "3th" } }, +"shortcut_ss" : { +"ss.1" : { "type": "scalar", "desciption": "1th" } +"ss.2" : { "type": "scalar", "desciption": "2th" } +"ss.3" : { "type": "scalar", "desciption": "3th" } +}, "dall" : { "dall" : { "type": "vector", "desciption": "" } }, +"shortcut_dall" : { +"dall" : { "type": "vector", "desciption": "" } +}, "ssall" : { "ssall.1" : { "type": "scalar", "desciption": "1th" } "ssall.2" : { "type": "scalar", "desciption": "2th" } "ssall.3" : { "type": "scalar", "desciption": "3th" } }, +"shortcut_ssall" : { +"ssall.1" : { "type": "scalar", "desciption": "1th" } +"ssall.2" : { "type": "scalar", "desciption": "2th" } +"ssall.3" : { "type": "scalar", "desciption": "3th" } +}, "dallt" : { "dallt" : { "type": "vector", "desciption": "" } }, +"shortcut_dallt" : { +"dallt" : { "type": "vector", "desciption": "" } +}, "sfinal" : { "sfinal.1" : { "type": "scalar", "desciption": "1th" } "sfinal.2" : { "type": "scalar", "desciption": "2th" } +}, +"shortcut_sfinal" : { +"sfinal.1" : { "type": "scalar", "desciption": "1th" } +"sfinal.2" : { "type": "scalar", "desciption": "2th" } } } diff --git a/regtest/wham/rt-parse-only/values.json.reference b/regtest/wham/rt-parse-only/values.json.reference index 22c1c7c05c..d05e96881e 100644 --- a/regtest/wham/rt-parse-only/values.json.reference +++ b/regtest/wham/rt-parse-only/values.json.reference @@ -23,6 +23,9 @@ "phi" : { "phi" : { "type": "scalar", "desciption": "" } }, +"shortcut_phi" : { +"phi" : { "type": "scalar", "desciption": "" } +}, "rp" : { "rp.bias" : { "type": "scalar", "desciption": "" } "rp.force2" : { "type": "scalar", "desciption": "" } @@ -44,5 +47,8 @@ }, "hh" : { "hh" : { "type": "grid", "desciption": "" } +}, +"shortcut_hh" : { +"hh" : { "type": "grid", "desciption": "" } } } diff --git a/src/cltools/Driver.cpp b/src/cltools/Driver.cpp index 149f61af50..7113535288 100644 --- a/src/cltools/Driver.cpp +++ b/src/cltools/Driver.cpp @@ -806,7 +806,7 @@ int Driver::main(FILE* in,FILE*out,Communicator& pc) { if( as ) { unsigned ncomponents = 0; std::vector val_actions; Keywords keys; actionRegister().getKeywords( as->getName(), keys ); - std::vector cnames( keys.getOutputComponents().size() ); + std::vector cnames( keys.getOutputComponents() ); for(unsigned i=0; igetShortcutLabel(); diff --git a/src/generic/Ones.cpp b/src/generic/Ones.cpp index 42784148ee..c27c3b96ef 100644 --- a/src/generic/Ones.cpp +++ b/src/generic/Ones.cpp @@ -45,7 +45,7 @@ PLUMED_REGISTER_ACTION(Ones,"ONES") void Ones::registerKeywords(Keywords& keys) { ActionShortcut::registerKeywords( keys ); keys.add("compulsory","SIZE","the number of ones that you would like to create"); - keys.setValueDescription("a vector of ones the required number of elements"); + keys.setValueDescription("a vector of ones with the required number of elements"); keys.needsAction("CONSTANT"); } From c1f405c46e82eb88af756391665a1151fc374ba0 Mon Sep 17 00:00:00 2001 From: Gareth Aneurin Tribello Date: Thu, 16 May 2024 10:25:15 +0100 Subject: [PATCH 2/2] Updated reference file for regtest that should have been updated on last commit --- .../rt-parse-only/values.json.reference | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/regtest/symfunc/rt-parse-only/values.json.reference b/regtest/symfunc/rt-parse-only/values.json.reference index 667992bdaa..6eb05aeb45 100644 --- a/regtest/symfunc/rt-parse-only/values.json.reference +++ b/regtest/symfunc/rt-parse-only/values.json.reference @@ -29,6 +29,12 @@ "q1_mat.y" : { "type": "matrix", "desciption": "" } "q1_mat.z" : { "type": "matrix", "desciption": "" } }, +"shortcut_q1_mat" : { +"q1_mat.w" : { "type": "matrix", "desciption": "" } +"q1_mat.x" : { "type": "matrix", "desciption": "" } +"q1_mat.y" : { "type": "matrix", "desciption": "" } +"q1_mat.z" : { "type": "matrix", "desciption": "" } +}, "q1_sh" : { "q1_sh.rm-n1" : { "type": "matrix", "desciption": "" } "q1_sh.rm-0" : { "type": "matrix", "desciption": "" } @@ -40,6 +46,9 @@ "q1_denom_ones" : { "q1_denom_ones" : { "type": "vector", "desciption": "" } }, +"shortcut_q1_denom_ones" : { +"q1_denom_ones" : { "type": "vector", "desciption": "" } +}, "q1_denom" : { "q1_denom" : { "type": "vector", "desciption": "" } }, @@ -54,12 +63,21 @@ "q1_norm2" : { "q1_norm2" : { "type": "vector", "desciption": "" } }, +"shortcut_q1_norm2" : { +"q1_norm2" : { "type": "vector", "desciption": "" } +}, "q1_norm" : { "q1_norm" : { "type": "vector", "desciption": "" } }, +"shortcut_q1_norm" : { +"q1_norm" : { "type": "vector", "desciption": "" } +}, "q1" : { "q1" : { "type": "vector", "desciption": "" } }, +"shortcut_q1" : { +"q1" : { "type": "vector", "desciption": "" } +}, "gg" : { "gg.g6" : { "type": "vector", "description": "the function defined by the FUNCTION1 keyword" }, "gg.g7" : { "type": "vector", "description": "the function defined by the FUNCTION2 keyword" }