I would like to model the kinematics of a collection of points in R^3 - which represent atoms on a molecule - using Maple. I want to specify the fixed distances between the points. I just saw a formula in a book I own for the number of degrees of freedom of such a system. I wil have plenty of degrees of freedom with which to work. So, I will begin - in the simplest case - by arbitrarily specifying as many of the coordinates for the points as possible.
Does anyone have an idea of how best to program such a model?
I tried something like
x[1]:=0; y[1]:=0; z[1]:=0;
x[2]:=a2; y[2]:=0; z[2]:=0; // point P2
x[3]:=a3; y[3]:=b3; z[3]:=0; // point P3
with a2, a3, b3 arbitrary. Then, I want to specify a4, b4, c4 in such a way that the distance between point 3 and P2 is given by d23.
This will leave 2 of a4, b4, c4 arbitrary. Ideally, then, I want to specify that the distance from P1 to P4 be >= some minimum value. Same for P2 and P4.
Algebraic formulation
One way to do this is as a system of polynomial equations and inequalities. It is best to deal with the square of the distance instead of the distance itself [since that removes an unecessary square-root].
When you have a specific distance, then you can do something like
(a4-a3)^2 + (b4-b3)^2 + c4^2 = d23, and inequalities in the same way. Unfortunately, "resolving" such a system requires a CAD algorithm which, even after all these years, Maple still does not have. Its main competitors do.Differential formulation
Since you are doing kinematics, instead of using a moving frame [as you implicitly do in your formulation by putting some particles in a specifc location], use a fixed frame but do things in terms of the path of the atoms. Your initial conditions will still be algebraic, as above. But then your conditions will be in such a way as to give you a system of ODEs with conditions in exactly the way that the new numerical solvers can handle.
Algebraic formulation
I am keeping things incredibly simple. The problem is - if things are too simple, classical mechanics predicts electrons and protons collapse. Of course, we know by quantum mechanics that they do not - that there exist minimal distances between them. I crudely use this as a boundary condition on the distances between particles.
I am making a static model - as if the electrons and atomic nuclei simply "hang there" in space, with absolute knowledge of their positions - in complete violation of Heisenberg's Uncertainty Principle. So, no time derivative.
I am working on 2 electrons and 2 atomic nuclei right now: a tetrahedron. I am trying to prove that their configuration ought to be planar - in order to keep the 2 electrons as far apart from one another as possible and the atomic nuclei as far apart from one another.
On wikipedia, I found the determinantal formula for the volume of a tetrahedron - given the lengths of its 6 edges. If one chooses the 6 lengths arbitrarily in such a way that this formula yields a negative value, then no such tetrahedron with those edge lengths exist. The volume =0 is the degenerate / critical / boundary case.
I cannot really make use of calculus (derivative = 0) to find the minimum value of the total potential energy of this system
A point in my network is either an electron or an atomic nucleus.
E = sum over i<j of Zi*Zj*ei*ej/rij where Zi = atomic number (Zi=1 for an electron), ei=e if an electron, ei=-e if an atomic nucleus