Adjusted the curand array length finder to accept the number of atoms as an argument.