diff --git a/src/core/PlumedMain.cpp b/src/core/PlumedMain.cpp index cdeba0472f..487650bd65 100644 --- a/src/core/PlumedMain.cpp +++ b/src/core/PlumedMain.cpp @@ -664,6 +664,7 @@ void PlumedMain::cmd(std::string_view word,const TypesafePtr & val) { ts = actionSet.selectWithLabel("timestep"); } if( !ts->setValuePointer("timestep", val ) ) plumed_error(); + ts->updateUnits( passtools.get() ); } break; /* ADDED WITH API==2 */ @@ -674,6 +675,7 @@ void PlumedMain::cmd(std::string_view word,const TypesafePtr & val) { readInputLine("kBT: PUT CONSTANT PERIODIC=NO UNIT=energy", true); ActionToPutData* kb = actionSet.selectWithLabel("kBT"); if( !kb->setValuePointer("kBT", val ) ) plumed_error(); + kb->updateUnits( passtools.get() ); } break; /* ADDED WITH API==3 */