cmf_coef_xyz_sv_ex_phch {conmolfields}R Documentation

Computes coefficient at point (x,y,z) using support vectors for physico-chemical molecular fields

Description

Computes coefficient at point (x,y,z) using support vectors for physico-chemical molecular fields

Usage

cmf_coef_xyz_sv_ex_phch(mdb, a, ai, alpha, x, y, z, field, atomlists)

Arguments

x
mdb
a
ai
alpha
x
y
z
field
atomlists

Examples

##---- 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_ex_phch <- function(mdb, a, ai, alpha, x, y, z, field, atomlists) {
  coef <- 0.0
  nsv <- length(ai)
  for (isv in 1:nsv) {
    imol <- ai[isv]
	mol <- mdb[[imol]]
    natoms <- length(mol$atoms)
    for (iatom in atomlists[[imol]]) {
      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)
	  }
    }
  }
  coef
}


[Package conmolfields version 0.0-19 Index]