corrected bug in smooth
optimized writeMif for atoms