Running examples in 'ChargeTransport-Ex.R' failed
The error most likely occurred in:

> ### Name: KMC
> ### Title: Charge Transport Simulation
> ### Aliases: KMC
> ### Keywords: manip
> 
> ### ** Examples
> 
> ########################################################################
> ## Electron transport within a periodic 1D-stack of 4 molecules:
> ##
> ##                        ... 4 | 1 2 3 4 | 1 ...
> ##
> ########################################################################
> ################ Preparation of the percolation network ################
> nMols <- 4
> ## The charge can hop toward the right neigbour
> con <- matrix(c(1:nMols,2:nMols,1), ncol=2)
> ## or the left neigbour
> con <- rbind(con,con[,2:1])
> ## The number of pathways forming the percolation network is then:
> nPaths <- 2*nMols
> path.names <- paste0("P",1:nPaths)
> dimnames(con) <- list(path.names, c("mol.i","mol.f"))
> print(con)
   mol.i mol.f
P1     1     2
P2     2     3
P3     3     4
P4     4     1
P5     2     1
P6     3     2
P7     4     3
P8     1     4
> ########################################################################
> 
> ############# Preparation of some data for the simulation ##############
> ## Lets consider a slight deformation of the stack along the z-axis over
> ## 11 frames of a molecular dynamics
> nFrames <- 11
> frame.names <- paste0("F", 1:nFrames)
> dx <- matrix(0, ncol=nPaths, nrow=nFrames,
+              dimnames=list(frame.names, path.names))
> dy <- dx
> # dz when hoping to the right
> dz <- matrix(seq(3.0,4.0,length.out=nMols), ncol=nMols, nrow=nFrames)
> # and when hoping to the left
> dz <- cbind(dz, -dz)
> dimnames(dz) <- dimnames(dx)
> ## The electronic couplings will slightly decrease
> J  <- matrix(seq(10, 110, length.out=nFrames),
+              ncol=nMols, nrow=nFrames)*1E-3
> J  <- cbind( J, J)
> dimnames(J) <- dimnames(dx)
> ## By symmetry all the sites have the same energy
> dE <- 0
> ## We apply an electric field along the stack (z-axis)
> Fn <- 1E5
> F <- c(0,0,Fn)
> ## Lets consider the case of electron transport
> carr <- "e"
> ## This introduce an addition term in the site energy differences.
> dEFz <- dEField(dx,dy,dz,carr,F[1],F[2],F[3])
> ## Lets assum that:
> lambda <- 0.14 # eV
> ########################################################################
> 
> ############### Calculation of the charge transfer rates ###############
> ## Using the Marcus expression:
> k <- Marcus(J,lambda,dE,dEFz)
> format(k, digits=2, scientific=TRUE)
    P1        P2        P3        P4        P5        P6        P7       
F1  "1.1e+12" "1.1e+12" "1.1e+12" "1.1e+12" "1.2e+12" "1.2e+12" "1.2e+12"
F2  "4.3e+12" "4.4e+12" "4.3e+12" "4.3e+12" "4.9e+12" "4.9e+12" "5.0e+12"
F3  "9.7e+12" "9.7e+12" "9.8e+12" "9.6e+12" "1.1e+13" "1.1e+13" "1.1e+13"
F4  "1.7e+13" "1.7e+13" "1.7e+13" "1.7e+13" "2.0e+13" "2.0e+13" "2.0e+13"
F5  "2.7e+13" "2.7e+13" "2.7e+13" "2.7e+13" "3.1e+13" "3.1e+13" "3.1e+13"
F6  "3.9e+13" "3.9e+13" "3.8e+13" "3.9e+13" "4.4e+13" "4.4e+13" "4.5e+13"
F7  "5.3e+13" "5.3e+13" "5.3e+13" "5.2e+13" "6.1e+13" "6.0e+13" "6.0e+13"
F8  "6.8e+13" "6.9e+13" "6.9e+13" "7.0e+13" "8.0e+13" "7.9e+13" "7.9e+13"
F9  "8.8e+13" "8.7e+13" "8.7e+13" "8.8e+13" "9.9e+13" "1.0e+14" "1.0e+14"
F10 "1.1e+14" "1.1e+14" "1.1e+14" "1.1e+14" "1.2e+14" "1.2e+14" "1.2e+14"
F11 "1.3e+14" "1.3e+14" "1.3e+14" "1.3e+14" "1.5e+14" "1.5e+14" "1.5e+14"
    P8       
