private void calculateHBonds ( ) { /** * More efficient method for calculating C-Alpha pairs */ if ( groups . length < 5 ) return ; Iterator < AtomContact > otu = contactSet . iterator ( ) ; while ( otu . hasNext ( ) ) { AtomContact ac = otu . next ( ) ; Pair < Atom > pair = ac . getPair ( ) ; Group g1 = pair . getFirst ( ) . getGroup ( ) ; Group g2 = pair . getSecond ( ) . getGroup ( ) ; // Now I need to get the index of the Group in the list groups int i = indResMap . get ( g1 . getResidueNumber ( ) ) ; int j = indResMap . get ( g2 . getResidueNumber ( ) ) ; // Now check this checkAddHBond ( i , j ) ; //"backwards" hbonds are not allowed if ( j != ( i + 1 ) ) checkAddHBond ( j , i ) ; } }
Calculate the HBonds between different groups . see Creighton page 147 f Modified to use only the contact map