[gmx-developers] Total dipole incorrect in energy file

Tsjerk Wassenaar tsjerkw at gmail.com
Tue Jan 26 06:18:27 CET 2010


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.

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



-- 
Tsjerk A. Wassenaar, Ph.D.

Computational Chemist
Medicinal Chemist
Neuropharmacologist



More information about the gromacs.org_gmx-developers mailing list