calCo: Calculate Cartesian coordinates for 1-4 bonded atoms

Description Usage Arguments Value Examples

View source: R/RcppExports.R

Description

Consider atoms A-B-C-D forming a dihedral. Given coordinates for atoms A,B,C of the dihedral, the dihedral angle, bond angle, and bond length, calculate the Cartesian coordinates of atom D in the dihedral.

Usage

1
calCo(prev_atoms, length, bAngle, tAngle)

Arguments

prev_atoms

a 3x3 matrix of coordinates for atoms A-B-C in dihedral, listed by row

length

bond length between atoms C-D in dihedral

bAngle

planar bond angle between atoms B-C-D (in degrees)

tAngle

dihedral angle formed by atoms A-B-C-D (in degrees)

Value

Returns the vector of coordinates for the fourth atom in the dihedral

Examples

1
2
3
4
prevAtoms <- matrix(c(50.051, 37.144, -4.723,
 50.044, 36.248, -3.559,
 51.296, 35.369, -3.476), nrow=3, ncol=3, byrow=TRUE)
calCo(prevAtoms, length=1.33, bAngle=116.8, tAngle=-25.3)

compas documentation built on Jan. 9, 2022, 1:06 a.m.

Related to calCo in compas...