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

Pages: 1-

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-11 14:51

the problem is that teachers don't allow GNU Emacs at exams.

Name: Anonymous 2013-09-11 15:25

>(nth x os)
macfag spotted

Name: Anonymous 2013-09-11 15:47

Shalom, kike! Take your bullshit electron crap elsewhere.

Name: Anonymous 2013-09-11 16:19

>>4
Idiot

Name: Anonymous 2013-09-11 16:26

>>5
Shalom!

Name: Anonymous 2013-09-11 16:38

Fuck off, >>1–san. Real proglodytes don't use electrons.

Name: Anonymous 2013-09-11 16:43

hey op you should get educated in λ道
fire up your Document Examiner
and research the loop macro

Name: Anonymous 2013-09-11 17:27

>>1

It is not after the f-orbital. For example an s-orbital can  occupy any shell. The letters refers to the angular momentum. An f-orbital is an orbital with an angular momentum of 3.

An electron orbital is defined by three numbers. N, which is the discrete energy of the orbital. L which is the angular momentum and M which is the magnetic momentum. (And the spin number)

So if you want to count further than f, you need a proper model. The rule of thumb is this:

n goes from 1 to infinity
l goes from 0 to (n - 1)  # - n possibilities
m goes from -l to l       # - 2 * n possibilities

so in any shell n, we can stack:

2 n^2 electrons.

To understand these numbers you actually need to work out the non relativistic qm model once. You will see, where these are coming from. It are actually standing waves and are some pretty peculiar functions.

But this model still doesn't address all issues:

The shells are not filled in order (as you might expect) and in the higher shells electrons start to behave relativistic, so you need an even more complex model to start working with the higher shells.

Name: Anonymous 2013-09-11 20:53

>>9
That's snake oil
Shalom!

Name: Anonymous 2013-09-11 23:48

>>9
how do you convert this "discrete energy" to joules?

and what is "non relativistic" means? that model is absolute? but scientist themselves used relative instruments to do all measurements!

Name: Anonymous 2013-09-12 10:44

and what is "non relativistic" means?
It means classical/Newtonian physics with invariant mass, as opposed to relativistic/Einsteinian physics where mass is related to velocity.

Name: Anonymous 2013-09-12 14:01

Ok. Here is the code, which uses previous function to give the number of valence electrons. I still don't understand how Copper and Gold give several valencies. Chemistry book says that the only robust way to get valencies is by physical force simulation, minimizing energy. Where can I get a code for it?

(defun valency-of (e)
  (let* ((xs (reverse (electron-configuration e)))
         (n (first (car xs)))
         (v 0))
    (while xs
      (when (>= (first (car xs)) n)
        (incf v (third (car xs))))
      (when (eql (second (car xs)) 0)
        (setf xs nil))
      (pop xs))
    (when (> v 10) (decf v 10))
    (when (> v 8) (decf v 8))
    v))

Name: Anonymous 2013-09-12 15:04

here is a hack: http://en.wikipedia.org/wiki/18_electron_rule

but it is still ugly

Name: Anonymous 2013-09-12 15:56

>>11

This is a good text for explaining the non relativistic model of a hydrogen like atom, which can be solved analytical. All these nice orbital pictures are coming from this model. It will explain, what discrete energy states are. (As I said, it are simply solutions of standing waves, other kind of solutions will cancel themselves)

http://www.wiley-vch.de/books/sample/3527406611_c01.pdf

It will not go into a relativistic model. Relativistic means that the model is subjected to special relativity. For the outer shells of an atom, this becomes the case.

An electron is relativistic as its speeds goes near the light speed. It mass will grow with a factor depending on its speed, you can interpret this as condensing kinetic energy, because it is impossible to reach the light speed. It's time is subjected to a slow down and it's dimensions are contracted in the direction of it's movement. This makes it by the way possible to create atoms with muons (the heavier brother of an electon) in the outer shell. Because the time contraction becomes serious, the life time of the muon get extended. These atoms could have interesting chemical properties, but I don't know that. I am just a physicist.

The simple hydrogen like model cannot do accurate statements about the outer shells, therefore you need to switch to a more complex relativistic model, which doesn't have analytic solutions.

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.

Name: Anonymous 2013-09-13 13:08

Ok. They say that the following Maxima code gives the 2d projection of wavefunction.

F_1 (x):= sum(cos(x+0.09*n*x),n,-10,10);
F_1 (x);
plot2d((F_1(x))^2,[x,-50,50],[nticks,1000])$


can Maxima draw the 3d one?

Name: Anonymous 2013-09-13 13:09

Are electrons 2D?

Name: Anonymous 2013-09-13 13:22

>>18
no. but wave function slice could be projected to 2d.

just like the http://en.wikipedia.org/wiki/Partial_derivative

Name: Anonymous 2013-09-13 13:22

>>18
3D electrons disgusting

Name: Anonymous 2013-09-13 15:18

I'm studying chemistry too. Group theory is actually used somewhere besides Haskell!
http://en.wikipedia.org/wiki/Point_group

Name: Anonymous 2013-09-13 15:25

>>21
Actually, group theory is used a lot in quantum physics. They have whole theory based on the E8 Lie group: http://demonstrations.wolfram.com/ParticleGeneratorBasedOnTheE8LieAlgebra/

Also, here is a beginner level intro, targeted as a replacement for these confusing chemistry schoolbooks:
http://www.chemistry.mcmaster.ca/esam/
"A chemical bond is the result of the accumulation of negative charge density in the region between any pair of nuclei to an extent sufficient to balance the forces of repulsion."

and no need for these long handwaving arguments.

Name: Anonymous 2013-09-13 15:59

That reminds me, we never did get around to completing that challenge about the monster group.

Name: Anonymous 2013-09-13 23:13

QUANTUM THEORY IS HARD

Name: Anonymous 2013-09-14 5:32

>>16
That is because the high school text book only wants to give the analytical model. You are right, in reality the orbitals are not spherical and the models can only be solved numerical. But when simplifying the model they are spherical.

It is kinda sad, but we are unable to solve most differential equations. We can interpret a lot of the behaviour of the solution (by looking at the phase plane for example or linearising an equation or by maximizing or minimizing its energy), but cannot pen the solution down. If there is a function describing the solution at all.


This is a open directory with a syllabus of differential equations: http://www.math.umn.edu/~olver/am_/

It is quite good for a syllabus and shows you how you derive certain properties from an equation even if you don't have the exact solution. If you view it as puzzle, then it can be quite fun, especially phase plane pictures are interesting, because they will visualize the behaviour of the system. Phase plane pictures are pictures, where the derivative is represented by an arrow to where it points. This way you can find saddle points, vortexes etc.

Name: Anonymous 2013-09-14 6:02

>>25
It is kinda sad, but we are unable to solve most differential equations.
You can still run a computer simulation to get the outcome of resulting reaction. The only problem, is that you cant state what material properties you need, as there are just too many combinations to optimize.

Name: Anonymous 2013-09-14 7:56

Everbody hide, the /g/uantum physicists here!

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