I dont think you can optimize just the angles, it is possible in each direction. In the other side you can optimize with keeping volume constant.
If the angles of your lattice are moving in the same magnitude, you can make a series of SCF for several structure with different value of angles and then you plot the energies as function of angles to find the most stable structure.
If I understand the question correctly, you want to optimise the angles (in a triclinic structure), but fix the lattice parameters a, b, c.
In principle, you should be able to do this by adding a block like this to your *cell-file:
%BLOCK CELL_CONSTRAINTS
0 0 0
1 2 3
%ENDBLOCK CELL_CONSTRAINTS
(The opposite example, optimisation of lattice parameters with fixed angles, is shown here: http://www.tcm.phy.cam.ac.uk/castep/documentation/WebHelp/content/modules/castep/keywords/k_cell_constraints_castep.htm)
However, to be frank, I have no idea why one would like to optimise only the angles. I've certainly never tried it.
Dr Fischer is quite correct, you can optimise the angles for fixed a, b, c lattice parameters in CASTEP if you wish, exactly as he posts. You can also perform the optimisation whilst keeping some (or all) of the angles equal, e.g.
%BLOCK CELL_CONSTRAINTS
0 0 0
1 1 2
%ENDBLOCK CELL_CONSTRAINTS
would keep alpha=beta.
The general form of the CELL_CONSTRAINTS block is that the six integers represent constraints on lengths a, b, c (top row) and angles alpha, beta, gamma (bottom row) respectively. An integer value of 0 means that parameter is to be fixed (i.e. not optimised); a non-zero integer means the parameter is to be optimised. Wherever the same non-zero integer is specified for more than one lattice parameter, those parameters are forced to have the same value (though it doesn't make sense to fix a length to an angle, of course).