Fixed vectors to take box of each frame
This commit is contained in:
parent
b17aa6b199
commit
9cbdd2b464
@ -551,7 +551,7 @@ def pore_coordinates(coordinates, origin, sym_axis="z"):
|
|||||||
|
|
||||||
|
|
||||||
@map_coordinates
|
@map_coordinates
|
||||||
def vectors(coordinates, atoms_a, atoms_b, normed=False, box=None):
|
def vectors(coordinates, atoms_a, atoms_b, normed=False):
|
||||||
"""
|
"""
|
||||||
Compute the vectors between the atoms of two subsets.
|
Compute the vectors between the atoms of two subsets.
|
||||||
|
|
||||||
@ -580,6 +580,7 @@ def vectors(coordinates, atoms_a, atoms_b, normed=False, box=None):
|
|||||||
coords[6] - (coords[7] + coords[8])/2,
|
coords[6] - (coords[7] + coords[8])/2,
|
||||||
])
|
])
|
||||||
"""
|
"""
|
||||||
|
box = coordinates.box
|
||||||
coords_a = coordinates[atoms_a]
|
coords_a = coordinates[atoms_a]
|
||||||
if len(coords_a.shape) > 2:
|
if len(coords_a.shape) > 2:
|
||||||
coords_a = coords_a.mean(axis=0)
|
coords_a = coords_a.mean(axis=0)
|
||||||
|
Loading…
Reference in New Issue
Block a user