2

I've not been able ot find any information on this any where.

I am trying to represent the atomic coordinates of CaCO3 in the R -3 c H space group (see image 1), using matplotlib.

However, to achieve this the angle between the X and Y axis must be 120° instead of 90°. Is there a way to achieve this using matplotlib? Importantly, the angle betwen X-Z and Y-Z must still be 90°.

Unitcell of CaCO3 in the R -3 c H space group

enter image description here

tom10
  • 67,082
  • 10
  • 127
  • 137
  • 3
    Why do the axes have to be in a different angle? Could you not just calculate the positions of the molecules based on angles and distances in normal x-y-z coordinates? – Jakob Oct 01 '20 at 17:20
  • 1
    You can do non-orthogonal axes in matplotlib, just search for it ("matplotlib non-orthogonal axes"). Here's [an SO answer](https://stackoverflow.com/questions/23581073/draw-non-orthogonal-axis-in-matplotlib) I wrote years ago for a different problem domain, but there might be others that work better for your goals. – tom10 Oct 01 '20 at 17:34
  • @Jakob Maybe. I just don't know what the new x-y-z coordinates should be or how to find them. Nor do I have the angle or distance of the new points. All i have are the coordinates of the old points. – Christian S. O. Oct 01 '20 at 18:26
  • @tom10 I have seen that answer already. The main issue is that, I am not a very skilled programmer, so I cannot figure how any of it works. – Christian S. O. Oct 01 '20 at 18:28
  • 1
    @ChristianS.O.: if that's the case, in the future, please let us know when you ask the question. To set it up so the first round is people telling you the obvious thing and then you saying that that's not what you want just wastes a cycle and makes people become uninterested. And now, what do we really do?, when you've seen an answer and you can't figure it out, but we have no explanation of what you can't figure out because it's not in the question, so it's not at all clear how we can help (at least not to me... maybe someone else will have an idea). – tom10 Oct 01 '20 at 18:38
  • @ChristianS.O.: and, I assume, that you also followed the link from the SO answer to the [matplotlib example](https://matplotlib.org/examples/axes_grid/demo_curvelinear_grid.html)? If not, you may find that it works better for you. – tom10 Oct 01 '20 at 18:47
  • @ChristianS.O. This would be a coordinate transformation for the y (or the x) axis, which will change the x and y coordinates of all points. But I am also pretty sure that some packages for drawing crystal structures exist already. It may be quicker for you to find one than trying to convert the coordinates. – Jakob Oct 01 '20 at 19:02

0 Answers0