diff --git a/src/adjmat/AdjacencyMatrixBase.cpp b/src/adjmat/AdjacencyMatrixBase.cpp index 98eb5ed620..61d52a2fd0 100644 --- a/src/adjmat/AdjacencyMatrixBase.cpp +++ b/src/adjmat/AdjacencyMatrixBase.cpp @@ -63,7 +63,9 @@ AdjacencyMatrixBase::AdjacencyMatrixBase(const ActionOptions& ao): if( t.size()==0 ) { std::vector ta; parseAtomList("GROUPA",ta); + if( ta.size()==0 && getName()=="HBOND_MATRIX") parseAtomList("DONORS",ta); std::vector tb; parseAtomList("GROUPB",tb); + if( tb.size()==0 && getName()=="HBOND_MATRIX") parseAtomList("ACCEPTORS",tb); if( ta.size()==0 || tb.size()==0 ) error("no atoms have been specified in input"); // Create list of tasks diff --git a/src/adjmat/HbondMatrix.cpp b/src/adjmat/HbondMatrix.cpp index cf9e73ea9a..acb779720a 100644 --- a/src/adjmat/HbondMatrix.cpp +++ b/src/adjmat/HbondMatrix.cpp @@ -96,6 +96,8 @@ PLUMED_REGISTER_ACTION(HbondMatrix,"HBOND_MATRIX") void HbondMatrix::registerKeywords( Keywords& keys ) { AdjacencyMatrixBase::registerKeywords( keys ); + keys.add("atoms-2","DONORS","The list of atoms which can donate a hydrogen bond"); + keys.add("atoms-2","ACCEPTORS","The list of atoms which can accept a hydrogen bond"); keys.add("atoms","HYDROGENS","The list of atoms that can form the bridge between the two interesting parts " "of the structure."); keys.add("numbered","SWITCH","The switchingfunction that specifies how close a pair of atoms must be together for there to be a hydrogen bond between them");