lab-cosmo / i-pi-dev_archive

Development version of i-PI
21 stars 12 forks source link

Bug in quantum kinetic energy #169

Closed litman90 closed 6 years ago

litman90 commented 7 years ago

In line 707 of i-pi-dev/ipi/engine/properties.py the virial kinetic energy estimator doesn't take account that the number of degrees of freedom could be different that 3*natoms. (For example, when center of mass or atoms are fixed ). There is a similar problem in the quantum kinetic energy tensor estimator.

ceriottm commented 7 years ago

Discussing this with Mariana right now. It is not really a bug, more an arbitrary choice. Depends on whether you consider the fixed atoms as a model for infinitely-restrained atoms, or as an external buffer layer.

On 8 February 2017 at 19:18, litman90 notifications@github.com wrote:

In line 707 of i-pi-dev/ipi/engine/properties.py the virial kinetic energy estimator doesn't take account that the number of degrees of freedom could be different that 3*natoms. (For example, when center of mass or atoms are fixed ). There is a similar problem in the quantum kinetic energy tensor estimator.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/epfl-cosmo/i-pi-dev/issues/169, or mute the thread https://github.com/notifications/unsubscribe-auth/ABESZ8yFs5saxlU8qI8nGs4aig8ukaIDks5ragbwgaJpZM4L7LM3 .

ipoltavskyi commented 7 years ago

Hi,

This is a good opportunity to ask about another related thing which is useful to have in i-Pi but which is, as far as I know, not there yet. Can we make an option to fix positions of centroids for some particles? For instance this is important for thermodynamic integration. Is it in TODO list or future plans?

Best regards Igor

On 8 Feb 2017, at 20:30, Michele Ceriotti notifications@github.com wrote:

Discussing this with Mariana right now. It is not really a bug, more an arbitrary choice. Depends on whether you consider the fixed atoms as a model for infinitely-restrained atoms, or as an external buffer layer.

On 8 February 2017 at 19:18, litman90 notifications@github.com wrote:

In line 707 of i-pi-dev/ipi/engine/properties.py the virial kinetic energy estimator doesn't take account that the number of degrees of freedom could be different that 3*natoms. (For example, when center of mass or atoms are fixed ). There is a similar problem in the quantum kinetic energy tensor estimator.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/epfl-cosmo/i-pi-dev/issues/169, or mute the thread https://github.com/notifications/unsubscribe-auth/ABESZ8yFs5saxlU8qI8nGs4aig8ukaIDks5ragbwgaJpZM4L7LM3 .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/epfl-cosmo/i-pi-dev/issues/169#issuecomment-278435553, or mute the thread https://github.com/notifications/unsubscribe-auth/ATHKI-dneQxuwq4E-vZY1F8mabhCaCVKks5rahe6gaJpZM4L7LM3.

ceriottm commented 7 years ago

Hi Igor, it's not completely trivial to do, but in principle it is feasible. I'd say the easiest would be done as an option to fixatoms. you specify how many NM you want to block, with the default being all of them.

On 8 February 2017 at 20:49, ipoltavskyi notifications@github.com wrote:

Hi,

This is a good opportunity to ask about another related thing which is useful to have in i-Pi but which is, as far as I know, not there yet. Can we make an option to fix positions of centroids for some particles? For instance this is important for thermodynamic integration. Is it in TODO list or future plans?

Best regards Igor

On 8 Feb 2017, at 20:30, Michele Ceriotti notifications@github.com wrote:

Discussing this with Mariana right now. It is not really a bug, more an arbitrary choice. Depends on whether you consider the fixed atoms as a model for infinitely-restrained atoms, or as an external buffer layer.

On 8 February 2017 at 19:18, litman90 notifications@github.com wrote:

