Learn R Programming

SOMMD (version 0.1.2)

fit.trj: Coordinate superposition

Description

Coordinate superposition with the Kabsch algorithm. This function make use of the bio3d fit.xyz function to align a SOMMD trj object. If ref is not specified, the trj object is aligned to the first frame of the simulation, otherwise it is aligned to the reference input object.

Usage

fit.trj(trj, ref = NULL, trj.inds = NULL, ref.inds = NULL)

Value

A trj object aligned

Arguments

trj

an object with class trj

ref

a struct object read with read.struct() to be used as reference

trj.inds

a vector of indices that selects the trj atoms upon which fitting should be based. If not specified all atoms will be used.

ref.inds

a vector of indices that selects the ref atoms upon which fitting should be based. If not specified all atoms will be used.

Author

Stefano Motta stefano.motta@unimib.it

Examples

Run this code
#Read trajectory
trj <- read.trj(trjfile = system.file("extdata", "HIF2a-MD.xtc", package = "SOMMD"),
  topfile = system.file("extdata", "HIF2a.gro", package = "SOMMD"))
# Fit a trajectory to the first frame based on alpha carbons:
ca.inds <- which(trj$top$elety=="CA")
trj.fit <- fit.trj(trj, trj.inds=ca.inds)

Run the code above in your browser using DataLab