Refactored drawAtomsAsSphere.