F1  "1.2e+12"
F2  "5.0e+12"
F3  "1.1e+13"
F4  "2.0e+13"
F5  "3.1e+13"
F6  "4.5e+13"
F7  "6.1e+13"
F8  "7.8e+13"
F9  "1.0e+14"
F10 "1.2e+14"
F11 "1.5e+14"
> ########################################################################
> 
> ################### Execution of the KMC simulation ####################
> cl <- makeCluster(2, outfile="") # Slave nodes output on master stdout
starting worker pid=19092 on localhost:11839 at 14:22:06.773
starting worker pid=84436 on localhost:11839 at 14:22:07.350
> simuFz <- KMC(cl=cl, con=con, rates=k, dx=dx, dy=dy, dz=dz,
+               type="BKL", nSimu=2, nHops=1E5)
Simulation 1 / 2 done...
Simulation 2 / 2 done...
   user  system elapsed 
   0.01    0.00    1.89 
> ########################################################################
> 
> ###### More simulations applying the electric field along x or y #######
> F <- c(Fn,0,0)
> dEFx <- dEField(dx,dy,dz,carr,F[1],F[2],F[3])
> k <- Marcus(J,lambda,dE,dEFx)
> simuFx <- KMC(cl=cl, con=con, rates=k, dx=dx, dy=dy, dz=dz,
+               type="BKL", nSimu=2, nHops=1E5)
Simulation 1 / 2 done...
Simulation 2 / 2 done...
   user  system elapsed 
   0.00    0.00    1.84 
> F <- c(0,Fn,0)
> dEFy <- dEField(dx,dy,dz,carr,F[1],F[2],F[3])
> k <- Marcus(J,lambda,dE,dEFy)
> simuFy <- KMC(cl=cl, con=con, rates=k, dx=dx, dy=dy, dz=dz,
+               type="BKL", nSimu=2, nHops=1E5)              
Simulation 1 / 2 done...
Simulation 2 / 2 done...
   user  system elapsed 
   0.00    0.00    1.72 
> ########################################################################
> 
> ################# Calculation of the mobility tensor ###################
> driftVelocity <- function(simu){
+   V <- c(
+          x=1E-8*mean(simu$distx/simu$time),
+          y=1E-8*mean(simu$disty/simu$time),
+          z=1E-8*mean(simu$distz/simu$time))
+   return(V) # Return the average drift velocity in cm.s-1
+ }
> mu.Fx <- -driftVelocity(simuFx)/Fn # The minus is for electron transport
> mu.Fy <- -driftVelocity(simuFy)/Fn # The minus is for electron transport
> mu.Fz <- -driftVelocity(simuFz)/Fn # The minus is for electron transport
> mu <- cbind(mu.Fx, mu.Fy, mu.Fz)
> eigen(mu)
eigen() decomposition
$values
[1] 2.593374 0.000000 0.000000

$vectors
     [,1]         [,2]       [,3]
[1,]    0  0.999996050 0.00000000
[2,]    0  0.000000000 0.99981778
[3,]    1 -0.002810642 0.01908928

> ########################################################################
> 
> 
> 
> cleanEx()
Error: connections left open:
	<-CRANwin.fb05.statistik.uni-dortmund.de:11839 (sockconn)
	<-CRANwin.fb05.statistik.uni-dortmund.de:11839 (sockconn)
Execution halted
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
Execution halted
Error in unserialize(node$con) : error reading from connection
Calls: <Anonymous> ... doTryCatch -> recvData -> recvData.SOCKnode -> unserialize
Execution halted