5
$\begingroup$

Is there any way to convert from Internal to Cartesian coordinates using simple formulas?

I have studied and implemented: INTERNAL TO CARTESIAN by Jack D. Kunitz.

But somehow the x, y and z values are not correct. I am not implementing the transformation back to the initial frame as it says, because I do not understand that step. Is that the reason for not being able to get correct answers or is this not a good tutorial or solution to follow.

$\endgroup$
  • $\begingroup$ The link you have provided returns 403 (forbidden) - it cannot be accessed. You might consider quoting the relevant information from the material you linked in your question to avoid problems relating to linking content in the future. $\endgroup$ – Todd Minehardt Jul 28 '16 at 15:35
  • 1
    $\begingroup$ I added the original DOI to the link. It's a BASIC implementation of Internal to Cartesian from 1995. $\endgroup$ – Geoff Hutchison Jul 28 '16 at 15:45
6
$\begingroup$

Sure, it's just trigonometry. There are a variety of open source implementations.

For example:

There are dozens in a search on GitHub if you don't like C++ or Python.

There's also a web app from Shodor for z-matrix conversion.

$\endgroup$
  • $\begingroup$ I have just one more question: If I have (x y z) coordinates at first. Then I change them to Internal coordinates. And then I change them back to (x y z) coordinates, what is the possibility that the new (x y z) coordinate points are EXACTLY the same as the 1st ones up to 4 floating points. Or in other words... Is it okay if they are not that similar. e.g. if I had a point in x=3.1455 and the new point is at x=3.4398. Is that acceptable? $\endgroup$ – Mohammad Sohaib Aug 5 '16 at 7:32
  • 1
    $\begingroup$ It's highly unlikely for the Cartesian coordinates to be identical. For example, the first atom will usually be placed at 0.0, 0.0, 0.0, regardless of the initial position. What matters is not the Cartesian frame of reference, but the relative positions between the atoms. $\endgroup$ – Geoff Hutchison Aug 5 '16 at 13:42
  • $\begingroup$ Lets just say I can move the first three atoms of the new molecule to be at the exact same place as the old one. Still is it unlikely that they will be different? Or lets assume that the first atom (coıncidentally) was placed at (0, 0, 0). the second atom at (x, 0, 0) and the third one also perfectly and coincidentally placed at the right spot. Assuming this, will the molecule be EXACTLY identical to the previous one or still it might have some floating point errors? $\endgroup$ – Mohammad Sohaib Aug 5 '16 at 13:55
  • $\begingroup$ OR in other words, will the relative positioning be EXACTLY the same upto... lets say... three or four floating point numbers. for example: old position = (3.14556, 6.3434, 9.9594) and new position = (3.1459, 6.3439, 9.9560) $\endgroup$ – Mohammad Sohaib Aug 5 '16 at 13:59
  • $\begingroup$ No there will often be floating point issues even if the orientation is exactly consistent. $\endgroup$ – Geoff Hutchison Aug 5 '16 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.