Skip to content

Commit

Permalink
slight tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-waltmann committed Feb 13, 2024
1 parent e0c2d29 commit 3aca60e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 deletions.
4 changes: 2 additions & 2 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ dependencies:
- bokeh
- fresnel>=0.12
- freud
- gsd
- gsd<3
- hoomd=2.*
- ipywidgets>=7
- jupyterlab>=3
- lammps
- matplotlib>=3
- matplotlib>=3,<3.7
- mdanalysis>=2
- mdtraj
- nbconvert>=6
Expand Down
32 changes: 15 additions & 17 deletions module_intros/locality.Filter.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
{
"data": {
"text/plain": [
"<freud.locality.NeighborList at 0x7f0769d6b0c0>"
"<freud.locality.NeighborList at 0x7f3671512840>"
]
},
"execution_count": 1,
Expand Down Expand Up @@ -102,7 +102,7 @@
{
"data": {
"text/plain": [
"<freud.locality.NeighborList at 0x7f08241e9fc0>"
"<freud.locality.NeighborList at 0x7f371c162600>"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -138,7 +138,7 @@
{
"data": {
"text/plain": [
"<freud.locality.NeighborList at 0x7f0769d82640>"
"<freud.locality.NeighborList at 0x7f371e34fa80>"
]
},
"execution_count": 3,
Expand All @@ -153,11 +153,9 @@
"M = 15\n",
"query_point_indices = np.arange(N).repeat(M)\n",
"point_indices = np.random.randint(low=0, high=N, size=M * N)\n",
"distances = np.linalg.norm(\n",
" box.wrap(points[point_indices, :] - points[query_point_indices, :]), axis=-1\n",
")\n",
"vectors = box.wrap(points[point_indices, :] - points[query_point_indices, :])\n",
"nlist = freud.locality.NeighborList.from_arrays(\n",
" N, N, query_point_indices, point_indices, distances\n",
" N, N, query_point_indices, point_indices, vectors\n",
")\n",
"\n",
"# call compute\n",
Expand All @@ -184,7 +182,7 @@
{
"data": {
"text/plain": [
"<freud.locality.NeighborList at 0x7f0769d6b200>"
"<freud.locality.NeighborList at 0x7f36707510c0>"
]
},
"execution_count": 4,
Expand Down Expand Up @@ -310,22 +308,22 @@
"id": "24fc48ae",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING: Query point indices 0, 1, 2, 3, 4 do not have full neighbor shells.\n"
]
},
{
"data": {
"text/plain": [
"<freud.locality.FilterSANN at 0x7f083f9f51d0>"
"<freud.locality.FilterSANN at 0x7f371e352520>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING: Query point indices 0, 1, 2, 3, 4 do not have full neighbor shells.\n"
]
}
],
"source": [
Expand Down Expand Up @@ -404,7 +402,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.10.13"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3aca60e

Please sign in to comment.