cmf_params_mopac: Computing kernels based on MOPAC results

Description Usage Examples

Description

Computing kernels based on MOPAC results

Usage

1
cmf_params_mopac(mdb, mopac_mdb_res)

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
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
## Not run: 
# Computing kernels based on MOPAC results

cmf_params_mopac <- function(mdb, mopac_mdb_res) {
  ncomp <- length(mdb)
  for (imol in 1:ncomp) {
    mopac_mol_res <- mopac_mdb_res[[imol]]
    mol <- mdb[[imol]]
        natoms <- length(mol$atoms)
#       num_heavy_atom <- integer(natoms)
#       for (ihatom in 1:length(mopac_mol_res$heavy_atom_index)) {
#         num_heavy_atom[mopac_mol_res$heavy_atom_index[ihatom]] <- ihatom
#       }
        for (iatom in 1:natoms) {
          atom <- mol$atoms[[iatom]]
          atom$mop_q <- mopac_mol_res$atom_charges[iatom]
          if (mopac_mol_res$num_heavy_atom[iatom]) {
            atom$mop_dn   <- mopac_mol_res$Dn[mopac_mol_res$num_heavy_atom[iatom]]
                atom$mop_de   <- mopac_mol_res$De[mopac_mol_res$num_heavy_atom[iatom]]
                atom$mop_pis  <- mopac_mol_res$piS[mopac_mol_res$num_heavy_atom[iatom]]
                atom$mop_homo <- mopac_mol_res$chomo[mopac_mol_res$num_heavy_atom[iatom]]
                atom$mop_lumo <- mopac_mol_res$clumo[mopac_mol_res$num_heavy_atom[iatom]]
          } else {
            atom$mop_dn   <- 0
                atom$mop_de   <- 0
                atom$mop_pis  <- 0
                atom$mop_homo <- 0
                atom$mop_lumo <- 0
          }
          mdb[[imol]]$atoms[[iatom]] <- atom
        }
  }
  mdb
}



## End(Not run)

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