Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: particle indexes passed to addParticle #17

Merged
merged 2 commits into from
Oct 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ommprotocol/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -530,8 +530,8 @@ def restraint_force(self, indices=None, strength=5.0):
positions = self.positions if self.positions is not None else self.handler.positions
if indices is None:
indices = range(self.handler.topology.getNumAtoms())
for i, index in enumerate(indices):
force.addParticle(i, positions[index].value_in_unit(u.nanometers))
for index in indices:
force.addParticle(int(index), positions[index].value_in_unit(nanometers))
jaimergp marked this conversation as resolved.
Show resolved Hide resolved
return force

def distance_restraint_force(self, atoms, distances, strengths):
Expand Down