def makePhe(segID, N, CA, C, O, geo):
    '''Creates a Phenylalanine residue'''
    ##R-Group
    CA_CB_length=geo.CA_CB_length
    C_CA_CB_angle=geo.C_CA_CB_angle
    N_C_CA_CB_diangle=geo.N_C_CA_CB_diangle
    
    CB_CG_length=geo.CB_CG_length
    CA_CB_CG_angle=geo.CA_CB_CG_angle
    N_CA_CB_CG_diangle=geo.N_CA_CB_CG_diangle

    CG_CD1_length=geo.CG_CD1_length
    CB_CG_CD1_angle=geo.CB_CG_CD1_angle
    CA_CB_CG_CD1_diangle=geo.CA_CB_CG_CD1_diangle

    CG_CD2_length=geo.CG_CD2_length
    CB_CG_CD2_angle=geo.CB_CG_CD2_angle
    CA_CB_CG_CD2_diangle= geo.CA_CB_CG_CD2_diangle
    
    CD1_CE1_length=geo.CD1_CE1_length
    CG_CD1_CE1_angle=geo.CG_CD1_CE1_angle
    CB_CG_CD1_CE1_diangle=geo.CB_CG_CD1_CE1_diangle

    CD2_CE2_length=geo.CD2_CE2_length
    CG_CD2_CE2_angle=geo.CG_CD2_CE2_angle
    CB_CG_CD2_CE2_diangle=geo.CB_CG_CD2_CE2_diangle

    CE1_CZ_length=geo.CE1_CZ_length
    CD1_CE1_CZ_angle=geo.CD1_CE1_CZ_angle
    CG_CD1_CE1_CZ_diangle=geo.CG_CD1_CE1_CZ_diangle

    carbon_b= calculateCoordinates(N, C, CA, CA_CB_length, C_CA_CB_angle, N_C_CA_CB_diangle)
    CB= Atom("CB", carbon_b, 0.0 , 1.0, " "," CB", 0,"C")
    carbon_g= calculateCoordinates(N, CA, CB, CB_CG_length, CA_CB_CG_angle, N_CA_CB_CG_diangle)
    CG= Atom("CG", carbon_g, 0.0, 1.0, " ", " CG", 0, "C")
    carbon_d1= calculateCoordinates(CA, CB, CG, CG_CD1_length, CB_CG_CD1_angle, CA_CB_CG_CD1_diangle)
    CD1= Atom("CD1", carbon_d1, 0.0, 1.0, " ", " CD1", 0, "C")
    carbon_d2= calculateCoordinates(CA, CB, CG, CG_CD2_length, CB_CG_CD2_angle, CA_CB_CG_CD2_diangle)
    CD2= Atom("CD2", carbon_d2, 0.0, 1.0, " ", " CD2", 0, "C")
    carbon_e1= calculateCoordinates(CB, CG, CD1, CD1_CE1_length, CG_CD1_CE1_angle, CB_CG_CD1_CE1_diangle)
    CE1= Atom("CE1", carbon_e1, 0.0, 1.0, " ", " CE1", 0, "C")
    carbon_e2= calculateCoordinates(CB, CG, CD2, CD2_CE2_length, CG_CD2_CE2_angle, CB_CG_CD2_CE2_diangle)
    CE2= Atom("CE2", carbon_e2, 0.0, 1.0, " ", " CE2", 0, "C")
    carbon_z= calculateCoordinates(CG, CD1, CE1, CE1_CZ_length, CD1_CE1_CZ_angle, CG_CD1_CE1_CZ_diangle)
    CZ= Atom("CZ", carbon_z, 0.0, 1.0, " ", " CZ", 0, "C")

    ##Create Residue Data Structures
    res= Residue((' ', segID, ' '), "PHE", '    ')
    res.add(N)
    res.add(CA)
    res.add(C)
    res.add(O)
    res.add(CB)
    res.add(CG)
    res.add(CD1)
    res.add(CE1)
    res.add(CD2)
    res.add(CE2)
    res.add(CZ)
    return res
Creates a Phenylalanine residue