Enable grompp to read virtual_site1
[alexxy/gromacs.git] / docs / reference-manual / topologies / particle-type.rst
1 Particle type
2 -------------
3
4 In |Gromacs|, there are three types of
5 particles
6 , see :numref:`Table %s <tab-ptype>`. Only regular atoms and virtual
7 interaction sites are used in |Gromacs|; shells are necessary for
8 polarizable models like the Shell-Water models \ :ref:`45 <refMaaren2001a>`.
9
10 .. _tab-ptype:
11
12 .. table:: Particle types in |Gromacs|
13
14            +--------------+----------+
15            | Particle     | Symbol   |
16            +==============+==========+
17            | atom         | A        |
18            +--------------+----------+
19            | shell        | S        |
20            +--------------+----------+
21            | virtual side | V (or D) |
22            +--------------+----------+
23
24
25 .. _atomtype:
26
27 Atom types
28 ~~~~~~~~~~
29
30 Each force field defines a set of atom
31 types,
32 which have a characteristic name or number, and mass (in a.m.u.). These
33 listings are found in the ``atomtypes.atp`` file (:ref:`atp` =
34 **a**\ tom **t**\ ype **p**\ arameter file). Therefore, it is in this
35 file that you can begin to change and/or add an atom type. A sample from
36 the ``gromos43a1.ff`` force field is listed below.
37
38 ::
39
40      |  O  15.99940 ;     carbonyl oxygen (C=O)
41      | OM  15.99940 ;     carboxyl oxygen (CO-)
42      | OA  15.99940 ;     hydroxyl, sugar or ester oxygen
43      | OW  15.99940 ;     water oxygen
44      |  N  14.00670 ;     peptide nitrogen (N or NH)
45      | NT  14.00670 ;     terminal nitrogen (NH2)
46      | NL  14.00670 ;     terminal nitrogen (NH3)
47      | NR  14.00670 ;     aromatic nitrogen
48      | NZ  14.00670 ;     Arg NH (NH2)
49      | NE  14.00670 ;     Arg NE (NH)
50      |  C  12.01100 ;     bare carbon
51      |CH1  13.01900 ;     aliphatic or sugar CH-group
52      |CH2  14.02700 ;     aliphatic or sugar CH2-group
53      |CH3  15.03500 ;     aliphatic CH3-group
54
55 **Note:** |Gromacs| makes use of the atom types as a name, *not* as a
56 number (as *e.g.* in GROMOS).
57
58 .. _vsitetop:
59
60 Virtual sites
61 ~~~~~~~~~~~~~
62
63 Some force fields use virtual interaction sites (interaction sites that
64 are constructed from other particle positions) on which certain
65 interactions are located (*e.g.* on benzene rings, to reproduce the
66 correct quadrupole). This is described in sec. :ref:`virtualsites`.
67
68 To make virtual sites in your system, you should include a section
69 ``[ virtual_sites? ]`` (for backward compatibility the old
70 name ``[ dummies? ]`` can also be used) in your topology
71 file, where the ``?`` stands for the number constructing
72 particles for the virtual site. This will be ``2`` for
73 type 2, ``3`` for types 3, 3fd, 3fad and 3out and
74 ``4`` for type 4fdn. The last of these replace an older
75 4fd type (with the ‘type’ value 1) that could occasionally be unstable;
76 while it is still supported internally in the code, the old 4fd type
77 should not be used in new input files. The different types are explained
78 in sec. :ref:`virtualsites`.
79
80 Parameters for type 1 should look like this:
81
82 ::
83
84     [ virtual_sites1 ]
85     ; Site  from        funct
86     5       1           1
87
88 for type 2 like this:
89
90 ::
91
92     [ virtual_sites2 ]
93     ; Site  from        funct  a
94     5       1     2     1      0.7439756
95
96 for type 2fd like this:
97
98 ::
99
100     [ virtual_sites2 ]
101     ; Site  from        funct  d
102     5       1     2     2      -0.105
103
104 for type 3 like this:
105
106 ::
107
108     [ virtual_sites3 ]
109     ; Site  from               funct   a          b
110     5       1     2     3      1       0.7439756  0.128012
111
112 for type 3fd like this:
113
114 ::
115
116     [ virtual_sites3 ]
117     ; Site  from               funct   a          d
118     5       1     2     3      2       0.5        -0.105
119
120 for type 3fad like this:
121
122 ::
123
124     [ virtual_sites3 ]
125     ; Site  from               funct   theta      d
126     5       1     2     3      3       120        0.5
127
128 for type 3out like this:
129
130 ::
131
132     [ virtual_sites3 ]
133     ; Site  from               funct   a          b          c
134     5       1     2     3      4       -0.4       -0.4       6.9281
135
136 for type 4fdn like this:
137
138 ::
139
140     [ virtual_sites4 ]
141     ; Site  from                      funct   a          b          c
142     5       1     2     3     4       2       1.0        0.9       0.105
143
144 This will result in the construction of a virtual site, number 5 (first
145 column ``Site``), based on the positions of the atoms
146 whose indices are 1 and 2 or 1, 2 and 3 or 1, 2, 3 and 4 (next two,
147 three or four columns ``from``) following the rules
148 determined by the function number (next column ``funct``)
149 with the parameters specified (last one, two or three columns
150 ``a b . .``). Obviously, the atom numbers (including
151 virtual site number) depend on the molecule. It may be instructive to
152 study the topologies for TIP4P or TIP5P water models that are included
153 with the |Gromacs| distribution.
154
155 **Note** that if any constant bonded interactions are defined between
156 virtual sites and/or normal atoms, they will be removed by
157 :ref:`grompp <gmx grompp>` (unless the option ``-normvsbds`` is used). This
158 removal of bonded interactions is done after generating exclusions, as
159 the generation of exclusions is based on “chemically” bonded
160 interactions.
161
162 Virtual sites can be constructed in a more generic way using basic
163 geometric parameters. The directive that can be used is ``[ virtual_sitesn ]``. Required
164 parameters are listed in :numref:`Table %s <tab-topfile2>`. An example entry for
165 defining a virtual site at the center of geometry of a given set of
166 atoms might be:
167
168 ::
169
170     [ virtual_sitesn ]
171     ; Site   funct    from
172     5        1        1     2     3     4