Skip to content

Commit

Permalink
Merge pull request #74 from chrisjonesBSU/fix-lattice
Browse files Browse the repository at this point in the history
Fix translation in `Lattice`
  • Loading branch information
chrisjonesBSU committed Oct 10, 2023
2 parents dbc5b80 + 88d4958 commit aeb45d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flowermd/base/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,9 @@ def _build_system(self):
try:
comp1 = self.all_molecules[next_idx]
comp2 = self.all_molecules[next_idx + 1]
comp2.translate(self.basis_vector)
comp2.translate(
self.basis_vector * np.array([self.x, self.y, 0])
)
# TODO: what if comp1 and comp2 have different names?
unit_cell = mb.Compound(
subcompounds=[comp1, comp2], name=comp1.name
Expand Down

0 comments on commit aeb45d5

Please sign in to comment.