Skip to content

Commit

Permalink
PDBparser debug
Browse files Browse the repository at this point in the history
  • Loading branch information
minhuanli committed May 2, 2024
1 parent 8152476 commit 1e1e5f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SFC_Torch/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def orth2frac(self, orth_pos: np.ndarray) -> np.ndarray:
Returns:
frational coordinates, np.ndarray, [n_points, ..., 3]
"""
orth2frac_mat = np.array(self.unit_cell.fractionalization_matrix.tolist())
orth2frac_mat = np.array(self.cell.fractionalization_matrix.tolist())
frac_pos = np.einsum("n...x,yx->n...y", orth_pos, orth2frac_mat)
return frac_pos

Expand All @@ -361,7 +361,7 @@ def frac2orth(self, frac_pos: np.ndarray) -> np.ndarray:
Returns:
orthogonal coordinates, np.ndarray, [n_points, ..., 3]
"""
frac2orth_mat = np.array(self.unit_cell.orthogonalization_matrix.tolist())
frac2orth_mat = np.array(self.cell.orthogonalization_matrix.tolist())
orth_pos = np.einsum("n...x,yx->n...y", frac_pos, frac2orth_mat)
return orth_pos

Expand Down

0 comments on commit 1e1e5f3

Please sign in to comment.