calc.distances: calc.distances

View source: R/calc.distances.R

calc.distancesR Documentation

calc.distances

Description

Function to compute distances to be used to train the SOM

Usage

calc.distances(trj, mol.2 = FALSE, sele = FALSE, atoms = NULL, cap = NULL)

Arguments

trj

contains the trajectory coordinates (array with three dimensions obtained by rioxdr)

mol.2

contains the atom indexes of the second molecule in case only intermolecular distances should be computed

sele

contains the selection of distances coming from the native_contacts function

atoms

contains a list of atoms indexes on which the distances will be computed

cap

If a number is given, distances greater than this value are set at the cap value

Value

A matrix containing the set of distances computed for all the frames.

Author(s)

Stefano Motta stefano.motta@unimib.it

Examples

# Read reference structure file with native conformation
struct <- read.struct(system.file("extdata", "HIF2a.gro", package = "SOMMD"))
# Read the trajectory
trj <- read.trj(trjfile = system.file("extdata", "HIF2a-MD.xtc", package = "SOMMD"),
  topfile = system.file("extdata", "HIF2a.gro", package = "SOMMD"))
# Select only Cbeta atoms to perform the analysis
sele_atoms <- which(trj$top$elety=="CB")
# Choose only native contacts
sele_dists <- native.cont(struct=struct, distance=1.0, atoms=sele_atoms)
# Compute distances for SOM training.
DIST <- calc.distances(trj, mol.2=FALSE, sele=sele_dists, atoms=sele_atoms)


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