Skip to content

Commit

Permalink
Need to use lavec.transpose() for computing xc_image
Browse files Browse the repository at this point in the history
  • Loading branch information
ttadano committed Feb 24, 2023
1 parent b39c60e commit fe46095
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions python/alm/fcsxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,7 @@ def _add_force_constants_xml(self, root_in):
clusters = self._fc2_info[1]
for fcval, cluster in zip(fcvals, clusters):
list_mir_imgs = self._closest_mirror_images[cluster[0] // 3][
cluster[1] // 3
][0]
cluster[1] // 3][0]
num_mir_img = len(list_mir_imgs)
fcval_scale = fcval / float(num_mir_img)
for mir_img in list_mir_imgs:
Expand Down Expand Up @@ -473,7 +472,7 @@ def _set_x_images(self):
self._xf_image[icell, :, 1] = self._xf[:, 1] + float(iy)
self._xf_image[icell, :, 2] = self._xf[:, 2] + float(iz)

self._xc_image = np.dot(self._xf_image, self._lavec)
self._xc_image = np.dot(self._xf_image, self._lavec.transpose())

def _compute_closest_mirror_images(self):

Expand Down Expand Up @@ -529,9 +528,8 @@ def _setup_symmetry(self):
symnum_translation.append(elem)

self._nat_prim = self._nat_super // len(symnum_translation)
self._map_p2s = (
np.ones((self._nat_prim, len(symnum_translation)), dtype="int") * -1
)
self._map_p2s = (np.ones((self._nat_prim,
len(symnum_translation)), dtype="int") * -1)

unique_set, atom_in_primitive_at_origin = np.unique(
mapping_to_primitive, return_index=True
Expand Down

0 comments on commit fe46095

Please sign in to comment.