Skip to content

Commit

Permalink
Made label of moments moment-3 rather than moments-3.
Browse files Browse the repository at this point in the history
moment-3 is what was in the old version of plumed
  • Loading branch information
Gareth Aneurin Tribello authored and Gareth Aneurin Tribello committed Mar 22, 2024
1 parent 25a73e1 commit a237024
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion regtest/symfunc/rt24/colvar2.reference
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! FIELDS time c2_moments-2 c2_moments-3 c2_lessthan-1 c2_lessthan-2
#! FIELDS time c2_moment-2 c2_moment-3 c2_lessthan-1 c2_lessthan-2
0.000000 0.0383 -0.0032 0.0005 0.0019
0.005000 0.0427 -0.0041 0.0006 0.0023
0.010000 0.0585 -0.0020 0.0008 0.0029
Expand Down
2 changes: 1 addition & 1 deletion regtest/symfunc/rt24/plumed.dat
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ PRINT ARG=mom.* FILE=colvar FMT=%8.4f
BIASVALUE ARG=mom.*

c2: COORDINATIONNUMBER SPECIES=1-10 SWITCH={RATIONAL R_0=1.0} MOMENTS=2-3 LESS_THAN1={RATIONAL R_0=0.2} LESS_THAN2={RATIONAL R_0=0.25}
PRINT ARG=c2.moments-2,c2.moments-3,c2.* FILE=colvar2 FMT=%8.4f
PRINT ARG=c2.moment-2,c2.moment-3,c2.* FILE=colvar2 FMT=%8.4f
4 changes: 2 additions & 2 deletions src/symfunc/CoordinationNumbers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void CoordinationNumbers::registerKeywords( Keywords& keys ) {
keys.add("compulsory","R_POWER","the power to which you want to raise the distance");
keys.addFlag("LOWMEM",false,"this flag does nothing and is present only to ensure back-compatibility");
keys.add("optional","MOMENTS","the list of moments that you would like to calculate");
keys.addOutputComponent("moments","MOMENT","the moments of the distribution");
keys.addOutputComponent("moment","MOMENT","the moments of the distribution");
keys.needsAction("MATRIX_VECTOR_PRODUCT"); keys.needsAction("ONES"); keys.needsAction("MOMENTS");
}

Expand Down Expand Up @@ -183,7 +183,7 @@ CoordinationNumbers::CoordinationNumbers(const ActionOptions& ao):
readInputLine( getShortcutLabel() + "_caverage: MEAN ARG=" + getShortcutLabel() + " PERIODIC=NO");
for(unsigned i=0; i<moments.size(); ++i) {
readInputLine( getShortcutLabel() + "_diffpow-" + moments[i] + ": CUSTOM ARG=" + getShortcutLabel() + "," + getShortcutLabel() + "_caverage PERIODIC=NO FUNC=(x-y)^" + moments[i] );
readInputLine( getShortcutLabel() + "_moments-" + moments[i] + ": MEAN ARG=" + getShortcutLabel() + "_diffpow-" + moments[i] + " PERIODIC=NO");
readInputLine( getShortcutLabel() + "_moment-" + moments[i] + ": MEAN ARG=" + getShortcutLabel() + "_diffpow-" + moments[i] + " PERIODIC=NO");
}
// Read in all the shortcut stuff
std::map<std::string,std::string> keymap; multicolvar::MultiColvarShortcuts::readShortcutKeywords( keymap, this );
Expand Down

0 comments on commit a237024

Please sign in to comment.