From 1221012c7bcf675e163fbc2b71908a9b4b404752 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Tue, 28 Apr 2020 12:58:06 +0300 Subject: [PATCH] Fix reciprocal basis (transposition) in argproc.py Former-commit-id: 67df0d195ad0b70b508d1019a7d64c2f37689aeb --- qpms/argproc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qpms/argproc.py b/qpms/argproc.py index cc48d78..bfd1fbf 100644 --- a/qpms/argproc.py +++ b/qpms/argproc.py @@ -403,7 +403,7 @@ class ArgParser: from .qpms_c import lll_reduce self.direct_basis = lll_reduce(self.args.basis_vectors, delta=1.) import numpy as np - self.reciprocal_basis1 = np.linalg.inv(self.direct_basis) + self.reciprocal_basis1 = np.linalg.inv(self.direct_basis.T) self.reciprocal_basis2pi = 2 * np.pi * self.reciprocal_basis1 def _eval_rectlattice2d(self): # feature: rectlattice2d @@ -419,7 +419,7 @@ class ArgParser: import numpy as np a.basis_vectors = [(a.period[0], 0.), (0., a.period[1])] self.direct_basis = np.array(a.basis_vectors) - self.reciprocal_basis1 = np.linalg.inv(self.direct_basis) + self.reciprocal_basis1 = np.linalg.inv(self.direct_basis.T) self.reciprocal_basis2pi = 2 * np.pi * self.reciprocal_basis1 def _process_planewave_angles(self): #feature: planewave