[gmx-developers] Lennard Jones and Electrostatic energies.

Szilárd Páll pall.szilard at gmail.com
Fri Oct 10 16:27:07 CEST 2014


Hi,

I think you'll have the easiest time with the plain C reference
kernels; the actual kernels used in production are compiled from SIMD
intrinsics code which you likely don't want to start reading (and from
where you can't even print).

For the Verlet cut-off scheme (default in 5.0) these are the files
with the reference implementation you should be looking at:
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref{,_inner,_outer}.c/h
- there is no single source file, but this should be quite easy to read.
There is a bit more readable GPU reference kernel (trigger with
GMX_EMULATE_GPU env. var.):
src/gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_gpu_ref.c
Finally, for the group scheme there's also self-contained reference kernel here:
src/gromacs/gmxlib/nonbonded/nb_generic.c

The first and last kernels for the CPU Verlet and Group scheme you can
trigger with the GMX_DISABLE_SIMD_KERNELS environment variable.

Cheers,
--
Szilárd

PS: make sure that the same interaction modifiers (switch, shift) are
used by both GROMACS and ACEMD.


On Fri, Oct 10, 2014 at 4:07 PM, IÑIGO SAENZ
<inigo.saenz01 at estudiant.upf.edu> wrote:
> Hi all,
>
> I'll try to explain to you my situation.
> I have a simple system of 3000 Argon atoms without bonds, without angles,
> without dihedrals, only with LJ parameters and I run it with ACEMD and I
> obtained a VDW potential of -1.34 KJ/mol.
> After this, I generate the same system for running in gromacs (.top and .gro
> files), I run it and I obtain a LJ energy of -1.32524.
> What I want is to include some print statements into the source files of
> gromacs in order to be able to analyze how gromacs performs the calculation
> of LJ potential to find where the desviation in the results between ACEMD
> and GROMACS is produced.
>
> The electrostatic configuration that I use in the .mdp file is the
> following:
>
> coulombtype = cut-off
> rlist                    = 0
> rcoulomb                 = 0.9
> rvdw                     = 0.9
>
> And here some lines of the mdp.log that might be of interest:
>
> Gromacs version:    VERSION 5.0.1
> Precision:          single
> Memory model:       64 bit
> MPI library:        thread_mpi
> OpenMP support:     enabled
> GPU support:        disabled
> invsqrt routine:    gmx_software_invsqrt(x)
> SIMD instructions:  AVX_256
>
> Thank you very much in advance.
>
> Iñigo Sáenz
> Universitat Pompeu Fabra, Barcelona.
>
>
>
>
> 2014-10-10 14:40 GMT+02:00 Berk Hess <hess at kth.se>:
>>
>> Hi,
>>
>> We might need a wiki entry for this, since this is a question that keeps
>> popping up, but it's unfortunately not easy to answer.
>>
>> Berk
>>
>>
>> On 10/10/2014 02:37 PM, Mark Abraham wrote:
>>
>> Hi,
>>
>> The simple answer is "in most of them" :-) The non-bonded kernels where
>> they are computed come in lots of physics and hardware flavours, and then
>> there is a lot infrastructure that coordinates accumulating them properly.
>> We can point you in the right direction if we know what you're trying to
>> achieve, though.
>>
>> Mark
>>
>> On Fri, Oct 10, 2014 at 12:53 PM, IÑIGO SAENZ
>> <inigo.saenz01 at estudiant.upf.edu> wrote:
>>>
>>> Hi,
>>>
>>> Does anyone know in which .C file are the LJ and Coulomb short range
>>> interactions energies calculated, please?
>>> I'm getting crazy studying the gromacs' source code and I cannot find the
>>> right .C file where those calculations are made.
>>>
>>> Iñigo Sáenz
>>> Universitat Pompeu Fabra, Barcelona.
>>>
>>> --
>>> Gromacs Developers mailing list
>>>
>>> * Please search the archive at
>>> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
>>> posting!
>>>
>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>
>>> * For (un)subscribe requests visit
>>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers
>>> or send a mail to gmx-developers-request at gromacs.org.
>>
>>
>>
>>
>>
>>
>> --
>> Gromacs Developers mailing list
>>
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
>> posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers or
>> send a mail to gmx-developers-request at gromacs.org.
>
>
>
> --
> Gromacs Developers mailing list
>
> * Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before
> posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers or
> send a mail to gmx-developers-request at gromacs.org.


More information about the gromacs.org_gmx-developers mailing list