cmf_params_tripos: Parameters for CMF

Description Usage Arguments Examples

Description

Parameters for CMF

Usage

1

Arguments

mdb

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
# Parameters for CMF

cmf_params_tripos <- function(mdb) {
  ncomp <- length(mdb)
  for (imol in 1:ncomp) {
    mol <- mdb[[imol]]

    # count neighbouring hydrogens
    natoms <- length(mol$atoms)
    nchydr <- integer(natoms)
    nbonds <- length(mol$bonds)
    for (ibond in 1:nbonds) {
      bond <- mol$bonds[[ibond]]
      iat1 <- bond$at1
      iat2 <- bond$at2
      el1 <- mol$atoms[[iat1]]$el
      el2 <- mol$atoms[[iat1]]$el
      if (el1 == "H") {
        nchydr[iat2] <- nchydr[iat2] + 1
      }
      if (el2 == "H") {
        nchydr[iat1] <- nchydr[iat1] + 1
      }
    }

    # assign parameters to atoms
    for (iatom in 1:natoms) {
      atom <- mol$atoms[[iatom]]

      atom$hydroph <- 0.0
      atom$abraham_a <- 0.0
      atom$abraham_b <- 0.0
      atom$abraham_e <- 0.0
      atom$abraham_s <- 0.0

      if (atom$syb == "C.1") {
        atom$hydroph <- atom$hydroph +0.041270
        atom$abraham_e <- atom$abraham_e -0.005210
        atom$abraham_s <- atom$abraham_s -0.013906
        if (nchydr[iatom] == 1) {
          atom$hydroph <- atom$hydroph -0.093156
          atom$abraham_s <- atom$abraham_s +0.045181
        }
      }

      if (atom$syb == "C.2") {
        atom$hydroph <- atom$hydroph +0.041270
        atom$abraham_e <- atom$abraham_e -0.005210
        atom$abraham_s <- atom$abraham_s -0.013906
        atom$hydroph <- atom$hydroph +0.006410
        atom$abraham_s <- atom$abraham_s +0.016508
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph +0.007629
          atom$abraham_b <- atom$abraham_b +0.026654
          atom$abraham_e <- atom$abraham_e +0.076572
        }
        if (nchydr[iatom] == 1) {
          atom$hydroph <- atom$hydroph +0.202552
          atom$abraham_e <- atom$abraham_e +0.058299
        }
        if (nchydr[iatom] == 2) {
          atom$hydroph <- atom$hydroph +0.422564
          atom$abraham_b <- atom$abraham_b -0.041897
          atom$abraham_e <- atom$abraham_e -0.019698
          atom$abraham_s <- atom$abraham_s -0.098377
        }
      }

      if (atom$syb == "C.3") {
        atom$hydroph <- atom$hydroph +0.041270
        atom$abraham_e <- atom$abraham_e -0.005210
        atom$abraham_s <- atom$abraham_s -0.013906
        atom$abraham_a <- atom$abraham_a -0.009684
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph +0.089007
          atom$abraham_b <- atom$abraham_b +0.096834
          atom$abraham_e <- atom$abraham_e +0.153114
        }
        if (nchydr[iatom] == 1) {
          atom$abraham_b <- atom$abraham_b +0.041221
          atom$abraham_e <- atom$abraham_e +0.091218
        }
        if (nchydr[iatom] == 2) {
          atom$hydroph <- atom$hydroph +0.208288
        }
        if (nchydr[iatom] == 3) {
          atom$hydroph <- atom$hydroph +0.369764
          atom$abraham_b <- atom$abraham_b -0.022123
          atom$abraham_e <- atom$abraham_e -0.102229
          atom$abraham_s <- atom$abraham_s -0.055649
        }
      }

      if (atom$syb == "C.ar") {
        atom$hydroph <- atom$hydroph +0.041270
        atom$abraham_e <- atom$abraham_e -0.005210
        atom$abraham_s <- atom$abraham_s -0.013906
        atom$hydroph <- atom$hydroph +0.194585
        atom$abraham_e <- atom$abraham_e +0.117666
        atom$abraham_s <- atom$abraham_s +0.070704
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph +0.085378
          atom$abraham_b <- atom$abraham_b +0.002903
          atom$abraham_e <- atom$abraham_e +0.107527
          atom$abraham_s <- atom$abraham_s +0.046501
        }
        if (nchydr[iatom] == 1) {
          atom$abraham_e <- atom$abraham_e -0.044799
          atom$abraham_s <- atom$abraham_s -0.011864
        }
      }

      if (atom$syb == "C.cat") {
        atom$abraham_e <- atom$abraham_e -0.005210
        atom$abraham_s <- atom$abraham_s -0.013906
      }

      if (atom$syb == "N.1") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$abraham_b <- atom$abraham_b +0.061824
        atom$abraham_s <- atom$abraham_s +0.232745
      }

      if (atom$syb == "N.2") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        if (nchydr[iatom] == 1) {
          atom$hydroph <- atom$hydroph -0.200643
        } else {
          atom$abraham_b <- atom$abraham_b -0.763354
          atom$abraham_e <- atom$abraham_e +0.682859
        }
      }

      if (atom$syb == "N.3") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$hydroph <- atom$hydroph -0.091021
        atom$abraham_b <- atom$abraham_b +0.367558
        atom$abraham_e <- atom$abraham_e +0.099602
        atom$abraham_s <- atom$abraham_s +0.084806
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph -0.495588
          atom$abraham_b <- atom$abraham_b +0.150946
          atom$abraham_e <- atom$abraham_e +0.088502
        }
        if (nchydr[iatom] == 1) {
          atom$hydroph <- atom$hydroph -0.452520
          atom$abraham_a <- atom$abraham_a +0.163329
        }
        if (nchydr[iatom] == 2) {
          atom$hydroph <- atom$hydroph -0.763440
          atom$abraham_a <- atom$abraham_a +0.120801
          atom$abraham_s <- atom$abraham_s -0.069707
        }
      }

      if (atom$syb == "N.4") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$hydroph <- atom$hydroph -4.382696
      }

      if (atom$syb == "N.am") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$hydroph <- atom$hydroph -0.091021
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph -0.495588
          atom$abraham_a <- atom$abraham_a -0.096006
        }
        if (nchydr[iatom] == 1) {
          atom$hydroph <- atom$hydroph -0.452520
        }
        if (nchydr[iatom] == 2) {
          atom$hydroph <- atom$hydroph -0.763440
        }
      }

      if (atom$syb == "N.ar") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$abraham_a <- atom$abraham_a -0.104421
        atom$abraham_b <- atom$abraham_b +0.282666
      }

      if (atom$syb == "N.pl3") {
        atom$abraham_a <- atom$abraham_a +0.077667
        atom$abraham_s <- atom$abraham_s +0.167948
        atom$hydroph <- atom$hydroph +0.483597
        atom$abraham_b <- atom$abraham_b -0.296874
        atom$abraham_e <- atom$abraham_e +0.060327
        atom$abraham_s <- atom$abraham_s -0.351281
      }

      if (atom$syb == "O.2") {
        atom$hydroph <- atom$hydroph -0.224286
        atom$hydroph <- atom$hydroph -0.098496
        atom$abraham_a <- atom$abraham_a +0.038390
        atom$abraham_e <- atom$abraham_e -0.011749
        atom$abraham_s <- atom$abraham_s +0.371065
      }

      if (atom$syb == "O.3") {
        atom$hydroph <- atom$hydroph -0.224286
        atom$hydroph <- atom$hydroph -0.102250
        atom$abraham_s <- atom$abraham_s +0.111253
        atom$abraham_b <- atom$abraham_b +0.147962
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph -0.010867
          atom$abraham_a <- atom$abraham_a -0.035354
          atom$abraham_e <- atom$abraham_e -0.020649
        } else {
          atom$hydroph <- atom$hydroph -0.279404
          atom$abraham_a <- atom$abraham_a +0.445333
          atom$abraham_b <- atom$abraham_b +0.014953
          atom$abraham_e <- atom$abraham_e +0.010690
          atom$abraham_s <- atom$abraham_s +0.027754
        }
      }

      if (atom$syb == "O.co2") {
        atom$hydroph <- atom$hydroph -0.224286
      }

      if (atom$syb == "S.2") {
        atom$hydroph <- atom$hydroph -0.077480
        atom$hydroph <- atom$hydroph +0.734821
        atom$abraham_e <- atom$abraham_e +0.136585
      }

      if (atom$syb == "S.3") {
        atom$abraham_e <- atom$abraham_e +0.195277
        atom$abraham_s <- atom$abraham_s +0.082278
        if (nchydr[iatom] == 0) {
          atom$hydroph <- atom$hydroph +0.504755
          atom$abraham_b <- atom$abraham_b +0.103649
          atom$abraham_e <- atom$abraham_e +0.071103
        }
      }

      if (atom$syb == "S.o") {
        atom$hydroph <- atom$hydroph -0.077480
        atom$hydroph <- atom$hydroph -1.055756
      }

      if (atom$syb == "S.o2") {
        atom$hydroph <- atom$hydroph -0.077480
        atom$hydroph <- atom$hydroph +0.027576
      }

      if (atom$syb == "P.3") {
        atom$abraham_b <- atom$abraham_b +0.686142
        atom$abraham_e <- atom$abraham_e +0.103799
        atom$abraham_s <- atom$abraham_s +0.215383
      }

      if (atom$syb == "H") {
      }

      if (atom$syb == "F") {
        atom$hydroph <- atom$hydroph +0.269012
        atom$abraham_b <- atom$abraham_b -0.077060
        atom$abraham_e <- atom$abraham_e -0.220887
        atom$abraham_s <- atom$abraham_s -0.077487
      }

      if (atom$syb == "Cl") {
        atom$hydroph <- atom$hydroph +0.569605
        atom$abraham_b <- atom$abraham_b -0.068040
        atom$abraham_e <- atom$abraham_e -0.008902
        atom$abraham_s <- atom$abraham_s +0.029923
      }

      if (atom$syb == "Br") {
        atom$hydroph <- atom$hydroph +0.696413
        atom$abraham_b <- atom$abraham_b -0.074564
        atom$abraham_e <- atom$abraham_e +0.167323
        atom$abraham_s <- atom$abraham_s +0.131222
      }

      if (atom$syb == "I") {
        atom$hydroph <- atom$hydroph +0.323219
        atom$abraham_e <- atom$abraham_e +0.509975
        atom$abraham_s <- atom$abraham_s +0.135703
      }

      if (atom$syb == "Si") {
        atom$hydroph <- atom$hydroph +0.617895
      }

      mdb[[imol]]$atoms[[iatom]] <- atom
    }

  }
  mdb
}

conmolfields documentation built on May 2, 2019, 4:18 p.m.