Description Usage Arguments Examples
Computes coefficient at point (x,y,z) using support vectors
1 | cmf_coef_xyz_sv(mdb, a, ai, alpha, x, y, z, field)
|
mdb |
|
a |
|
ai |
|
alpha |
|
x |
|
y |
|
z |
|
field |
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 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
cmf_coef_xyz_sv <- function(mdb, a, ai, alpha, x, y, z, field) {
coef <- 0.0
nsv <- length(ai)
for (isv in 1:nsv) {
imol <- ai[isv]
mol <- mdb[[imol]]
natoms <- length(mol$atoms)
for (iatom in 1:natoms) {
atom <- mol$atoms[[iatom]]
dist2 <- (x - atom$x)^2 + (y - atom$y)^2 + (z - atom$z)^2
if (field == "q") {
coef <- coef + a[isv] * atom$pch * exp(- alpha * dist2 / 2.0)
} else if (field == "vdw") {
dist2rel <- dist2 / (tripos_Rvdw[[atom$syb]])^2
coef <- coef + a[isv] * tripos_Evdw[[atom$syb]] * exp(- alpha * dist2rel / 2.0)
} else if (field == "logp") {
coef <- coef + a[isv] * atom$hydroph * exp(- alpha * dist2 / 2.0)
} else if (field == "abra") {
coef <- coef + a[isv] * atom$abraham_a * exp(- alpha * dist2 / 2.0)
} else if (field == "abrb") {
coef <- coef + a[isv] * atom$abraham_b * exp(- alpha * dist2 / 2.0)
} else if (field == "vdwr") {
coef <- coef + a[isv] * tripos_Rvdw[[atom$syb]] * exp(- alpha * dist2 / 2.0)
} else if (field == "abrs") {
coef <- coef + a[isv] * atom$abraham_s * exp(- alpha * dist2 / 2.0)
} else if (field == "abre") {
coef <- coef + a[isv] * atom$abraham_e * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_q") {
coef <- coef + a[isv] * atom$mop_q * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_dn") {
coef <- coef + a[isv] * atom$mop_dn * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_de") {
coef <- coef + a[isv] * atom$mop_de * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_pis") {
coef <- coef + a[isv] * atom$mop_pis * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_homo") {
coef <- coef + a[isv] * atom$mop_homo * exp(- alpha * dist2 / 2.0)
} else if (field == "mop_lumo") {
coef <- coef + a[isv] * atom$mop_lumo * exp(- alpha * dist2 / 2.0)
} else if (field == "ind") {
coef <- coef + a[isv] * exp(- alpha * dist2 / 2.0)
} else if (field %in% tripos_atom_types) {
if (atom$syb == field) {
coef <- coef + a[isv] * exp(- alpha * dist2 / 2.0)
}
}
}
}
coef
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.