Skip to content

Commit

Permalink
Now plumed check should not hang anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Iximiel committed Jan 27, 2025
1 parent 33101da commit 4522e86
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/tools/BitmaskEnum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with plumed. If not, see <http://www.gnu.org/licenses/>.
along with plumed. If not, see <http://www.gnu.org/licenses/>.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
#include "BitmaskEnum.h"
10 changes: 4 additions & 6 deletions src/tools/Keywords.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ std::string toString(Keywords::argType at) {
}

Keywords::argType stoat(std::string_view str) {
using namespace std::literals;
if(auto pos = str.find("/"sv); pos!=str.npos) {
if(auto pos = str.find("/"); pos!=str.npos) {
//here we can express that we do not want certain combinations
auto val=stoat(str.substr(0,pos));
return val | stoat(str.substr(pos+1));
Expand Down Expand Up @@ -162,8 +161,7 @@ std::string toString(Keywords::componentType at) {
}

inline Keywords::componentType stoct(std::string_view str) {
using namespace std::literals;
if(auto pos = str.find("/"sv); pos!=str.npos) {
if(auto pos = str.find("/"); pos!=str.npos) {
//here we can express that we do not want certain combinations
auto val=stoct(str.substr(0,pos));
return val | stoct(str.substr(pos+1));
Expand Down Expand Up @@ -342,13 +340,13 @@ void Keywords::addOrReserve( std::string_view keytype,
.setType(type)
.setDocString(fd)
.setAllowMultiple(allowMultiple);
if( type.isAtomList() ) {
if( type.isAtomList() ) {
//keytype may be "residues" or something like "atoms-3"
keywords.find(key)->second.atomtag=keytype;
if (isaction) {
fd += ATOM_DOCSTRING;
}
}
}
if (reserve) {
reserved_keys.emplace_back(key);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/tools/Keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,9 @@ class Keywords {
/// "switching function for each contact. Details of the various switching "
/// "functions you can use are provided on \\ref switchingfunction.");
/// keys.reset_style("SWITCH","compulsory");
/// @endcode
/// @endcode
/// @note Note that some option of the selected keyword may not change. In particular:
/// - A numbered keyword will change the style but the keyInfo::allowmultiple
/// - A numbered keyword will change the style but the keyInfo::allowmultiple
/// will remain set to `true`
/// - An eventual keyInfo::atomtag will not be changed unless the style is set to
/// an atomlist
Expand Down

0 comments on commit 4522e86

Please sign in to comment.