code: 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);
  	}
docs: Calculate the phi 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