On 12/20/13 12:09 PM, ploetz wrote:
Hi Justin,

Thanks for your reply. I agree with you that the .mdp file rlist=rcoul=rvdw 
cutoff is really being applied,
but the documentation in the manual about tabulated interaction functions does 
not
give me the impression that that is the intent. It reads like the user can have 
different cut-offs
by using table-extension (below).


Could you suggest how the text might be improved? Reading through it a couple of times, I still don't see how one would assume different cutoffs could be used for different interactions. Different potentials, yes, because you can tabulate whatever you like, but the values of the cutoffs are always fixed. Of course, I am reading through the text knowing already how it works, so my interpretation may be different. Suggestions on improvements are always welcome, especially in the case of clarity!

-Justin

Elizabeth
-----

6.9.2 User-specified potential functions

You can also use your own s without editing the GROMACS code. The potential 
function should

be according to the following equation 
V(rij)=[qiqj/(4pi*epsilon0)]f(rij)+C6g(rij)+C12h(rij) (6.75)

where f, g, and h are user defined functions. Note that if g(r) represents a 
normal dispersion

interaction, g(r) should be < 0. C6, C12 and the charges are read from the 
topology. Also note

that combination rules are only supported for Lennard-Jones and Buckingham, and 
that your tables

should match the parameters in the binary topology.

When you add the following lines in your .mdp file:

rlist = 1.0

coulombtype = User

rcoulomb = 1.0

vdwtype = User

rvdw = 1.0

mdrun will read a single non-bonded table file, or multiple when 
energygrp-table is set (see

below). The name of the file(s) can be set with the mdrun option -table. The 
table file should

contain seven columns of table look-up data in the order: x, f(x), -f'(x), 
g(x), -g'(x), h(x),

-h'(x). The x should run from 0 to rc + 1 (the value of table_extension can be 
changed

in the .mdp file). You can choose the spacing you like; for the standard tables 
GROMACS uses a

spacing of 0.002 and 0.0005 nm when you run in single and double precision, 
respectively. In this

context, rc denotes the maximum of the two cut-offs rvdw and rcoulomb (see 
above). These

variables need not be the same (and need not be 1.0 either). Some functions 
used for potentials

contain a singularity at x = 0, but since atoms are normally not closer to each 
other than 0.1 nm,

the function value at x = 0 is not important. Finally, it is also possible to 
combine a standard

Coulomb with a modified LJ potential (or vice versa). One then specifies e.g. 
coulombtype =

Cut-off or coulombtype = PME, combined with vdwtype = User. The table file must

always contain the 7 columns however, and meaningful data (i.e. not zeroes) 
must be entered in

all columns. A number of pre-built table files can be found in the GMXLIB 
directory for 6-8, 6-9,

6-10, 6-11, and 6-12 Lennard-Jones potentials combined with a normal Coulomb.

If you want to have different functional forms between different groups of 
atoms, this can be set

through energy groups. Different tables can be used for non-bonded interactions 
between different

energy groups pairs through the .mdp option energygrp-table (see sec. 7.3). 
Atoms that

should interact with a different potential should be put into different energy 
groups. Between

group pairs which are not listed in energygrp-table, the normal user tables 
will be used.

This makes it easy to use a different functional form between a few types of 
atoms.


Also:

7.3.10 Electrostatics

coulombtype:

User

mdrun will now expect to find a file table.xvg with user-defined potential 
functions

for repulsion, dispersion and Coulomb. When pair interactions are present,

mdrun also expects to find a file tablep.xvg for the pair interactions. When the

same interactions should be used for non-bonded and pair interactions the user 
can

specify the same file name for both table files. These files should contain 7 
columns:

the x value, f(x), -f’(x), g(x), -g’(x), h(x), -h’(x), where f(x) is the

Coulomb function, g(x) the dispersion function and h(x) the repulsion function.

When vdwtype is not set to User the values for g, -g’, h and -h’ are ignored. 
For

