Skip to content

Commit

Permalink
2 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
janbridley committed Jan 14, 2025
1 parent b6a6e56 commit 1ea8ab3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions freud/environment/MatchEnv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,8 @@ void EnvironmentMotifMatch::compute(const freud::locality::NeighborQuery* nq,
/****************************
* EnvironmentRMSDMinimizer *
****************************/
void EnvironmentRMSDMinimizer::compute(const freud::locality::NeighborQuery* nq,
const freud::locality::NeighborList* nlist_arg,
void EnvironmentRMSDMinimizer::compute(const std::shared_ptr<freud::locality::NeighborQuery>& nq,
const std::shared_ptr<freud::locality::NeighborList>& nlist_arg,
locality::QueryArgs qargs, const vec3<float>* motif,
unsigned int motif_size, bool registration)
{
Expand Down
6 changes: 3 additions & 3 deletions freud/environment/MatchEnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ class EnvironmentCluster : public MatchEnv
* orient the second set of vectors such that it
* minimizes the RMSD between the two sets
*/
void compute(const freud::locality::NeighborQuery* nq, const freud::locality::NeighborList* nlist_arg,
void compute(const std::shared_ptr<freud::locality::NeighborQuery>& nq, const std::shared_ptr<freud::locality::NeighborList>& nlist_arg,
locality::QueryArgs qargs, const freud::locality::NeighborList* env_nlist_arg,
locality::QueryArgs env_qargs, float threshold, bool registration = false);

Expand Down Expand Up @@ -350,7 +350,7 @@ class EnvironmentMotifMatch : public MatchEnv
* orient the second set of vectors such that it
* minimizes the RMSD between the two sets
*/
void compute(const freud::locality::NeighborQuery* nq, const freud::locality::NeighborList* nlist_arg,
void compute(const std::shared_ptr<freud::locality::NeighborQuery> nq, const std::shared_ptr<freud::locality::NeighborList> nlist_arg,
locality::QueryArgs qargs, const vec3<float>* motif, unsigned int motif_size,
float threshold, bool registration = false);

Expand Down Expand Up @@ -412,7 +412,7 @@ class EnvironmentRMSDMinimizer : public MatchEnv
* orient the second set of vectors such that it
* minimizes the RMSD between the two sets
*/
void compute(const freud::locality::NeighborQuery* nq, const freud::locality::NeighborList* nlist_arg,
void compute(const std::shared_ptr<freud::locality::NeighborQuery>& nq, const std::shared_ptr<freud::locality::NeighborList>& nlist_arg,
locality::QueryArgs qargs, const vec3<float>* motif, unsigned int motif_size,
bool registration = false);

Expand Down
17 changes: 9 additions & 8 deletions freud/environment/export-MatchEnv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <nanobind/nanobind.h>
#include <nanobind/ndarray.h>
#include <nanobind/stl/shared_ptr.h> // NOLINT(misc-include-cleaner): used implicitly
#include <nanobind/stl/function.h> // NOLINT(misc-include-cleaner): used implicitly
#include <nanobind/stl/vector.h> // NOLINT(misc-include-cleaner): used implicitly

#include "MatchEnv.h"
Expand Down Expand Up @@ -54,30 +55,30 @@ namespace detail {
void export_MatchEnv(nb::module_& module)
{
// export minimizeRMSD function, move convenience to wrap? TODO
nb::function("minimizeRMSD", &minimizeRMSD);//carefull ths fn is overloaded for easier python interactivity. You should use the one that takes box etc in.
// module.def("minimizeRMSD", &minimizeRMSD); //carefull ths fn is overloaded for easier python interactivity. You should use the one that takes box etc in.
// export isSimilar function, move convenience to wrap? TODO
nb::function("isSimilar", &isSimilar); //carefull ths fn is overloaded for easier python interactivity. You should use the one that takes box etc in.
// module.def("isSimilar", &isSimilar); //carefull ths fn is overloaded for easier python interactivity. You should use the one that takes box etc in.

nb::class_<MatchEnv>(module, "MatchEnv")
.def(nb::init<>)
.def("getPointEnvironments", &MatchEnv::getPointEnvironments)
.def(nb::init<>())
.def("getPointEnvironments", &MatchEnv::getPointEnvironments);

nb::class_<EnvironmentCluster>(module, "EnvironmentCluster")
.def(nb::init<>())
.def("compute", &EnvironmentCluster::compute)
.def("getClusters", &EnvironmentCluster::getClusterIdx)
// .def("getClusters", &EnvironmentCluster::getClusterIdx) // TODO: should be there
.def("getClusterEnvironments", &EnvironmentCluster::getClusterEnvironments)
.def("getNumClusters", &EnvironmentCluster::getNumClusters)
.def("getNumClusters", &EnvironmentCluster::getNumClusters);

nb::class_<EnvironmentMotifMatch>(module, "EnvironmentMotifMatch")
.def(nb::init<>())
.def("compute", &wrap::compute_env_motif_match, nb::arg("nq"), nb::arg("nlist"), nb::arg("qargs"), nb::arg("motif"), nb::arg("motif_size"), nb::arg("threshold"), nb::arg("registration"))
.def("getMatches", &EnvironmentMotifMatch::getMatches)
.def("getMatches", &EnvironmentMotifMatch::getMatches);

nb::class_<EnvironmentRMSDMinimizer>(module, "EnvironmentRMSDMinimizer")
.def(nb::init<>())
.def("compute", &wrap::compute_env_rmsd_min, nb::arg("nq"), nb::arg("nlist"), nb::arg("qargs"), nb::arg("motif"), nb::arg("motif_size"), nb::arg("threshold"), nb::arg("registration"))
.def("getRMSDs", &EnvironmentRMSDMinimizer::getRMSDs)
.def("getRMSDs", &EnvironmentRMSDMinimizer::getRMSDs);

}

Expand Down

0 comments on commit 1ea8ab3

Please sign in to comment.