Skip to content

Commit

Permalink
Fix v-site coordinate stacking
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBoothroyd committed Jun 30, 2021
1 parent 8ea4e0a commit 20b4ae5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/smirnoffio.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ def _update_positions(self, X1, disable_vsite):
)

# Add placeholder positions for an v-sites.
X1 = (X1 + [Vec3(0.0, 0.0, 0.0)] * n_v_sites) * angstrom
if isinstance(X1, np.ndarray):
X1 = numpy.vstack([X1, np.zeros((n_v_sites, 3))]) * angstrom
else:
X1 = (X1 + [Vec3(0.0, 0.0, 0.0)] * n_v_sites) * angstrom

self.simulation.context.setPositions(X1)
self.simulation.context.computeVirtualSites()
Expand Down

0 comments on commit 20b4ae5

Please sign in to comment.