the non-bonded interactions x values should run from 0 to the largest cut-off 
distance

+ table-extension and should be uniformly spaced. For the pair interactions the

table length in the file will be used. The optimal spacing, which is used for 
non-user

tables, is 0.002 [nm] when you run in single precision or 0.0005 [nm] when you

run in double precision. The function value at x=0 is not important. More 
information

is in the printed manual.


7.3.11 VdW

vdwtype:

User

See user for coulombtype. The function value at x=0 is not important. When

you want to use LJ correction, make sure that rvdw corresponds to the cut-off 
in the

user-defined function. When coulombtype is not set to User the values for f and

-f’ are ignored.


7.3.12 Tables

table-extension: (1) [nm]

Extension of the non-bonded potential lookup tables beyond the largest cut-off 
distance. The

value should be large enough to account for charge group sizes and the 
diffusion between

neighbor-list updates. Without user defined potential the same table length is 
used for the

lookup tables for the 1-4 interactions, which are always tabulated irrespective 
of the use of

tables for the non-bonded interactions.

energygrp-table:

When user tables are used for electrostatics and/or VdW, here one can give 
pairs of energy

groups for which seperate user tables should be used. The two energy groups 
will be appended

to the table file name, in order of their definition in energygrps, seperated by

underscores. For example, if energygrps = Na Cl Sol and energygrp-table

= Na Na Na Cl, mdrun will read table_Na_Na.xvg and table_Na_Cl.xvg in

addition to the normal table.xvg which will be used for all other energy group 
pairs.

________________________________
From: Justin Lemkul [via GROMACS] <ml-node+s5086n5013404...@n6.nabble.com>
Sent: Wednesday, December 18, 2013 20:23
To: Elizabeth Ploetz
Subject: Re: table-extension distance appears to be over-ridden by .mdp file 
cut-off values


Caveat to start: I am not an expert on tabulated potentials, but I'll take a
crack at helping in case it inspires a solution :)

Very thorough report, so thanks for providing an exemplary level of detail.

On 12/18/13 3:39 PM, Elizabeth Ploetz wrote:

Dear Gromacs Users,

I'm trying to use tabulated VdW potentials that are non-zero until 
image-distance/2.0, but they seem to be over-ridden by the cut-offs in the .mdp 
file. I'm hoping someone with experience with the use of tabulated potentials 
plus the table-extension .mdp file option can tell me if I have not made all of 
the necessary changes so that the tables are correctly implemented. Here are 
the details of what I've done.

I have five systems each consisting of a single Lennard-Jones (6-12) sphere in 
TIP3P water (rhombic dodecahedron, 15nm image-distance for each system). The 
Lennard-Jones parameters for the infinitely-dilute LJ-sphere are as follows:
System Sigma (nm) Epsilon (kJ/mol)
1             0.3             0.1
2             1.5             0.1
3             3.0             0.1
4             4.5             0.1
5             6.0             0.1
For each system, rlist=rvdw=rcoulomb=0.8 (nm). vdw-type=User, coulombtype=PME, 
table-extension=6.7 (nm). 6.7 nm was chosen because 6.7nm+0.8nm=7.5nm=half the 
image-distance. A tabulated potential is only used so that the LJ-sphere - 
water interactions can have a different (larger) cut-off than the water-water 
interactions since the sigma/2.0 values for the LJ-sphere are greater than the 
0.8 nm cut-off for Systems 3-5.


I'm not sure I follow the logic here.  The value of table-extension does not
give you a special cutoff, per se.

