Error with virtual sites

GROMACS version: 2020.1
GROMACS modification: No
Hi all,

I am trying to set virtual sites (VS) located at the COM of water TIP3P water molecules. However, I get the error with grompp:

ERROR 1 [file VS-water_mapping.itp, line 121]:
  The total mass of the construting atoms is zero

(The error message has a typo, btw).

Water coordinates mapped are:

(...)
  114TIP3   OH2  340   2.512   2.491   2.441
  114TIP3   H1   341   2.606   2.472   2.435
  114TIP3   H2   342   2.473   2.410   2.474
(...)

and the line in the mapping .itp file is:

#define mapping virtual_sitesn
[ mapping ]
(...)
6955	2	340	341	342
(...)

The masses of the atoms are well defined in the force field.

Any thoughts?

Thanks in advance.

Best
-Yasser

Hi,
Maybe the problem is in the order in which the files are included in the topol.top
Is the water .itp included before VS-water_mapping.itp?

Kind regards
Alessandra

Hi Alessandra,

Thank you for your reply.

Yes. Bellow is a fragment of my .top file.

; Include forcefield parameters
#include "./FF/forcefield.itp"

; Restrained water
#include "./FF/restrained_water.itp"

(...)

; Include mapping of VS onto restrained waters
#include "./FF/VS-water_mapping.itp"

[ system ]
; Name
Waters and VSs

[ molecules ]
; Compound    #mols
TP3R          137
(...)
VS            137

That is also the order in my .gro file. The restrained waters come first and the VS are at the end of the file. The VS are defined under the [ atomtypes ] directive in forcefield.itp as:

[ atomtypes ]
; type   atnum    mass      charge    ptype   sigma   epsilon
  (...)
  VS	 0	      0.0000	0.00	  A	      0.0     0.0

Best,
-Yasser

Hi,
Thank you. From the data you sent I can not see where you include the water topology. Your water is called TP3R. Thus water topology looks like

[ moleculetype ]
; molname nrexcl
TP3R 2
[ atoms ]

Is this before the virtual site definition?
Second, you can check that the atom types of the TP3R (not atom name) are properly defined (with a mass) in the ffnonbonded.itp.

I hope it helps
Alessandra

Hi Alessandra,

Yes, the TP3R topology (TP3R is a just a name I use to define restrained TIP3 waters) is:

[ moleculetype ]
; name	nrexcl
TP3R	     2

[ atoms ]
;   nr	     type	resnr	residu	atom	cgnr	charge	    mass
     1         OT      1     TIP3    OH2      1    -0.834000    15.9994 
     2         HT      1     TIP3     H1      2     0.417000     1.0080 
     3         HT      1     TIP3     H2      3     0.417000     1.0080 

(...)

This topology is included before the VS definition.

The atom types are defined in a “mini”-forcefield.itp as:

[ atomtypes ]
; name	at.num	    mass	 charge	 ptype	 sigma	              epsilon
    HT       1     1.0080     0.417     A    4.00013524445e-02    1.924640e-01 
    OT       8    15.9994    -0.834     A    3.15057422683e-01    6.363864e-01 
	VS	     0	   0.0000	   0.00	    A	 0.0                  0.0 
(...)

Best,
-Yasser

You can’t use global atom numbers in the virtual site definition. The only valid options are the atom numbers in the [moleculetype] definition (which must also include the virtual site). So you need to add the VS as atom 4 in the TP3R definition and then

[virtual_sitesn]
4 2 1 2 3

This means the use of the virtual site applies globally to anything defined as T3PR.

Dear Justin,

Thank you for your reply. I just realized that by inspecting the file tip4p.itp (in charmm36-jul2020.ff) which contains a virtual site. So, in analogy with this, I modified my setup as:

“mini”-forcefield.itp:

[ atomtypes ]
; name	at.num	  mass	   charge    ptype	sigma	             epsilon
  HT    1         1.0080   0.417     A      4.00013524445e-02    1.924640e-01 
  OT    8         15.9994  -0.834    A      3.15057422683e-01    6.363864e-01 
  VS3	0	      0.0000   0.00	     A	    0.0                  0.0
(...)

TP3R.itp:

[ moleculetype ]
; name	nrexcl
TP3R	     2

[ atoms ]
; nr	type	resnr	residu	atom	cgnr	charge	mass
     1         OT      1     TIP3    OH2      1    -0.834000    15.9994
     2         HT      1     TIP3     H1      1     0.417000     1.0080
     3         HT      1     TIP3     H2      1     0.417000     1.0080
	 4	       VS3	   1	 TIP3     VS      1     0.000000     0.0000

[ settles ]
; OW    funct   doh           dhh
  1     1       9.572000e-02  1.513900e-01

[ exclusions ]
	1	2	3	4
	2	1	3	4
	3	1	2	4
	4	1	2	3
	
[virtual_sitesn]
; vs	type_com    mapped_atoms
   4	       2	1	2	3

It’s that correct?

Best
-Yasser

Looks reasonable. Try it and see :)

It worked!

Thanks