[gmx-developers] Total dipole incorrect in energy file

Berk Hess hess at cbr.su.se
Tue Jan 26 09:27:31 CET 2010


David van der Spoel wrote:
> On 1/26/10 6:18 AM, Tsjerk Wassenaar wrote:
>> Hi David,
>>
>> Shifting over PBC is only done at the end of a step. Before that you
>> can use the displacements to calculate the change in the dipole:
>>
>> m(t) = sum( qi * xi(t) )
>> xi(t) = xi(t-1) + di
>> m(t) = m(t-1) + sum( qi * di )
>>
>> If you really want to, you can even do it with velocities. By updating
>> the existing vector you don't have to know in which box the particle
>> is, and you only need to communicate one dvec to sum on the master for
>> output.
>
> I had been thinking along those line too. So di = dv dt (after
> correction for constraints). So after the update one could have an
> update of the total dipole. One does have to compute an initial Mu(0)
> from the coordinates of course. The simple advantage of this is that
> there is no PBC in the velocities.
>
> Berk, do you have any objections?
Yes, I have objections.
Stability will be an issue. So you will probably need to recalculate the
dipole from x (with whole
molecules) every N steps. This also introduces a dependency on an old
state and it complicates
continuation, where you never have whole molecules with DD.
Also with pressure scaling this will get complicated.
And still it will only work with molecules without net charge.

But it sound like an approach that might be useful for certain systems.
I you want to implement this, I would suggest making the dipole output
optional.

Berk
>
> I will try it out later today.
>
>>
>> Cheers,
>>
>> Tsjerk
>>
>> On Mon, Jan 25, 2010 at 10:40 PM, David van der Spoel
>> <spoel at xray.bmc.uu.se>  wrote:
>>> On 1/25/10 10:12 PM, Tsjerk Wassenaar wrote:
>>>>
>>>> Hi,
>>>>
>>>> Isn't it possible to update the dipole from displacements?
>>>>
>>>>
>>>
>>> I don't think so because at each time step you can have many
>>> displacements
>>> of atoms over PBC borders.
>>>>
>>>> Cheers,
>>>>
>>>> Tsjerk
>>>>
>>>> On Mon, Jan 25, 2010 at 8:29 PM, David van der Spoel
>>>> <spoel at xray.bmc.uu.se>    wrote:
>>>>
>>>>>
>>>>> On 1/25/10 5:35 PM, Berk Hess wrote:
>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> We can't make molecules whole in the general case with DD.
>>>>>> But also the dipole moment will only make sense for systems without
>>>>>> molecules with net charge.
>>>>>> So I think we should remove it from the energy file.
>>>>>>
>>>>>>
>>>>>
>>>>> OK, shall I do that in the master branch?
>>>>>
>>>>>
>>>>>>
>>>>>> This will mean that we can not append to old energy files, you
>>>>>> will get
>>>>>> a fatal error in that case.
>>>>>>
>>>>>>
>>>>>
>>>>> That is already implemented I presume?
>>>>>
>>>>>
>>>>>>
>>>>>> Berk
>>>>>>
>>>>>> David van der Spoel wrote:
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> it used to be so that mdrun did not break molecules. However,
>>>>>>> nowadays
>>>>>>> it does, even though they are fixed before writing the
>>>>>>> coordinates. I
>>>>>>> suspect however that the broken molecules are not fixed before
>>>>>>> computing the total dipole, which is stored in the energy file. The
>>>>>>> total dipole is used for computing the dielectric constant in
>>>>>>> g_dipoles.
>>>>>>>
>>>>>>> With the current g_dipoles I get good dielectric constants when
>>>>>>> using
>>>>>>> the coordinates, and insane (500) when using the energy file.
>>>>>>>
>>>>>>> If this observation is correct we can do two things:
>>>>>>> - fix the coordinates at every step before computing the total
>>>>>>> dipole
>>>>>>> - not compute abd save the total dipole at all and remove the -en
>>>>>>> option from g_dipoles
>>>>>>>
>>>>>>> I guess the decision depends on whether the CPU time for
>>>>>>> reconstrucing
>>>>>>> the molecules before computing the total dipole is large or not.
>>>>>>> Maybe
>>>>>>> Berk can comment on that, obviously there is a reason for not
>>>>>>> doing it
>>>>>>> every step.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>> -- 
>>>>> David.
>>>>> ________________________________________________________________________
>>>>>
>>>>> David van der Spoel, PhD, Professor of Biology
>>>>> Dept. of Cell and Molecular Biology, Uppsala University.
>>>>> Husargatan 3, Box 596,          75124 Uppsala, Sweden
>>>>> phone:  46 18 471 4205          fax: 46 18 511 755
>>>>> spoel at xray.bmc.uu.se    spoel at gromacs.org  
>>>>> http://xray.bmc.uu.se/~spoel
>>>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>>>
>>>>>
>>>>> -- 
>>>>> gmx-developers mailing list
>>>>> gmx-developers at gromacs.org
>>>>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>>>>> Please don't post (un)subscribe requests to the list. Use the www
>>>>> interface
>>>>> or send it to gmx-developers-request at gromacs.org.
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> -- 
>>> David.
>>> ________________________________________________________________________
>>>
>>> David van der Spoel, PhD, Professor of Biology
>>> Dept. of Cell and Molecular Biology, Uppsala University.
>>> Husargatan 3, Box 596,          75124 Uppsala, Sweden
>>> phone:  46 18 471 4205          fax: 46 18 511 755
>>> spoel at xray.bmc.uu.se    spoel at gromacs.org  
>>> http://xray.bmc.uu.se/~spoel
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>
>>>
>>> -- 
>>> gmx-developers mailing list
>>> gmx-developers at gromacs.org
>>> http://lists.gromacs.org/mailman/listinfo/gmx-developers
>>> Please don't post (un)subscribe requests to the list. Use the www
>>> interface
>>> or send it to gmx-developers-request at gromacs.org.
>>>
>>
>>
>>
>
>




More information about the gromacs.org_gmx-developers mailing list