lattice_vectors matrix axis order

#2
by acecchini - opened

Hi,

Could you please indicate if the lattice_vectors matrix is the change of basis from cannonical basis in R^3 to the lattice basis (that is the coordinates of the lattice base vectors are given in the first dimension of the lattice_vectors matrix (the rows) and the lattice base vectors are given in the second dimension of the lattice_vectors matrix (the columns)), or if it is the transposed of this matrix? I cannot infer it from the descriptive example, where you give the lattice_vectors matrix of a cubic lattice (the matrix is symmetric).

Thanks!

LeMaterial org
edited 8 days ago

Hi @acecchini ,

Thanks for your question! They should be given like so [[ vector a ], [vector b], [vector c]]

To give you two examples:

To load the structure as a pymatgen object you should simply be able to:
Structure(row['lattice_vectors'], row['species_at_sites'], row['cartesian_site_positions'], coords_are_cartesian=True)

And for a lattice, with say a monoclinic lattice with a=2, b=3, c= 4 and beta=60, you should have a matrix of:
[[ 1.73, 0. , 1. ], [ 0. , 3. , 0. ], [ 0. , 0. , 4. ]]

Let me know if this answers your question!

Sign up or log in to comment