effect of cell_lock on ionic T in v 1.50.4

Questions and discussions regarding the use of Qbox
Forum rules
You must be a registered user to post in this forum. Registered users may also post new topics if they consider that their subject does not correspond to any topic already present on the forum.
Post Reply
gpanchap
Posts: 11
Joined: Mon May 24, 2010 1:25 am

effect of cell_lock on ionic T in v 1.50.4

Post by gpanchap »

Dear Francois,

I recently saw the bug -fix in v 1.50.4 where the ionic-T was found to be off due to an uninitialized constraint variable. Would you think this would affect the ionic-temp. if the only constraint was via cell_lock = S with an ext_stress = 'some stress value' ? i.e. no constraint explicitly set on the atoms.

I will start with the latest version soon, but would like to know if I should trust the old results.

Thanks,
Ganesh
fgygi
Site Admin
Posts: 151
Joined: Tue Jun 17, 2008 7:03 pm

Re: effect of cell_lock on ionic T in v 1.50.4

Post by fgygi »

Hi Ganesh,
The bug fixed in 1.50.4 was caused by an uninitialized variable in ConstraintSet that counts the number of degrees of freedom (DOFs) affected by atomic constraints. The total number of DOFs is normally 3*natoms. If constraints on atoms are present (such as distance constraints, angle constraints, etc.) the number of DOFs must be decreased by the number of DOFs that are "blocked" by the constraints. This last number is kept in ConstraintSet and was left uninitialized before 1.50.4.
The possible consequence of that is that the computed ionic temperature <temp_ion> can be incorrect, since it is derived from the ionic kinetic energy divided by the number of DOFs. In practice, we have seen a couple instances where this happened. The good news is that it can be detected easily even after a run is completed. This is because the printed value of the ionic kinetic energy <ekin_ion> is still correct, since it is not affected by the number of DOFs.

Thus you can check the correctness of simulations done with pre-1.50.4 versions as follows:

1. extract the values of <ekin_ion> during the entire simulation
2. extract the values of <temp_ion> during the entire simulation
3. Compute the ratio temp_ion / ekin_ion for each step. This ratio should be constant and equal to 315791 / ( 1.5 * Ndofs ). This relation comes from the Boltzmann constant (kB=1/315791 in atomic units) and the relation Ekin = 1.5 * kB * T * Ndofs.

In the (apparently rare) situation where Ndofs would be computed incorrectly, the ratio would deviate from this value.

Note that the constraints defined by cell_lock only affect the cell parameters and have no relation to the atomic constraints. They do not affect the calculation of the ionic temperature.
fgygi
Site Admin
Posts: 151
Joined: Tue Jun 17, 2008 7:03 pm

Re: effect of cell_lock on ionic T in v 1.50.4

Post by fgygi »

This bug is resolved and described in the Qbox bugzilla database at http://fpmd.ucdavis.edu/bugs/show_bug.cgi?id=15.
Post Reply