sknano.structures.compute_d

sknano.structures.compute_d(n, m)[source][source]

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

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

Parameters:

n, m : int

Chiral indices defining the nanotube chiral vector \(\mathbf{C}_h = n\mathbf{a}_1 + m\mathbf{a}_2 = (n, m)\).

Returns:

int

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