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

Nanobind density changes #1307

Merged
merged 31 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8e074f0
initial commit
Sep 12, 2024
a7fb08c
Make new arrays in RDF::reset
joaander Sep 26, 2024
368882e
port LocalDensity
surajkannur Nov 25, 2024
4dfd29f
missing install target
surajkannur Nov 25, 2024
b49ccc8
Merge nanobind branch
surajkannur Nov 25, 2024
2a57be0
make getRmax and getDiameter available
surajkannur Nov 25, 2024
1cc3d88
LocalDensity test passing and pre-commit changes
surajkannur Nov 25, 2024
3ede55d
ruff check . --fix
surajkannur Nov 25, 2024
62fec4d
Removed headers used twice
surajkannur Nov 26, 2024
1f452aa
SphereVoxelization test passing and output properties as read-only in…
surajkannur Nov 26, 2024
0335f1c
export properties as .def_prop_ro
surajkannur Nov 26, 2024
2f85c9c
overdue commit
Dec 19, 2024
3a0bb1f
overdue commit
Dec 19, 2024
7024466
GaussianDensity tests pass
surajkannur Jan 16, 2025
a290c45
Uncomment CorrelationFunction
janbridley Feb 5, 2025
afc41e4
Progress on exports
janbridley Feb 5, 2025
540cb4d
DONE
janbridley Feb 6, 2025
0094d8a
Lint density
janbridley Feb 6, 2025
1ed46af
clean up commented code that was not needed
DomFijan Feb 6, 2025
2f6b6ca
fix ruff issues
DomFijan Feb 6, 2025
23db6c4
remove unused code
DomFijan Feb 6, 2025
e780ab1
fix repr
DomFijan Feb 6, 2025
c5897c3
Merge branch 'nanobind' into nanobind_density_changes
DomFijan Feb 6, 2025
0b8be1c
export and use only double correlationFunction
DomFijan Feb 6, 2025
4deb50a
remove templating from the CorrelationFunction class
DomFijan Feb 6, 2025
83e179c
pre-commit
DomFijan Feb 6, 2025
d1386ca
remove unused code
DomFijan Feb 6, 2025
8688f8e
Remove density from clang-tidy
janbridley Feb 7, 2025
a53fa1c
clang-tidy fixes
joaander Feb 7, 2025
89417ce
More clang-tidy fixes.
joaander Feb 7, 2025
fda237d
More clang-tidy fixes.
joaander Feb 7, 2025
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
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ repos:
# TODO: remove exlcusions for modules as they are ported to nanobind
exclude: |
(?x)^(
^extern/|
^freud/density/
^extern/
)
args:
- --warnings-as-errors=*
44 changes: 26 additions & 18 deletions freud/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ add_library(
cluster/ClusterProperties.h
cluster/ClusterProperties.cc
# density
# density/CorrelationFunction.h
# density/CorrelationFunction.cc
# density/GaussianDensity.h
# density/GaussianDensity.cc
# density/LocalDensity.h
# density/LocalDensity.cc
# density/RDF.h
# density/RDF.cc
# density/SphereVoxelization.h
# density/SphereVoxelization.cc
density/CorrelationFunction.h
density/CorrelationFunction.cc
density/GaussianDensity.h
density/GaussianDensity.cc
density/LocalDensity.h
density/LocalDensity.cc
density/RDF.h
density/RDF.cc
density/SphereVoxelization.h
density/SphereVoxelization.cc
diffraction/StaticStructureFactor.h
diffraction/StaticStructureFactor.cc
diffraction/StaticStructureFactorDebye.h
Expand Down Expand Up @@ -139,10 +139,6 @@ nanobind_add_module(
target_link_libraries(_cluster PUBLIC freud TBB::tbb)
target_set_install_rpath(_cluster)

# density nanobind_add_module(_density density/...)
# target_link_libraries(_density PUBLIC freud TBB::tbb)
# target_set_install_rpath(_density)

nanobind_add_module(
_diffraction
diffraction/module-diffraction.cc
Expand Down Expand Up @@ -209,6 +205,18 @@ nanobind_add_module(
target_link_libraries(_pmft PUBLIC freud)
target_set_install_rpath(_pmft)

# density
nanobind_add_module(
_density
density/module-density.cc
density/export-CorrelationFunction.cc
density/export-GaussianDensity.cc
density/export-RDF.cc
density/export-LocalDensity.cc
density/export-SphereVoxelization.cc)
target_link_libraries(_density PUBLIC freud)
target_set_install_rpath(_density)

# util
nanobind_add_module(_util util/module-util.cc util/export-ManagedArray.cc
util/export-Vector.cc util/export-Vector.h)
Expand All @@ -222,8 +230,9 @@ set(python_files
box.py
cluster.py
data.py
environment.py
density.py
diffraction.py
environment.py
errors.py
locality.py
msd.py
Expand All @@ -233,7 +242,6 @@ set(python_files
interface.py
plot.py
util.py)
# density.py)

copy_files_to_build("${python_files}" "freud" "*.py")

Expand All @@ -242,9 +250,9 @@ if(SKBUILD)
install(FILES ${python_files} DESTINATION freud)
install(TARGETS _box DESTINATION freud)
install(TARGETS _cluster DESTINATION freud)
# install(TARGETS _density DESTINATION freud)
install(TARGETS _environment DESTINATION freud)
install(TARGETS _density DESTINATION freud)
install(TARGETS _diffraction DESTINATION freud)
install(TARGETS _environment DESTINATION freud)
install(TARGETS _locality DESTINATION freud)
install(TARGETS _order DESTINATION freud)
install(TARGETS _parallel DESTINATION freud)
Expand Down
3 changes: 2 additions & 1 deletion freud/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
box,
cluster,
data,
density,
diffraction,
environment,
interface,
Expand Down Expand Up @@ -35,7 +36,7 @@
"box",
"cluster",
"data",
# "density",
"density",
"diffraction",
"environment",
"get_num_threads",
Expand Down
73 changes: 0 additions & 73 deletions freud/_density.pxd

This file was deleted.

Loading