def add_atom_to_polymer(line, model, chain_id, res_id, aniso_dict, full_names):
    """Takes an .pdb ATOM or HETATM record, converts it, and adds it to a
    polymer dictionary.

    :param dict line: the line to read.
    :param dict model: the model to update.
    :param str chain_id: the chain ID to add to.
    :param str res_id: the molecule ID to add to.
    :param dict aniso_dict: lookup dictionary for anisotropy information."""

    try:
        model["polymer"][chain_id]["residues"][res_id]["atoms"][
         int(line[6:11])
        ] = atom_line_to_dict(line, aniso_dict)
    except:
        name = line[17:20].strip()
        try:
            model["polymer"][chain_id]["residues"][res_id] = {
             "name": name, "full_name": full_names.get(name),
             "atoms": {int(line[6:11]): atom_line_to_dict(line, aniso_dict)},
             "number": len(model["polymer"][chain_id]["residues"]) + 1
            }
        except:
            model["polymer"][chain_id] = {
             "internal_id": chain_id, "helices": [], "strands": [],
             "residues": {res_id: {
              "name": line[17:20].strip(),
              "atoms": {int(line[6:11]): atom_line_to_dict(line, aniso_dict)},
              "number": 1, "full_name": None,
             }}
            }