Relative Content

Tag Archive for pythonnumpymatplotlib

How to plot lots of lines in 3d space with colors

I have 2 set of points, where every point in first set have z=0 and in secound set have z=2460.
I need to connect every point from the first set to every point from the second set. Moreover, it needs to color the lines depending on the two-dimensional matrix.

Subdividing triclinic cell in Python

I apologize if this is a repeated question, however I cannot find any posts with exactly what I need so I felt it was appropriate to ask. I am currently analyzing molecular dynamics data, and would like to bin the supercell I am using in NxNxN parts. The cell shape is triclinic, or in other words it is a parallelepiped where the 3 main side lengths and 3 main angles are all different. Following this post here, I was able to figure out how to construct an image of my original cell. However, I am struggling to properly subdivide the original cell. My main issue actually is that there are small translations of the subcells that cause them to be misaligned from each other as well as misaligned relative to themselves