private void trackHBondEnergy ( int i , int j , double energy ) { if ( groups [ i ] . getPDBName ( ) . equals ( "PRO" ) ) { logger . debug ( "Ignore: PRO {}" , groups [ i ] . getResidueNumber ( ) ) ; return ; } SecStrucState stateOne = getSecStrucState ( i ) ; SecStrucState stateTwo = getSecStrucState ( j ) ; double acc1e = stateOne . getAccept1 ( ) . getEnergy ( ) ; double acc2e = stateOne . getAccept2 ( ) . getEnergy ( ) ; double don1e = stateTwo . getDonor1 ( ) . getEnergy ( ) ; double don2e = stateTwo . getDonor2 ( ) . getEnergy ( ) ; //Acceptor: N-H-->O if ( energy < acc1e ) { logger . debug ( "{} < {}" , energy , acc1e ) ; stateOne . setAccept2 ( stateOne . getAccept1 ( ) ) ; HBond bond = new HBond ( ) ; bond . setEnergy ( energy ) ; bond . setPartner ( j ) ; stateOne . setAccept1 ( bond ) ; } else if ( energy < acc2e ) { logger . debug ( "{} < {}" , energy , acc2e ) ; HBond bond = new HBond ( ) ; bond . setEnergy ( energy ) ; bond . setPartner ( j ) ; stateOne . setAccept2 ( bond ) ; } //The other side of the bond: donor O-->N-H if ( energy < don1e ) { logger . debug ( "{} < {}" , energy , don1e ) ; stateTwo . setDonor2 ( stateTwo . getDonor1 ( ) ) ; HBond bond = new HBond ( ) ; bond . setEnergy ( energy ) ; bond . setPartner ( i ) ; stateTwo . setDonor1 ( bond ) ; } else if ( energy < don2e ) { logger . debug ( "{} < {}" , energy , don2e ) ; HBond bond = new HBond ( ) ; bond . setEnergy ( energy ) ; bond . setPartner ( i ) ; stateTwo . setDonor2 ( bond ) ; } }
Store Hbonds in the Groups . DSSP allows two HBonds per aminoacids to allow bifurcated bonds .