[gmx-developers] Total dipole incorrect in energy file

David van der Spoel spoel at xray.bmc.uu.se
Tue Jan 26 08:55:32 CET 2010


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?

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.
>>
>
>
>


-- 
David van der Spoel, Ph.D., Professor of Biology
Dept. of Cell & Molec. Biol., Uppsala University.
Box 596, 75124 Uppsala, Sweden. Phone:	+46184714205. Fax: +4618511755.
spoel at xray.bmc.uu.se	spoel at gromacs.org   http://folding.bmc.uu.se



More information about the gromacs.org_gmx-developers mailing list