diff --git a/src/core/ActionWithArguments.cpp b/src/core/ActionWithArguments.cpp index 16c79aaf1a7e64de5b6ab01a7f5b8a741ebdbfbf..87606d3b2971529b1d5a3df81ea3ad45483f1a91 100644 --- a/src/core/ActionWithArguments.cpp +++ b/src/core/ActionWithArguments.cpp @@ -143,6 +143,7 @@ void ActionWithArguments::interpretArgumentList(const std::vector<std::string>& str+=plumed.getActionSet().getLabelList()+")"; error("cannot find action named " + a + str); } + if( action->getNumberOfComponents()==0 ) error("found " + a +".* indicating use all components calculated by action with label " + a + " but this action has no components"); for(int k=0;k<action->getNumberOfComponents();++k) arg.push_back(action->copyOutput(k)); } else if ( a=="*" ){ // Take components from all actions with a specific name