Skip to content

Commit

Permalink
Merge branch 'more-shortcut-dictionary-stuff'
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed May 17, 2024
2 parents 28ff8e0 + 8e9a99c commit 08bde48
Show file tree
Hide file tree
Showing 44 changed files with 296 additions and 158 deletions.
13 changes: 10 additions & 3 deletions regtest/basic/rt-parse-only/values.json.reference
Original file line number Diff line number Diff line change
@@ -1,35 +1,42 @@
{
"timestep" : {
"action" : "PUT",
"timestep" : { "type": "scalar", "desciption": "" }
},
"posx" : {
"action" : "PUT",
"posx" : { "type": "vector", "desciption": "" }
},
"posy" : {
"action" : "PUT",
"posy" : { "type": "vector", "desciption": "" }
},
"posz" : {
"action" : "PUT",
"posz" : { "type": "vector", "desciption": "" }
},
"Masses" : {
"action" : "PUT",
"Masses" : { "type": "vector", "desciption": "" }
},
"Charges" : {
"action" : "PUT",
"Charges" : { "type": "vector", "desciption": "" }
},
"Box" : {
"action" : "PBC",
"Box" : { "type": "matrix", "desciption": "" }
},
"phi" : {
"phi" : { "type": "scalar", "desciption": "" }
},
"shortcut_phi" : {
"action" : "TORSION",
"phi" : { "type": "scalar", "desciption": "" }
},
"r1" : {
"action" : "READ",
"r1.X" : { "type": "scalar", "description": "values from the column labelled p2.X in the file named input_colvar" }
},
"r2" : {
"action" : "READ",
"r2.X" : { "type": "scalar", "description": "values from the column labelled p3.X in the file named input_colvar" },
"r2.Y" : { "type": "scalar", "description": "values from the column labelled p3.Y in the file named input_colvar" },
"r2.zzz" : { "type": "scalar", "description": "values from the column labelled p3.zzz in the file named input_colvar" }
Expand Down
62 changes: 33 additions & 29 deletions regtest/contour/rt-parse-only/values.json.reference
Original file line number Diff line number Diff line change
@@ -1,129 +1,133 @@
{
"timestep" : {
"action" : "PUT",
"timestep" : { "type": "scalar", "desciption": "" }
},
"posx" : {
"action" : "PUT",
"posx" : { "type": "vector", "desciption": "" }
},
"posy" : {
"action" : "PUT",
"posy" : { "type": "vector", "desciption": "" }
},
"posz" : {
"action" : "PUT",
"posz" : { "type": "vector", "desciption": "" }
},
"Masses" : {
"action" : "PUT",
"Masses" : { "type": "vector", "desciption": "" }
},
"Charges" : {
"action" : "PUT",
"Charges" : { "type": "vector", "desciption": "" }
},
"Box" : {
"action" : "PBC",
"Box" : { "type": "matrix", "desciption": "" }
},
"fcc_grp" : {
"action" : "GROUP",
"fcc_grp" : { "type": "atoms", "desciption": "" }
},
"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": "" }
},
"shortcut_fcc_mat" : {
"action" : "CONTACT_MATRIX",
"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" : {
"action" : "FCCUBIC_FUNC",
"fcc_vfunc" : { "type": "matrix", "desciption": "" }
},
"fcc_wvfunc" : {
"fcc_wvfunc" : { "type": "matrix", "desciption": "" }
},
"shortcut_fcc_wvfunc" : {
"action" : "CUSTOM",
"fcc_wvfunc" : { "type": "matrix", "desciption": "" }
},
"fcc_ones" : {
"action" : "CONSTANT",
"fcc_ones" : { "type": "vector", "desciption": "" }
},
"shortcut_fcc_ones" : {
"action" : "ONES",
"fcc_ones" : { "type": "vector", "desciption": "" }
},
"fcc" : {
"action" : "MATRIX_VECTOR_PRODUCT",
"fcc" : { "type": "vector", "desciption": "" }
},
"fcc_denom" : {
"action" : "MATRIX_VECTOR_PRODUCT",
"fcc_denom" : { "type": "vector", "desciption": "" }
},
"fcc_n" : {
"action" : "CUSTOM",
"fcc_n" : { "type": "vector", "desciption": "" }
},
"shortcut_fcc_n" : {
"fcc_n" : { "type": "vector", "desciption": "" }
"shortcut_fcc" : {
"action" : "FCCUBIC",
"fcc" : { "type": "vector", "desciption": "" }
},
"dens_dist" : {
"action" : "DISTANCE",
"dens_dist.x" : { "type": "vector", "desciption": "" }
"dens_dist.y" : { "type": "vector", "desciption": "" }
"dens_dist.z" : { "type": "vector", "desciption": "" }
},
"shortcut_dens_dist" : {
"action" : "DISTANCES",
"dens_dist.x" : { "type": "vector", "desciption": "" }
"dens_dist.y" : { "type": "vector", "desciption": "" }
"dens_dist.z" : { "type": "vector", "desciption": "" }
},
"dens_numer_sigma" : {
"action" : "CONSTANT",
"dens_numer_sigma" : { "type": "vector", "desciption": "" }
},
"dens_numer_cov" : {
"dens_numer_cov" : { "type": "vector", "desciption": "" }
},
"shortcut_dens_numer_cov" : {
"action" : "CUSTOM",
"dens_numer_cov" : { "type": "vector", "desciption": "" }
},
"dens_numer_icov" : {
"dens_numer_icov" : { "type": "vector", "desciption": "" }
},
"shortcut_dens_numer_icov" : {
"action" : "CUSTOM",
"dens_numer_icov" : { "type": "vector", "desciption": "" }
},
"dens_numer" : {
"action" : "KDE",
"dens_numer" : { "type": "grid", "desciption": "" }
},
"ones" : {
"action" : "CONSTANT",
"ones" : { "type": "vector", "desciption": "" }
},
"shortcut_ones" : {
"action" : "ONES",
"ones" : { "type": "vector", "desciption": "" }
},
"dens_denom_sigma" : {
"action" : "CONSTANT",
"dens_denom_sigma" : { "type": "vector", "desciption": "" }
},
"dens_denom_cov" : {
"dens_denom_cov" : { "type": "vector", "desciption": "" }
},
"shortcut_dens_denom_cov" : {
"action" : "CUSTOM",
"dens_denom_cov" : { "type": "vector", "desciption": "" }
},
"dens_denom_icov" : {
"dens_denom_icov" : { "type": "vector", "desciption": "" }
},
"shortcut_dens_denom_icov" : {
"action" : "CUSTOM",
"dens_denom_icov" : { "type": "vector", "desciption": "" }
},
"dens_denom" : {
"action" : "KDE",
"dens_denom" : { "type": "grid", "desciption": "" }
},
"dens" : {
"dens" : { "type": "grid", "desciption": "" }
},
"shortcut_dens" : {
"action" : "CUSTOM",
"dens" : { "type": "grid", "desciption": "" }
},
"cont" : {
"action" : "FIND_CONTOUR",
"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" },
"cont.dens_dist.z" : { "type": "vector", "description": "a vector of coordinates for the contour along the dens_dist.z direction" }
Expand Down
2 changes: 1 addition & 1 deletion regtest/multicolvar/rt-parse-only/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ type=driver
# this is to test automatic sizing
arg="--parse-only --natoms 10000 --shortcut-ofile shortcuts.json --valuedict-ofile values_pre.json"
function plumed_regtest_after(){
cat values_pre.json | awk '{ for(i=1;i<=NF;++i){ if($i=="\"description\":") { if(match($1, /[1-9]/)) printf("\"desciption\": \"%s\" }", $(i+2)); else printf("\"desciption\": \"\" }"); break; } printf "%s ", $i }; printf("\n");}' > values.json
cat values_pre.json | awk '{ for(i=1;i<=NF;++i){ if($i=="\"description\":") { if(match($1, /[1-9]/) && match($(i+2), /[1-9]/)) printf("\"desciption\": \"%s\" }", $(i+2)); else printf("\"desciption\": \"\" }"); break; } printf "%s ", $i }; printf("\n");}' > values.json
}
2 changes: 2 additions & 0 deletions regtest/multicolvar/rt-parse-only/plumed.dat
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ ssall: SORT ARG=dall

dallt: DISTANCE ATOMS1=7,8 ATOMS2=9,10 ATOMS3=11,12
sfinal: SORT ARG=dall,dallt

dallk: DISTANCES ATOMS1=1,2 ATOMS2=3,4 ATOMS3=5,6 MEAN LESS_THAN1={RATIONAL R_0=1.0} LESS_THAN2={RATIONAL R_0=1.5} LOWEST
5 changes: 5 additions & 0 deletions regtest/multicolvar/rt-parse-only/shortcuts.json.reference
Original file line number Diff line number Diff line change
@@ -0,0 +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"
}
}
100 changes: 69 additions & 31 deletions regtest/multicolvar/rt-parse-only/values.json.reference
Original file line number Diff line number Diff line change
@@ -1,81 +1,119 @@
{
"timestep" : {
"action" : "PUT",
"timestep" : { "type": "scalar", "desciption": "" }
},
"posx" : {
"action" : "PUT",
"posx" : { "type": "vector", "desciption": "" }
},
"posy" : {
"action" : "PUT",
"posy" : { "type": "vector", "desciption": "" }
},
"posz" : {
"action" : "PUT",
"posz" : { "type": "vector", "desciption": "" }
},
"Masses" : {
"action" : "PUT",
"Masses" : { "type": "vector", "desciption": "" }
},
"Charges" : {
"action" : "PUT",
"Charges" : { "type": "vector", "desciption": "" }
},
"Box" : {
"action" : "PBC",
"Box" : { "type": "matrix", "desciption": "" }
},
"d1" : {
"d1" : { "type": "scalar", "desciption": "DISTANCE" }
},
"shortcut_d1" : {
"d1" : { "type": "scalar", "desciption": "DISTANCE" }
"action" : "DISTANCE",
"d1" : { "type": "scalar", "desciption": "" }
},
"d2" : {
"d2" : { "type": "scalar", "desciption": "DISTANCE" }
},
"shortcut_d2" : {
"d2" : { "type": "scalar", "desciption": "DISTANCE" }
"action" : "DISTANCE",
"d2" : { "type": "scalar", "desciption": "" }
},
"d3" : {
"d3" : { "type": "scalar", "desciption": "DISTANCE" }
},
"shortcut_d3" : {
"d3" : { "type": "scalar", "desciption": "DISTANCE" }
"action" : "DISTANCE",
"d3" : { "type": "scalar", "desciption": "" }
},
"ss" : {
"ss.1" : { "type": "scalar", "desciption": "1th" }
"ss.2" : { "type": "scalar", "desciption": "2th" }
"ss.3" : { "type": "scalar", "desciption": "3th" }
},
"shortcut_ss" : {
"action" : "SORT",
"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" : {
"action" : "DISTANCE",
"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" : {
"action" : "SORT",
"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" : {
"action" : "DISTANCE",
"dallt" : { "type": "vector", "desciption": "" }
},
"sfinal" : {
"action" : "SORT",
"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" }
"dallk_vatom1" : {
"action" : "CENTER_FAST",
"dallk_vatom1" : { "type": "atoms", "desciption": "" }
},
"dallk_vatom2" : {
"action" : "CENTER_FAST",
"dallk_vatom2" : { "type": "atoms", "desciption": "" }
},
"dallk_vatom3" : {
"action" : "CENTER_FAST",
"dallk_vatom3" : { "type": "atoms", "desciption": "" }
},
"dallk_grp" : {
"action" : "GROUP",
"dallk_grp" : { "type": "atoms", "desciption": "" }
},
"dallk" : {
"action" : "DISTANCE",
"dallk" : { "type": "vector", "desciption": "" }
},
"dallk_lt1" : {
"action" : "LESS_THAN",
"dallk_lt1" : { "type": "vector", "desciption": "" }
},
"dallk_lessthan-1" : {
"action" : "SUM",
"dallk_lessthan-1" : { "type": "scalar", "desciption": "" }
},
"dallk_lt2" : {
"action" : "LESS_THAN",
"dallk_lt2" : { "type": "vector", "desciption": "" }
},
"dallk_lessthan-2" : {
"action" : "SUM",
"dallk_lessthan-2" : { "type": "scalar", "desciption": "" }
},
"dallk_lowest" : {
"action" : "LOWEST",
"dallk_lowest" : { "type": "scalar", "desciption": "" }
},
"dallk_mean" : {
"action" : "MEAN",
"dallk_mean" : { "type": "scalar", "desciption": "" }
},
"shortcut_dallk" : {
"action" : "DISTANCES",
"dallk" : { "type": "vector", "desciption": "" }
"dallk_lessthan-1" : { "type": "scalar", "desciption": "" }
"dallk_lessthan-2" : { "type": "scalar", "desciption": "" }
"dallk_lowest" : { "type": "scalar", "desciption": "" }
"dallk_mean" : { "type": "scalar", "desciption": "" }
}
}
Loading

1 comment on commit 08bde48

@PlumedBot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found broken examples in automatic/ANGLES.tmp
Found broken examples in automatic/ANN.tmp
Found broken examples in automatic/CAVITY.tmp
Found broken examples in automatic/CLASSICAL_MDS.tmp
Found broken examples in automatic/CLUSTER_DIAMETER.tmp
Found broken examples in automatic/CLUSTER_DISTRIBUTION.tmp
Found broken examples in automatic/CLUSTER_PROPERTIES.tmp
Found broken examples in automatic/CONSTANT.tmp
Found broken examples in automatic/CONTACT_MATRIX.tmp
Found broken examples in automatic/CONTACT_MATRIX_PROPER.tmp
Found broken examples in automatic/COORDINATIONNUMBER.tmp
Found broken examples in automatic/DFSCLUSTERING.tmp
Found broken examples in automatic/DISTANCE_FROM_CONTOUR.tmp
Found broken examples in automatic/EDS.tmp
Found broken examples in automatic/EMMI.tmp
Found broken examples in automatic/ENVIRONMENTSIMILARITY.tmp
Found broken examples in automatic/FIND_CONTOUR.tmp
Found broken examples in automatic/FIND_CONTOUR_SURFACE.tmp
Found broken examples in automatic/FIND_SPHERICAL_CONTOUR.tmp
Found broken examples in automatic/FOURIER_TRANSFORM.tmp
Found broken examples in automatic/FUNCPATHGENERAL.tmp
Found broken examples in automatic/FUNCPATHMSD.tmp
Found broken examples in automatic/FUNNEL.tmp
Found broken examples in automatic/FUNNEL_PS.tmp
Found broken examples in automatic/GHBFIX.tmp
Found broken examples in automatic/GPROPERTYMAP.tmp
Found broken examples in automatic/HBOND_MATRIX.tmp
Found broken examples in automatic/INCLUDE.tmp
Found broken examples in automatic/INCYLINDER.tmp
Found broken examples in automatic/INENVELOPE.tmp
Found broken examples in automatic/INTERPOLATE_GRID.tmp
Found broken examples in automatic/LOCAL_AVERAGE.tmp
Found broken examples in automatic/MAZE_OPTIMIZER_BIAS.tmp
Found broken examples in automatic/MAZE_RANDOM_ACCELERATION_MD.tmp
Found broken examples in automatic/MAZE_SIMULATED_ANNEALING.tmp
Found broken examples in automatic/MAZE_STEERED_MD.tmp
Found broken examples in automatic/MULTICOLVARDENS.tmp
Found broken examples in automatic/OUTPUT_CLUSTER.tmp
Found broken examples in automatic/PAMM.tmp
Found broken examples in automatic/PCA.tmp
Found broken examples in automatic/PCAVARS.tmp
Found broken examples in automatic/PIV.tmp
Found broken examples in automatic/PLUMED.tmp
Found broken examples in automatic/PYCVINTERFACE.tmp
Found broken examples in automatic/PYTHONFUNCTION.tmp
Found broken examples in automatic/Q3.tmp
Found broken examples in automatic/Q4.tmp
Found broken examples in automatic/Q6.tmp
Found broken examples in automatic/QUATERNION.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_LINEAR_PROJ.tmp
Found broken examples in automatic/SIZESHAPE_POSITION_MAHA_DIST.tmp
Found broken examples in automatic/SPRINT.tmp
Found broken examples in automatic/TETRAHEDRALPORE.tmp
Found broken examples in automatic/TORSIONS.tmp
Found broken examples in automatic/WHAM_WEIGHTS.tmp
Found broken examples in AnalysisPP.md
Found broken examples in CollectiveVariablesPP.md
Found broken examples in MiscelaneousPP.md

Please sign in to comment.