def print_qm_links(c_alpha_dict, c_beta_dict, f_name, mode='w'):
    """
    Note: this needs to be tested. Only ran once to get the protein residues set up correctly.
    @param c_alpha_dict: dict of protein residue to be broken to c_alpha atom id
    @param c_beta_dict: as above, but for c_beta
    @param f_name: The location of the file to write.
    @param mode: default is to write to a new file. Use option to designate to append to existing file.
    """
    with open(f_name, mode) as m_file:
        for resid in c_beta_dict:
            m_file.write(
                """    !! Break resid {} between CA and CB, and cap CB with hydrogen
    &LINK
       MM_INDEX  {}  !! CA
       QM_INDEX  {}  !! CB
       LINK_TYPE  IMOMM
       ALPHA_IMOMM  1.5
    &END LINK
"""
                .format(resid, c_alpha_dict[resid], c_beta_dict[resid]))
    if mode == 'w':
        print('Wrote file: {}'.format(f_name))
