I was running Castep simulation for total energy for LixCoO2 and found no difference in the total energy of crystal while occupancy of Li being 1 or 0.5 or 0.35.Whats the problem here
How are you modeling fractional occupancy? In an x-ray structure it is common to report that a position has fractional occupancy, (1/n) which implies that 1/n-th of such positions are occupied in an ensemble of unit cells. At the microscopic level, however, a given position is either occupied or it is not, and that is generally true in a computational model as well. If a position is half occupied, one must model a super-cell by combining two adjacent unit cells, then fill the position in one half of the super-cell and leave it empty in the other half. This can impart more long-range order into the model than is actually present in the real material, but it's generally a good first-order approximation.
I suggest you double-check that you are using fractional atomic occupancy -- not all input file converters will include fractional atomic occupation, some just set it to "1". In your positions block you should see something like:
Li 0.125 0.125 0.125 MIXTURE:( 1 0.35 )
i.e. a "mixed" atom has been defined, which is 0.35 of a lithium atom.
This will use the Virtual Crystal Approximation (VCA) to compute the energy; as Karl said, it is usually much better to use a supercell and do explicit vacancies.