Skip to content

Commit

Permalink
Make sure distance search queries work across periodic boundaries.
Browse files Browse the repository at this point in the history
[ref #194]
  • Loading branch information
lohedges committed May 20, 2021
1 parent 8ebae07 commit cbaac55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/BioSimSpace/Metadynamics/CollectiveVariable/_funnel.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def makeFunnel(system, protein=None, ligand=None, alpha_carbon_name="CA", proper
# Get the coordinate and add to the reference coord using the
# its distance from the reference in the minimum image convention.
coord = atom._sire_object.property(coord_prop)
coord = ref_coord - _SireVector(space.calcDistVector(coord, ref_coord))
coord = ref_coord + _SireVector(space.calcDistVector(ref_coord, coord))

# Update the center of mass.
com += mass * coord
Expand Down Expand Up @@ -875,7 +875,7 @@ def makeFunnel(system, protein=None, ligand=None, alpha_carbon_name="CA", proper
string = f"atoms within 10 of {x},{y},{z} and atomname {alpha_carbon_name}"

# Perform the search.
search = system.search(string)
search = system.search(string, property_map=search_map)

# Raise exception if no atoms were found.
if search.nResults() == 0:
Expand Down

0 comments on commit cbaac55

Please sign in to comment.