Difference between revisions of "Dihedral.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Normalise sequential blank lines)
Line 26: Line 26:
 
==See also==
 
==See also==
 
[[frac2cart.m]], [[xyz2sph.m]], [[xyz2pms.m]], [[xyz2hfc.m]], [[xyz2dd.m]]
 
[[frac2cart.m]], [[xyz2sph.m]], [[xyz2pms.m]], [[xyz2hfc.m]], [[xyz2dd.m]]
−
 
  
 
''Version 2.3, authors: [[Ilya Kuprov]]''
 
''Version 2.3, authors: [[Ilya Kuprov]]''

Revision as of 11:24, 25 April 2026

Computes the dihedral angle between vectors specified by the four sets of atomic coordinates. The atoms are assumed to be bonded as A-B-C-D.

Syntax

    phi=dihedral(A,B,C,D)

Arguments

    A  -  row vector of cartesian coordinates 
          for atom A

    B  -  row vector of cartesian coordinates 
          for atom B

    C  -  row vector of cartesian coordinates 
          for atom C

    D  -  row vector of cartesian coordinates 
          for atom D

Outputs

    phi - dihedral angle, degrees

See also

frac2cart.m, xyz2sph.m, xyz2pms.m, xyz2hfc.m, xyz2dd.m

Version 2.3, authors: Ilya Kuprov