cmelab / cmelab/morphct

Update `snap_molecule_indices` or use function from cmeutils?

Open
#33 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2
Forks
9
PR merge metrics
No merged PRs in 30d

Description

https://github.com/cmelab/morphct/blob/31ddf263979b7200b7015fa16eb4d6af3ea01fca/morphct/mobility_kmc.py#L502

I changed this code to the code below to deal with an indexing artifact of how the xml was converted to gsd . Is this worth updating in morph? Or is this redundant with this cmeutils PR https://github.com/cmelab/cmeutils/pull/20

```
system = freud.AABBQuery.from_system(snap)
bonds = snap.bonds.group
bonds = bonds[np.lexsort((bonds[:,1],bonds[:,0]))]
snap.bonds.group = bonds
n_query_pts = n_pts = snap.bonds.N
query_pt_inds = snap.bonds.group[:,0]
pt_inds = snap.bonds.group[:, 1]
distances = system.box.compute_distances(
system.points[query_pt_inds], system.points[pt_inds]
)
nlist = freud.NeighborList.from_arrays(
n_query_pts, n_pts, query_pt_inds, pt_inds, distances
)
cluster = freud.cluster.Cluster()
cluster.compute(system=system, neighbors=nlist)
return cluster.cluster_idx
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.