When I run these systems (version 4.6), the LJ-sphere-to-water center-of-mass RDFs look correct for Systems 1 and 2 (the two LJ-spheres 
that have a radius less than the rlist=rvdw=rcoulomb cut-off). The RDFs look "wrong" for all larger spheres, and worse and 
worse as the Lennard-Jones sigma values increase. By "wrong," I mean that the RDFs take on positive values at too short of 
radial distances (i.e., water is being "sucked in" too close to the Lennard-Jones sphere). This makes sense if my tabulated 
VdW-potentials are not really being used (or, equivalently, not being used beyond 0.8 nm), and consequently the waters do not 
"see" the LJ-sphere until they are <0.8 nm away from the sphere. The simulations for the larger LJ-spheres are also 
unstable, which would also make sense, because waters that could get so close to the sphere would be well within the repulsive region 
of the sphere-to-water potential once they finally suddenly "saw" the sphere at <0.8 nm. The types of er!
r!
  ors I get
when the systems crash (usually after around 20 ps) are domain decomposition 
errors, specifically:


Fatal error:
A charge group moved too far between two domain decomposition steps
This usually means that your system is not well equilibrated
For more information and tips for troubleshooting, please check the GROMACS
website at http://www.gromacs.org/Documentation/Errors

Or (when I change to particle-decomposition or use only one processor), the 
simulations eventually crash due to LINCS.

The details of my .mdp file and tabulated potentials are below my signature, as 
well as an example of the .log file output.

Have I missed any extra flags that need to be defined so that the tabulated 
potentials are really used [the .log file output suggests they are really being 
used and so does mdrun.debug (not attached, but I can provide)]? Or, does 
anyone know of a way to check whether or not the tabulated potentials are 
really being used up to the cut-off + table-extension and not just up to the 
cut-off?

Please note that, as a test, I did a series of energy minimizations on a simpler 
system, the Lennard-Jones sphere (sigma = 6 nm) and a single water molecule, when 
varying the coordinates of the water molecule systematically between 7.5 nm and 
0.3 nm away from the LJ-sphere. The LJ(SR) sphere-water potential energy was zero 
for all distances except when the water molecule was < 0.8 nm from the 
LJ-sphere. This, again, indicates that the rlist=rcoul=rvdw=0.8 nm cut-off 
distance is being used for the sphere-water interactions instead of the extended 
distance.


I think we need to clarify a bit about what those settings are doing.  The value
of table-extension does not give you some special value of cutoff for different
interactions.  It is used to keep track of interactions beyond the cutoff
between neighborlist updates.  I think your observations are consistent with a
0.8-nm cutoff, beyond which the energy is zero.

It seems to me that, given the LJ parameters above, as soon as any water
molecule moves within 0.8 nm of the LJ sphere in system 5, the potential will
spike to +1 billion kJ/mol or thereabouts, and the system will crash.

-Justin

--
==================================================

Justin A. Lemkul, Ph.D.
Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 601
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

[hidden email]</user/SendEmail.jtp?type=node&node=5013404&i=0> | (410) 706-7441

==================================================
--
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 [hidden 
email]</user/SendEmail.jtp?type=node&node=5013404&i=1>.


________________________________
If you reply to this email, your message will be added to the discussion below:
http://gromacs.5086.x6.nabble.com/table-extension-distance-appears-to-be-over-ridden-by-mdp-file-cut-off-values-tp5013400p5013404.html
To unsubscribe from table-extension distance appears to be over-ridden by .mdp file cut-off 
values, click 
here<http://gromacs.5086.x6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5013400&code=cGxvZXR6QGtzdS5lZHV8NTAxMzQwMHwtMTI3MDM5MTQ0MQ==>.
NAML<http://gromacs.5086.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>


--
View this message in context: 
http://gromacs.5086.x6.nabble.com/table-extension-distance-appears-to-be-over-ridden-by-mdp-file-cut-off-values-tp5013400p5013459.html
Sent from the GROMACS Users Forum mailing list archive at Nabble.com.


--
==================================================

Justin A. Lemkul, Ph.D.
Postdoctoral Fellow

Department of Pharmaceutical Sciences
School of Pharmacy
Health Sciences Facility II, Room 601
University of Maryland, Baltimore
20 Penn St.
Baltimore, MD 21201

jalem...@outerbanks.umaryland.edu | (410) 706-7441

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

Reply via email to