boolean isHbonded(int indexDonor, int indexAcceptor) {
    if (indexDonor < 0 || indexDonor >= monomerCount ||
        indexAcceptor < 0 || indexAcceptor >= monomerCount)
      return false;
    return ((min1Indexes[indexDonor] == indexAcceptor &&
             min1Energies[indexDonor] <= -500) ||
            (min2Indexes[indexDonor] == indexAcceptor &&
             min2Energies[indexDonor] <= -500));
  }