public static final boolean isConnected ( AminoAcid a , AminoAcid b ) { Atom C = null ; Atom N = null ; C = a . getC ( ) ; N = b . getN ( ) ; if ( C == null || N == null ) return false ; // one could also check if the CA atoms are < 4 A... double distance = getDistance ( C , N ) ; return distance < 2.5 ; }
Test if two amino acids are connected i . e . if the distance from C to N < 2 . 5 Angstrom .