1 /*
2 *   This function fills in the keyword field, the number of members for each
3 *   item and the number of parameters for each item
4 *
5 */
6 
7 #include "msi2lmp.h"
8 #include "Forcefield.h"
9 
10 #include <string.h>
11 
InitializeItems(void)12 void InitializeItems(void)
13 {
14   /* ATOM TYPES */
15   strcpy(ff_atomtypes.keyword,"#atom_types");
16   ff_atomtypes.number_of_members = 1;
17   ff_atomtypes.number_of_parameters = 1;
18 
19   /* EQUIVALENCE */
20 
21   strcpy(equivalence.keyword,"#equivalence");
22   equivalence.number_of_members = 6;
23   equivalence.number_of_parameters = 0;
24 
25   /* NON-BOND */
26 
27   strcpy(ff_vdw.keyword,"#nonbond");
28   ff_vdw.number_of_members = 1;
29   ff_vdw.number_of_parameters = 2;
30 
31   /* BOND */
32 
33   ff_bond.number_of_members = 2;
34   if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) {
35     strcpy(ff_bond.keyword,"#quadratic_bond");
36     ff_bond.number_of_parameters = 2;
37   }
38 
39   if (forcefield & FF_TYPE_CLASS2) {
40     strcpy(ff_bond.keyword,"#quartic_bond");
41     ff_bond.number_of_parameters = 4;
42   }
43 
44   /* MORSE */
45 
46   if (forcefield & FF_TYPE_CLASS1) {
47     ff_morse.number_of_members = 2;
48     strcpy(ff_morse.keyword,"#morse_bond");
49     ff_morse.number_of_parameters = 3;
50   }
51 
52   /* ANGLE */
53 
54   ff_ang.number_of_members = 3;
55   if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) {
56     strcpy(ff_ang.keyword,"#quadratic_angle");
57     ff_ang.number_of_parameters = 2;
58   }
59 
60   if (forcefield & FF_TYPE_CLASS2) {
61     strcpy(ff_ang.keyword,"#quartic_angle");
62     ff_ang.number_of_parameters = 4;
63   }
64 
65   /* TORSION */
66 
67   ff_tor.number_of_members = 4;
68   if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) {
69     strcpy(ff_tor.keyword,"#torsion_1");
70     ff_tor.number_of_parameters = 3;
71   }
72 
73   if (forcefield & FF_TYPE_CLASS2) {
74     strcpy(ff_tor.keyword,"#torsion_3");
75     ff_tor.number_of_parameters = 6;
76   }
77 
78   /* OOP */
79 
80   ff_oop.number_of_members = 4;
81   if (forcefield & (FF_TYPE_CLASS1|FF_TYPE_OPLSAA)) {
82     strcpy(ff_oop.keyword,"#out_of_plane");
83     ff_oop.number_of_parameters = 3;
84   }
85 
86   if (forcefield & FF_TYPE_CLASS2) {
87     strcpy(ff_oop.keyword,"#wilson_out_of_plane");
88     ff_oop.number_of_parameters = 2;
89   }
90 
91   if (forcefield & FF_TYPE_CLASS2) {
92     /* BOND-BOND */
93 
94     strcpy(ff_bonbon.keyword,"#bond-bond");
95     ff_bonbon.number_of_members = 3;
96     ff_bonbon.number_of_parameters = 1;
97 
98     /* BOND-ANGLE */
99 
100     strcpy(ff_bonang.keyword,"#bond-angle");
101     ff_bonang.number_of_members = 3;
102     ff_bonang.number_of_parameters = 2;
103 
104     /* ANGLE-TORSION */
105 
106     strcpy(ff_angtor.keyword,"#angle-torsion_3");
107     ff_angtor.number_of_members = 4;
108     ff_angtor.number_of_parameters = 6;
109 
110     /* ANGLE-ANGLE-TORSION */
111 
112     strcpy(ff_angangtor.keyword,"#angle-angle-torsion_1");
113     ff_angangtor.number_of_members = 4;
114     ff_angangtor.number_of_parameters = 1;
115 
116     /* END-BOND-TORSION */
117 
118     strcpy(ff_endbontor.keyword,"#end_bond-torsion_3");
119     ff_endbontor.number_of_members = 4;
120     ff_endbontor.number_of_parameters = 6;
121 
122     /* MID-BOND-TORSION */
123 
124     strcpy(ff_midbontor.keyword,"#middle_bond-torsion_3");
125     ff_midbontor.number_of_members = 4;
126     ff_midbontor.number_of_parameters = 3;
127 
128     /* ANGLE-ANGLE */
129 
130     strcpy(ff_angang.keyword,"#angle-angle");
131     ff_angang.number_of_members = 4;
132     ff_angang.number_of_parameters = 1;
133 
134     /* BOND-BOND-1-3 */
135 
136     strcpy(ff_bonbon13.keyword,"#bond-bond_1_3");
137     ff_bonbon13.number_of_members = 4;
138     ff_bonbon13.number_of_parameters = 1;
139   }
140 }
141