mat: HBOND_MATRIX ATOMS=1-192:3 HYDROGENS=2-192:3,3-192:3 SWITCH={RATIONAL R_0=3.20} HSWITCH={RATIONAL R_0=2.30} ASWITCH={RATIONAL R_0=0.167pi} SUM 

ROWSUMS MATRIX=mat MEAN LABEL=rsums
COLUMNSUMS MATRIX=mat MEAN LABEL=csums

DUMPMULTICOLVAR DATA=rsums PRECISION=4 FILE=donors.xyz
DUMPMULTICOLVAR DATA=csums PRECISION=4 FILE=acceptors.xyz

PRINT ARG=rsums.*,csums.* FILE=colvar FMT=%8.4f

mata: HBOND_MATRIX ATOMS=52,58,175 HYDROGENS=53,54,59,60,176,177 SWITCH={RATIONAL R_0=3.20} HSWITCH={RATIONAL R_0=2.30} ASWITCH={RATIONAL R_0=0.167pi} SUM 
#matn: HBOND_MATRIX ATOMS=52,58,175 HYDROGENS=53,54,59,60,176,177 SWITCH={RATIONAL R_0=3.20} HSWITCH={RATIONAL R_0=2.30} ASWITCH={RATIONAL R_0=0.167pi} SUM NUMERICAL_DERIVATIVES

DUMPDERIVATIVES ARG=mata.* FILE=deriv FMT=%8.4f
