public static final double getPhi ( AminoAcid a , AminoAcid b ) throws StructureException { if ( ! isConnected ( a , b ) ) { throw new StructureException ( "can not calc Phi - AminoAcids are not connected!" ) ; } Atom a_C = a . getC ( ) ; Atom b_N = b . getN ( ) ; Atom b_CA = b . getCA ( ) ; Atom b_C = b . getC ( ) ; // C and N were checked in isConnected already if ( b_CA == null ) throw new StructureException ( "Can not calculate Phi, CA atom is missing" ) ; return torsionAngle ( a_C , b_N , b_CA , b_C ) ; }
Calculate the phi angle .