average.neur.property: Compute average property

View source: R/average.neur.property.R

average.neur.propertyR Documentation

Compute average property

Description

Function to compute the average value of a property for each neuron.

Usage

average.neur.property(SOM, P)

Arguments

SOM

the SOM object to cluster

P

the property for each frame of the simulation

Value

The a vector with the per-neuron average of the property.

Author(s)

Stefano Motta stefano.motta@unimib.it

Examples

#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)


SOMMD documentation built on Oct. 2, 2024, 5:07 p.m.