In line 707 of i-pi-dev/ipi/engine/properties.py the virial kinetic energy estimator doesn't take account that the number of degrees of freedom could be different that 3*natoms. (For example, when center of mass or atoms are fixed ). There is a similar problem in the quantum kinetic energy tensor estimator.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/epfl-cosmo/i-pi-dev/issues/169, or mute the thread https://github.com/notifications/unsubscribe-auth/ ABESZ8yFs5saxlU8qI8nGs4aig8ukaIDks5ragbwgaJpZM4L7LM3 .

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/epfl-cosmo/i-pi-dev/issues/169#issuecomment-278435553>, or mute the thread https://github.com/notifications/unsubscribe- auth/ATHKI-dneQxuwq4E-vZY1F8mabhCaCVKks5rahe6gaJpZM4L7LM3.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/epfl-cosmo/i-pi-dev/issues/169#issuecomment-278441176, or mute the thread https://github.com/notifications/unsubscribe-auth/ABESZ-nXXQPBTLEalImwLfKv3CZNcJybks5rahxYgaJpZM4L7LM3 .

mahrossi commented 7 years ago

I think we decided to make the classical kinetic energy output in the presence of fixed atoms consistent with the definition of the kinetic_cv (add kTs). Assigning myself to the task.

ceriottm commented 7 years ago

So how are we doing on this?

mahrossi commented 7 years ago

Should I just change the default for the classical kinetic energy for constrained atoms?

On Thu, Mar 16, 2017 at 3:02 AM, Michele Ceriotti notifications@github.com wrote:

So how are we doing on this?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cosmo-epfl/i-pi-dev/issues/169#issuecomment-286984251, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbkQlKOCLu3Zt09eb7Bd1Q50EOvRqpcks5rmOyagaJpZM4L7LM3 .

ceriottm commented 7 years ago

yes, I think it works to have a fictitious KE assigned to the fixed degrees of freedom. michele

On 16 March 2017 at 15:35, Mariana Rossi notifications@github.com wrote:

Should I just change the default for the classical kinetic energy for constrained atoms?

On Thu, Mar 16, 2017 at 3:02 AM, Michele Ceriotti < notifications@github.com> wrote:

So how are we doing on this?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/cosmo-epfl/i-pi-dev/issues/169# issuecomment-286984251, or mute the thread https://github.com/notifications/unsubscribe-auth/ AGbkQlKOCLu3Zt09eb7Bd1Q50EOvRqpcks5rmOyagaJpZM4L7LM3

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cosmo-epfl/i-pi-dev/issues/169#issuecomment-287076614, or mute the thread https://github.com/notifications/unsubscribe-auth/ABESZ6G-62N5Uz3Sc9m6PCaBlvP_AVjEks5rmUiggaJpZM4L7LM3 .

mahrossi commented 7 years ago

Finally doing this in ke-fix branch. Still had no time to test -- slightly tricky due to all the options and the definition of temperature. Will test later.

venkatkapil24 commented 6 years ago

@mahrossi @litman90 : I was wondering if this has been fixed.

mahrossi commented 6 years ago

Hi Venkat, my understanding is that this was solved when we merged the way we distribute the classical kinetic energy through the degrees of freedom in the other commit last week.

On Tue, Nov 28, 2017 at 11:11 AM, Venkat Kapil notifications@github.com wrote:

@mahrossi https://github.com/mahrossi @litman90 https://github.com/litman90 : I was wondering if this has been fixed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cosmo-epfl/i-pi-dev/issues/169#issuecomment-347475534, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbkQj43AhFXG-TvL0s5sgZD2YjRAudvks5s69xugaJpZM4L7LM3 .

venkatkapil24 commented 6 years ago

I am not 100 % sure since get_kincv() doesn't call get_temp or get_kinmd().

mahrossi commented 6 years ago

Right, but the problem was just an inconsistency between the way get_kincv was handling the fixed degrees of freedom and the way get_kinmd() was handling them. In the thread here above we decided to change only the way get_kinmd() was handling it, which it seems has been done in the last commit.

On Tue, Nov 28, 2017 at 11:44 AM, Venkat Kapil notifications@github.com wrote:

I am not 100 % sure since get_kincv() doesn't call get_temp or get_kinmd().

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cosmo-epfl/i-pi-dev/issues/169#issuecomment-347484129, or mute the thread https://github.com/notifications/unsubscribe-auth/AGbkQivZ_GmEClIRMnm-bSEc7eZ8ZRBIks5s6-QZgaJpZM4L7LM3 .