Caps C-terminus of polypeptide chain.

        Notes
        -----
        Default behaviour is to add an oxygen atom to create a
        carboxylate function at the C-terminus without changing the
        psi angle of the C-terminal residue. Alternative psi angles
        can be accessed through the cap_dihedral parameter. Will not
        remove an existing cap if one is present, though altering a
        cap of the same type will overwrite the original one.

        Parameters
        ----------
        cap : str, optional
            Type of cap to be added. Options: 'acid', 'amide'
        cap_dihedral : bool
            Alternate psi angle to be used when added cap.

def c_cap(self, cap='acid', cap_dihedral=False):
        """Caps C-terminus of polypeptide chain.

        Notes
        -----
        Default behaviour is to add an oxygen atom to create a
        carboxylate function at the C-terminus without changing the
        psi angle of the C-terminal residue. Alternative psi angles
        can be accessed through the cap_dihedral parameter. Will not
        remove an existing cap if one is present, though altering a
        cap of the same type will overwrite the original one.

        Parameters
        ----------
        cap : str, optional
            Type of cap to be added. Options: 'acid', 'amide'
        cap_dihedral : bool
            Alternate psi angle to be used when added cap.
        """
        if cap == 'acid':
            acetate = Ligand(atoms=None, mol_code='UNK',
                             is_hetero=True, ampal_parent=Polypeptide)
            atoms = OrderedDict()
            atoms['CA'] = Atom([-1.4210, 0.4120, 0.0000], 'C',
                               res_label='CA', ampal_parent=Ligand)
            atoms['C'] = Atom([0.0120, -0.0560, 0.0020], 'C',
                              res_label='C', ampal_parent=Ligand)
            atoms['O'] = Atom([0.2610, -1.2380, 0.0000], 'O',
                              res_label='O', ampal_parent=Ligand)
            atoms['OXT'] = Atom([1.0110, 0.8400, 0.0000],
                                'O', res_label='OXT', ampal_parent=Ligand)
            acetate.atoms = atoms
            s1, e1, s2, e2 = [
                x._vector for x in [acetate['CA'],
                                    acetate['C'],
                                    self._monomers[-1]['CA'],
                                    self._monomers[-1]['C']]]
            translation, angle, axis, point = find_transformations(
                s1, e1, s2, e2, radians=False)
            acetate.rotate(angle=angle, axis=axis, point=point, radians=False)
            acetate.translate(vector=translation)
            start_angle = dihedral(
                self._monomers[-1]['N'], self._monomers[-1]['CA'],
                self._monomers[-1]['C'], acetate['O'])
            ref_angle = dihedral(
                self._monomers[-1]['N'], self._monomers[-1]['CA'],
                self._monomers[-1]['C'], self._monomers[-1]['O'])
            if cap_dihedral is not False:
                acetate.rotate(
                    ref_angle - start_angle + cap_dihedral,
                    axis=acetate['C']._vector - acetate['CA']._vector,
                    point=acetate['C']._vector)
            else:
                acetate.rotate(
                    ref_angle - start_angle,
                    axis=acetate['C']._vector - acetate['CA']._vector,
                    point=acetate['C']._vector)
            acetate['OXT'].ampal_parent = self._monomers[-1]
            self._monomers[-1].atoms['OXT'] = acetate['OXT']
            diff = acetate['O']._vector - self._monomers[-1]['O']._vector
            self._monomers[-1]['O']._vector += diff
        elif cap == 'amide':
            acetamide = Ligand(atoms=None, mol_code='UNK', is_hetero=True)
            atoms = OrderedDict()
            atoms['CA'] = Atom([-0.4040, 0.0000, 1.4030], 'C', res_label='CA')
            atoms['C'] = Atom([0.0580, 0.0000, -0.0300], 'C', res_label='C')
            atoms['O'] = Atom([1.2440, 0.0000, -0.2840], 'O', res_label='O')
            atoms['NH2'] = Atom([-0.8450, 0.0000, -1.0300],
                                'N', res_label='NH2')
            acetamide.atoms = atoms
            s1, e1, s2, e2 = [
                x._vector for x in [acetamide['CA'],
                                    acetamide['C'],
                                    self._monomers[-1]['CA'],
                                    self._monomers[-1]['C']]]
            translation, angle, axis, point = find_transformations(
                s1, e1, s2, e2, radians=False)
            acetamide.rotate(angle=angle, axis=axis,
                             point=point, radians=False)
            acetamide.translate(vector=translation)
            start_angle = dihedral(
                self._monomers[-1]['N'], self._monomers[-1]['CA'],
                self._monomers[-1]['C'], acetamide['O'])
            ref_angle = dihedral(
                self._monomers[-1]['N'], self._monomers[-1]['CA'],
                self._monomers[-1]['C'], self._monomers[-1]['O'])
            if cap_dihedral is not False:
                acetamide.rotate(
                    ref_angle - start_angle + cap_dihedral,
                    axis=acetamide['C']._vector - acetamide['CA']._vector,
                    point=acetamide['C']._vector)
            else:
                acetamide.rotate(
                    ref_angle - start_angle,
                    axis=acetamide['C']._vector - acetamide['CA']._vector,
                    point=acetamide['C']._vector)
            if self.ligands is None:
                self.ligands = LigandGroup(ampal_parent=self)
            amide = Ligand(mol_code='NH2', ampal_parent=self.ligands)
            amide_atoms = OrderedDict([('NH2', acetamide['NH2'])])
            amide_atoms['NH2'].ampal_parent = amide
            amide.atoms = amide_atoms
            self.ligands.append(amide)
        else:
            pass
        self.tags['assigned_ff'] = False
        return