sknano.structures.compute_d

sknano.structures.compute_d(*Ch)[source][source]

Compute \(d=\gcd{(n, m)}\)

\(d\) is the Greatest Common Divisor of \(n\) and \(m\).

Parameters:

*Ch : {tuple or ints}

Either a 2-tuple of ints or 2 integers giving the chiral indices of the nanotube chiral vector \(\mathbf{C}_h = n\mathbf{a}_1 + m\mathbf{a}_2 = (n, m)\).

Returns:

gcd : int

Greatest Common Divisor of \(n\) and \(m\)