public static double getPhi(AminoAcid a, AminoAcid b) { if (!isConnected(a, b)) { //System.out.println("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) { }// System.out.println("Can not calculate Phi, CA atom is missing"); return torsionAngle(a_C, b_N, b_CA, b_C); }
/** * Calculate the psi angle. * * @param a an AminoAcid object * @param b an AminoAcid object * @return a double * @throws StructureException if aminoacids not connected or if any of the 4 needed atoms missing */ public static double getPsi(AminoAcid a, AminoAcid b) { if (!isConnected(a, b)) { //System.out.println("can not calc Psi - AminoAcids are not connected!"); } Atom a_N = a.getN(); Atom a_CA = a.getCA(); Atom a_C = a.getC(); Atom b_N = b.getN(); // C and N were checked in isConnected already if (a_CA == null) { } // System.out.println("Can not calculate Psi, CA atom is missing"); return(torsionAngle(a_N, a_CA, a_C, b_N)); }