Re: [gmx-users] User tabulated potential and VdW Modifier

2019-03-14 Thread Kiesel, Matthias
Hello everybody,

I sent a message a week back with the same title and I hope this gets put into 
the right thread now (did not know how to respond directly). I actually did 
some more testing and I think I found out how everything works and I'm going to 
leave this here in case someone else ever wonders.

vdw-modifier = potential-shift does not shift a user specified potential, this 
can be seen from the substantial energy drift in the NVE simulations in my 
first message, which was eliminated by feeding a user list with shifted 
potential.

The modifier, however, adds and additional term to the LRC, namely the 
correction for the "lost" potential energy inside the cutoff sphere (see Frenkl 
and Smit). This correction is  not calculated with the user tabulated 
potential, but rather with the LJ potential (and even using this I wasn't 
completely able to reproduce the value, I'm 3kJ/mol short, which is appr. 0.2%).

>From the behaviour of the potential modifier I used, I would also guess the 
>other modifiers do not work and gromacs overrides whatever I choose with 
>"None".

kind regards,

Matthias
-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.


[gmx-users] User tabulated potential and VdW Modifier

2019-03-07 Thread Kiesel, Matthias
Dear everyone,

My question concerns the effect of the mdp option "vdw-modifier" when vdwtype 
is set to user. I have a tabulated 8 - 6 Mie potential and I'm simulating a 
coarse grained water, NaCl system, which all interact with the same potential 
form but different dispersion coefficients. I wanted to check the energy 
conservation of that system and therefore set up a simulation as follows:

dt = 0.008

cutoff-scheme = group
rlist = 2.3

vdwtype = user
vdw-modifier = potential-shift
rvdw = 2
rvdw-switch = 2

coulomtype = PME-switch
rcoulomb = 2
rcoulomb-switch = 1.95

I will limit my discussion to the VdW energies, since I trust the PME algorithm 
and I did not change any of the settings in the following discussion. As far as 
I can judge, this system should be energy conserving, because the potential is 
shifted, and there is enough space between rvdw and rlist to allow for 
diffusion in between updates of the neighbourlist. However, this system 
exhibits an energy drift (total energy) of over 1000 kJ/mol over the course of
30.000 integration steps. On a side note, I also calculated the LJ long range 
corrections, which is -1888 kJ/mol.
After this simulation I thought, that the vdw-modifier does not affect the 
tabulated potential. Therefore, I calculated a shifted version of my potential 
and fed it to gromacs with the same parameters except:

vdw-modifier = none

which effectively should enforce a cutoff equal to that in my tabulated 
potential (2nm). This setup conserves the energy (Drift ~ 0.4 kJ/mol) and gives 
me a slightly higher LJ energy, which I expected. However, the long range 
correction was different: -946 kJ/mol (appr. half). This seemed odd to me, so I 
played around with some settings and found that the LR correction took the 
value of -946 for  vdw-modifier = none and -1888 for vdw-modifier = 
potential-shift. This was also true for a setup with rlist = rvdw = rvdw-switch 
= 2 (and nstlist = 1), so it wasn't the difference between rlist and 
rvdw-switch.

According to the manual and grompp notes, the LR correction is calculated as 
-C6/r_c^6, which should be the same for all simulations, but apparently the 
vdw-modifier changes something somewhere. Does anyone have an explanation on 
what's the reason for the behaviour of the LR correction? And also, more 
generally, are vdw modifier supposed to work for user lists (and if so, why did 
my initial setup not work)?

Thank you very much in advance,

Matthias




-- 
Gromacs Users mailing list

* Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_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-users or send a 
mail to gmx-users-requ...@gromacs.org.