View source: R/average.neur.property.R
average.neur.property | R Documentation |
Function to compute the average value of a property for each neuron.
average.neur.property(SOM, P)
SOM |
the SOM object to cluster |
P |
the property for each frame of the simulation |
The a vector with the per-neuron average of the property.
Stefano Motta stefano.motta@unimib.it
#Read trajectory
trj <- read.trj(trjfile = system.file("extdata", "HIF2a-MD.xtc", package = "SOMMD"),
topfile = system.file("extdata", "HIF2a.gro", package = "SOMMD"))
#Read example SOM data
som_model <- readRDS(system.file("extdata", "SOM_HIFa.rds", package = "SOMMD"))
#Compute distance between two atoms in every frame of the simulation
Distance <- apply(trj$coord[c(162,1794),,], 3, dist)
#Compute average property value for each neuron
avg.p <- average.neur.property(som_model, Distance)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.