[gmx-users] switching and shifting in GMX 4.6 on GPUs

Jesper Sørensen jesorensen at ucsd.edu
Mon Apr 15 19:32:15 CEST 2013


Hi Richard,

Thanks for the reply. It was very helpful.
I've looked at the updated manual regarding the x-modifiers and that cleared it up for me.

Best regards,
Jesper


On Apr 13, 2013, at 4:48 AM, "Broadbent, Richard" <richard.broadbent09 at imperial.ac.uk> wrote:

> 
> 
> On 12/04/2013 21:50, "Jesper Sørensen" <jesorensen at ucsd.edu> wrote:
> 
>> Hi Berk and others,
>> 
>> Sorry it has been a long time since this issue was posted, but I got
>> side-tracked from this issue with other projects. And I want to make sure
>> I understand this correctly before venturing into more simulations. So
>> this gets a little long winded, but I hope you will help me figure this
>> out.
>> 
>> So following up on the last emails perhaps the nomenclature is not
>> consistent among the programs - which I shoudn't expect it to be either,
>> so that is okay.
>> I know this is the GMX list, but for clarity I will just describe what
>> NAMD does, because it relates to how to run lipids in GMX (particularly
>> with the GPU).
>> NAMD:
>> * When the switching function is on: "a smooth switching function will be
>> used to truncate the van der Waals potential energy smoothly at the
>> cutoff distance". 
>> * A new "vdwForceSwitching" method is available as of version 2.7 - which
>> applies a force-based switching function to the VDW term - similar I
>> guess to how CHARMM does it.
>> GMX:
>> * The switch nomenclature is similar/identical to that in NAMD, in that
>> the potential "energy" is switched off.
> 
> I can't speak for what NAMD does but this is not what it means in gromacs
> (or any other MD code I've used). Switched adds a function (which starts
> at the rcoulomb-switch/rvdw-switch) that smoothly takes both the Energy
> and the Force to 0 at the cut-off radius. It is the cut-off scheme used to
> parameterise the force-field I use OPLS-AA and I am certain it was used
> for many others. It is not supported by the Verlet-cut-off scheme
> 
>> * The "shift" method in Gromacs is equivalent to the  "vdwForceSwitching"
>> method in NAMD.
> 
> I doubt it but again I've not used NAMD, shift applies a shift to the
> Non-bonded potential over its such that the Energy but not the Force goes
> to 0 at the cut-off, this method does work with the Verlet cut-off scheme
> and is supported on GPU's. If it is not the method used to parameterise
> your forcefield, you will have to either perform simulations to check the
> effect this has on your system and alter your cut-off's accordingly, or
> find a paper that has done this for you in the literature.
> 
>> 
>> And from what Berk was saying earlier and I heard this from Prof. Lindahl
>> during the GPU webinar the other day too, the "shift" method is the only
>> appropriate option and switching should not be used. It seems that this
>> option is the one used for lipids in NAMD and CHARMM also, so that is
>> great.
>> 
>> Now regarding the GPU's you have to run with Verlet groups and here is
>> where it get confusing because looking at the comparison table on the
>> website "http://www.gromacs.org/Documentation/Cut-off_schemes" ( I've
>> extracted the important features of this table below).
>> The switched interactions are not available using the Verlet groups and
>> that is okay since that shouldn't be used anyways. But, the shifted
>> interactions are "available", but only for the "energy" - now did we not
>> just agree that when it is the energy that it should be called a
>> "switched interaction"? Am I missing something here?
> 
> This is an issue due to you miss understanding the places where these
> terms are documented very clearly.
> 
>> 
>> Non-bonded interaction feature	group			Verlet
>> exact cut-off						shift/switch		X
>> cut-off							X				X
>> shifted interactions				force+energy	energy
>> switched interactions				X	
>> 
>> When I asked Prof. Lindahl during the excellent GPU webinar the other
>> day, he said that switching was implemented and that is sort of what this
>> table says too, but when we try to run a simulation using either switch
>> or shift on the GPU we get the following error:
>> "With Verlet lists only cut-off LJ interactions are supported"
>> 
>> Now I can switch to an exact cut-off method at the cost of making the
>> potential abruptly change to zero at the cut-off - minimizing the
>> abruptness can be achieved by extending the cut-off, but then for the
>> lipids CHARMM, MARTINI, and others, the cut-off seems to be an integral
>> part of the force field development and changing it could prove
>> problematic. So this leaves me to think that lipids simulations shouldn't
>> be run on the GPU as it is currently, at least not without extensive
>> testing.
> 
> In the 4.6 manual and in the online documentation it explains about new
> options which are used to control the cut-off scheme see:
> http://manual.gromacs.org/online/mdp_opt.html#el
> 
> Using these you can use a shifted cut-off and if necessary for your
> Force-field correct for the mild discontinuity in the force either by
> looking in the literature or as Berk Hess described below combined with
> some test simulations.
> 
> I hope this helps clarify things,
> 
> Richard
> 
>> 
>> I'd appreciate any comments to all this rambling that can help clarify
>> this for me...
>> 
>> Thanks,
>> Jesper
>> 
>> 
>> 
>> 
>> 
>> On Jan 25, 2013, at 12:29 AM, Berk Hess <gmx3 at hotmail.com> wrote:
>> 
>>> 
>>> Hi,
>>> 
>>> The nomenclature is confusing here.
>>> I don't recall the details of the switching in CHARMM.
>>> But switch in Gromacs refers to switching the potential.
>>> Shift in Gromacs refers to switching the force and thereby shifting the
>>> potential.
>>> 
>>> A switch on the force only (thus "shift" in Gromacs) can usually be
>>> matched pretty
>>> well by a plain cut-off with shifted potential by choosing the cut-off
>>> such that either
>>> the LJ potential matches the potential over the non-switched area or
>>> the total LJ potential
>>> energy matches for the system of interest. I expect these two cut-offs
>>> to be very similar.
>>> 
>>> Cheers,
>>> 
>>> Berk
>>> 
>>> ----------------------------------------
>>>> Subject: Re: [gmx-users] switching and shifting in GMX 4.6 on GPUs
>>>> From: jesorensen at ucsd.edu
>>>> Date: Thu, 24 Jan 2013 14:20:09 -0800
>>>> To: gmx-users at gromacs.org
>>>> 
>>>> Hi Berk,
>>>> 
>>>> I am running membrane simulations using both the CHARMM36 and MARTINI
>>>> v. 2.1 parameters.
>>>> So both those cut-off treatments are important to me, but if there are
>>>> ways around it I'd be happy to explore them to be able to use the GPUs.
>>>> The place it would be most effective would probably be for the all-atom
>>>> simulations, as the number of particles is much higher in general, so
>>>> switching would be the most important at this stage.
>>>> 
>>>> On a similar note the switching done in gromacs is by the energy -
>>>> correct? This has been mentioned as an issue for the CHARMM36 lipid
>>>> parameters as it is the forces that are "normally" switched off in both
>>>> CHARMM and NAMD, although both options are available there. The
>>>> difference I am told results in a smaller area/lipid for the bilayers.
>>>> 
>>>> Best,
>>>> Jesper
>>>> 
>>>> On Jan 24, 2013, at 1:09 PM, Berk Hess <gmx3 at hotmail.com> wrote:
>>>> 
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am not a fan of especially switching the potential, as that
>>>>> produces artifacts.
>>>>> Shifting is less harmful, but unnecessary in nearly all cases.
>>>>> But I do realize some force fields require this (although you can
>>>>> probably find a cut-off
>>>>> setting at which results would be very similar).
>>>>> Another reason for not implementing everything right away, is that it
>>>>> would increase the number
>>>>> of CPU and GPU kernels by a factor 3.
>>>>> 
>>>>> What type(s) of LJ cut-off treatments would you consider most
>>>>> important?
>>>>> I know that CHARMM uses a switch function and Martini uses shift.
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Berk
>>>>> 
>>>>> ----------------------------------------
>>>>>> From: jesorensen at ucsd.edu
>>>>>> Date: Thu, 24 Jan 2013 12:43:30 -0800
>>>>>> To: gmx-users at gromacs.org
>>>>>> Subject: [gmx-users] switching and shifting in GMX 4.6 on GPUs
>>>>>> 
>>>>>> Dear GMX developers,
>>>>>> 
>>>>>> Thanks so much for the GMX 4.6 release. Testing on GPUs has shown
>>>>>> impressive speed-ups.
>>>>>> 
>>>>>> I have a question however, regarding the missing "switching and
>>>>>> shifting" for non-bonded interactions.
>>>>>> I looked at the developer zone website and saw this comment below:
>>>>>> 
>>>>>> http://www.gromacs.org/Developer_Zone/Roadmap/GROMACS_4.6
>>>>>> * Features currently not supported by the new GPU and SSE kernels:
>>>>>> ** Switch and shift interactions (but those are not important, as
>>>>>> there is an exact cut-off)
>>>>>> 
>>>>>> While the statement maybe true that they are not "important", some
>>>>>> force fields are very particular about the use of switching and
>>>>>> shifting, as it is integral to the FF development.
>>>>>> So to my question, is there a timeframe for these features being
>>>>>> implemented?
>>>>>> 
>>>>>> I realized things like this take time, so I am merely asking out of
>>>>>> curiosity.
>>>>>> 
>>>>>> Best regards,
>>>>>> Jesper
>>>>>> 
>>>>>> 
>>>>>> --
>>>>>> gmx-users mailing list gmx-users at gromacs.org
>>>>>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>>>>>> * Please search the archive at
>>>>>> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>>>>>> * Please don't post (un)subscribe requests to the list. Use the
>>>>>> www interface or send it to gmx-users-request at gromacs.org.
>>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>>> --
>>>>> gmx-users mailing list gmx-users at gromacs.org
>>>>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>>>>> * Please search the archive at
>>>>> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>>>>> * Please don't post (un)subscribe requests to the list. Use the
>>>>> www interface or send it to gmx-users-request at gromacs.org.
>>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>>> 
>>>> --
>>>> gmx-users mailing list gmx-users at gromacs.org
>>>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>>>> * Please search the archive at
>>>> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>>>> * Please don't post (un)subscribe requests to the list. Use the
>>>> www interface or send it to gmx-users-request at gromacs.org.
>>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>> 		 	   		  -- 
>>> gmx-users mailing list    gmx-users at gromacs.org
>>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>>> * Please search the archive at
>>> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>>> * Please don't post (un)subscribe requests to the list. Use the
>>> www interface or send it to gmx-users-request at gromacs.org.
>>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>> 
>> -- 
>> gmx-users mailing list    gmx-users at gromacs.org
>> http://lists.gromacs.org/mailman/listinfo/gmx-users
>> * Please search the archive at
>> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
>> * Please don't post (un)subscribe requests to the list. Use the
>> www interface or send it to gmx-users-request at gromacs.org.
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> 
> -- 
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> * Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-users-request at gromacs.org.
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists




More information about the gromacs.org_gmx-users mailing list