Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Chemistry Code

Name: Anonymous 2013-09-11 14:50

I'm studying chemistry and wrote the following code to calculate electron configuration by element symbol:

(defun electron-configuration (n)
  (let* ((os '(s p d f g h i))
         (r nil)
         (y 0)
         (i 0))
    (print n)
    (while (< i n)
      (dotimes (k (+ y 1))
        (let ((x (- y k)))
          (when (and (>= (- y (* 2 x)) 0) (> (- n i) 0))
            (let* ((orbital-capacity (* 2 (+ 1 (* x 2))))
                   (inc (min (- n i) orbital-capacity)))
              (push (list (- (+ y 1) x) (nth x os) inc) r)
              (incf i inc)))))
      (incf y))
    (nreverse r)))


is it correct? what orbitals should go after f?

Name: Anonymous 2013-09-13 12:15

>>15
Thank you, Anon! Your text makes more sense than the high school book. But as I understand, orbitals are non-spherical, because several electrons repel each other, while spinning on the axis ends, like the sword from http://thedarkblade.com/and-now-a-sword-for-double-agents/

Still schoolbook never mentions this model.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List