From 211c306cf7d65cbf7476c612c3bad7a660aa7242 Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Mon, 27 Apr 2026 15:01:42 -0400 Subject: [PATCH 1/4] cmake: project-rooted #include scheme and admin/include_check.sh Switch every project-local #include "..." to use the path relative to the repository root, e.g. #include "src/forcefields/mmff.h" #include "rdkit_extensions/mmff_flattened_builder.h" #include "tests/test_utils.h" Bare neighbor includes ("foo.h"), upward-relative includes ("../foo.h"), and angle-bracket project-local includes () are no longer accepted. Mechanism: - Add an INTERFACE library nvmolkit_include_root (in the root CMakeLists.txt) that exports ${PROJECT_SOURCE_DIR} as its include path. A single link_libraries(nvmolkit_include_root) just before the project subdirectories applies it to every first-party target. - Drop the previous per-target target_include_directories(... ${CMAKE_CURRENT_SOURCE_DIR}) and ${PROJECT_SOURCE_DIR}/... entries that existed only to expose project headers via library include dirs. They are now redundant. - Drop a couple of dead include paths (nvmolkit/utils does not exist; smarts_filter no longer needs ${PROJECT_SOURCE_DIR}/src once the include rewrite happens). Add admin/run_include_check.sh + admin/include_check.py to enforce the policy. Default mode rewrites in place, -d / --check mode reports violations and exits non-zero. Wired into .github/workflows/lint.yml as a new include-check job alongside clang-format, cmake-format, and ruff-format. Configure, build, and ctest pass. --- .github/workflows/lint.yml | 20 ++ CMakeLists.txt | 8 + admin/include_check.py | 315 ++++++++++++++++++ admin/run_include_check.sh | 38 +++ benchmarks/benchmark_utils.cpp | 4 +- benchmarks/bit_vector.cpp | 2 +- benchmarks/eigen_solver_bench.cu | 6 +- benchmarks/etkdg_embed_bench.cpp | 12 +- benchmarks/etkdg_ff_bench.cpp | 8 +- benchmarks/mmff_multimol_bench.cpp | 6 +- benchmarks/mmff_optimize_bench.cpp | 4 +- benchmarks/morgan_fp.cpp | 2 +- benchmarks/updateInverseHessianBench.cu | 6 +- nvmolkit/CMakeLists.txt | 43 +-- nvmolkit/DataStructs.cpp | 6 +- nvmolkit/array_helpers.cpp | 2 +- nvmolkit/array_helpers.h | 2 +- nvmolkit/batchedForcefield.cpp | 26 +- nvmolkit/clustering.cpp | 6 +- nvmolkit/conformerRmsd.cpp | 6 +- nvmolkit/embedMolecules.cpp | 4 +- nvmolkit/fingerprints.cpp | 6 +- nvmolkit/mmffOptimization.cpp | 6 +- nvmolkit/mmff_python_utils.h | 2 +- nvmolkit/substructure.cpp | 6 +- nvmolkit/tfd.cpp | 8 +- nvmolkit/uffOptimization.cpp | 4 +- rdkit_extensions/CMakeLists.txt | 13 - rdkit_extensions/bounds_matrix.cpp | 2 +- rdkit_extensions/conformer_pruning.cpp | 2 +- .../dist_geom_flattened_builder.cpp | 2 +- .../dist_geom_flattened_builder.h | 2 +- rdkit_extensions/mmff_builder.cpp | 8 +- rdkit_extensions/mmff_contribs.cpp | 8 +- rdkit_extensions/mmff_contribs.h | 2 +- rdkit_extensions/mmff_flattened_builder.cpp | 2 +- rdkit_extensions/mmff_flattened_builder.h | 4 +- rdkit_extensions/mmff_optimize.h | 2 +- rdkit_extensions/uff_flattened_builder.cpp | 2 +- rdkit_extensions/uff_flattened_builder.h | 2 +- src/CMakeLists.txt | 22 +- src/butina.cu | 8 +- src/butina.h | 2 +- src/conformer_rmsd.cu | 4 +- src/conformer_rmsd.h | 2 +- src/conformer_rmsd_mol.cpp | 4 +- src/conformer_rmsd_mol.h | 2 +- src/data_structures/CMakeLists.txt | 1 - src/embedder_utils.cpp | 2 +- src/etkdg.cpp | 22 +- src/etkdg.h | 6 +- src/etkdg_impl.cpp | 10 +- src/etkdg_impl.h | 8 +- src/etkdg_kernels.cu | 2 +- src/etkdg_stage_coordgen.cu | 2 +- src/etkdg_stage_coordgen.h | 6 +- src/etkdg_stage_distgeom_minimize.cu | 14 +- src/etkdg_stage_distgeom_minimize.h | 6 +- src/etkdg_stage_etk_minimization.cu | 8 +- src/etkdg_stage_etk_minimization.h | 6 +- src/etkdg_stage_stereochem_checks.cu | 4 +- src/etkdg_stage_stereochem_checks.h | 2 +- src/etkdg_stage_update_conformers.cu | 2 +- src/etkdg_stage_update_conformers.h | 4 +- src/forcefields/CMakeLists.txt | 21 -- src/forcefields/batched_forcefield.cpp | 2 +- src/forcefields/batched_forcefield.h | 2 +- src/forcefields/coord_gen.cu | 8 +- src/forcefields/dg_batched_forcefield.cu | 2 +- src/forcefields/dg_batched_forcefield.h | 4 +- src/forcefields/dist_geom.cu | 10 +- src/forcefields/dist_geom.h | 6 +- src/forcefields/dist_geom_kernels.cu | 6 +- src/forcefields/dist_geom_kernels_device.cuh | 2 +- src/forcefields/etk_batched_forcefield.cu | 2 +- src/forcefields/etk_batched_forcefield.h | 4 +- src/forcefields/ff_utils.cpp | 2 +- src/forcefields/forcefield_constraints.cpp | 2 +- src/forcefields/forcefield_constraints.h | 4 +- src/forcefields/kernel_utils.cu | 2 +- src/forcefields/kernel_utils.cuh | 2 +- src/forcefields/mmff.cu | 6 +- src/forcefields/mmff.h | 6 +- src/forcefields/mmff_batched_forcefield.cu | 2 +- src/forcefields/mmff_batched_forcefield.h | 4 +- src/forcefields/mmff_kernels.cu | 6 +- src/forcefields/mmff_kernels_device.cuh | 2 +- src/forcefields/uff.cu | 4 +- src/forcefields/uff.h | 8 +- src/forcefields/uff_batched_forcefield.cu | 2 +- src/forcefields/uff_batched_forcefield.h | 4 +- src/forcefields/uff_kernels.cu | 6 +- src/forcefields/uff_kernels.h | 2 +- src/forcefields/uff_kernels_device.cuh | 2 +- src/load_store.cuh | 2 +- src/minimizer/CMakeLists.txt | 7 - src/minimizer/bfgs_common.cpp | 2 +- src/minimizer/bfgs_common.h | 6 +- src/minimizer/bfgs_hessian.cu | 8 +- src/minimizer/bfgs_hessian.h | 4 +- src/minimizer/bfgs_minimize.cu | 22 +- src/minimizer/bfgs_minimize.h | 6 +- src/minimizer/bfgs_minimize_permol_kernels.cu | 12 +- src/minimizer/bfgs_minimize_permol_kernels.h | 6 +- src/minimizer/bfgs_mmff.cpp | 16 +- src/minimizer/bfgs_mmff.h | 8 +- src/minimizer/bfgs_uff.cpp | 16 +- src/minimizer/bfgs_uff.h | 6 +- src/morgan_fingerprint.cpp | 4 +- src/morgan_fingerprint.h | 8 +- src/morgan_fingerprint_common.cpp | 2 +- src/morgan_fingerprint_cpu.cpp | 4 +- src/morgan_fingerprint_cpu.h | 2 +- src/morgan_fingerprint_gpu.cpp | 16 +- src/morgan_fingerprint_gpu.h | 4 +- src/morgan_fingerprint_kernels.cu | 8 +- src/morgan_fingerprint_kernels.h | 10 +- src/similarity.cpp | 14 +- src/similarity.h | 2 +- src/similarity_kernels.cu | 8 +- src/similarity_kernels.h | 2 +- src/similarity_op.cuh | 2 +- src/substruct/CMakeLists.txt | 10 +- src/substruct/boolean_tree.cuh | 2 +- src/substruct/gpu_executor.cu | 4 +- src/substruct/gpu_executor.h | 16 +- src/substruct/graph_labeler.cuh | 12 +- src/substruct/minibatch_planner.cpp | 8 +- src/substruct/minibatch_planner.h | 4 +- src/substruct/molecules.cpp | 12 +- src/substruct/molecules.h | 8 +- src/substruct/molecules_device.cuh | 8 +- src/substruct/packed_bonds.cpp | 2 +- src/substruct/packed_bonds_device.cuh | 2 +- src/substruct/pinned_buffer_pool.cpp | 2 +- src/substruct/pinned_buffer_pool.h | 6 +- src/substruct/recursive_preprocessor.cu | 12 +- src/substruct/recursive_preprocessor.h | 16 +- src/substruct/substruct_algos.cuh | 12 +- src/substruct/substruct_kernels.cu | 20 +- src/substruct/substruct_kernels.h | 4 +- src/substruct/substruct_launch_config.cpp | 2 +- src/substruct/substruct_search.cu | 34 +- src/substruct/substruct_search.h | 2 +- src/substruct/substruct_search_internal.cpp | 16 +- src/substruct/substruct_search_internal.h | 22 +- src/substruct/substruct_types.h | 6 +- src/substruct/thread_worker_context.h | 2 +- src/symmetric_eigensolver.cu | 6 +- src/testutils/CMakeLists.txt | 6 - src/testutils/conformer_checkers.cpp | 2 +- src/testutils/mol_data.cpp | 2 +- src/testutils/substruct_validation.cu | 12 +- src/testutils/substruct_validation.h | 2 +- src/tfd/CMakeLists.txt | 3 - src/tfd/tfd_common.cpp | 4 +- src/tfd/tfd_common.h | 4 +- src/tfd/tfd_cpu.cpp | 6 +- src/tfd/tfd_cpu.h | 2 +- src/tfd/tfd_gpu.cpp | 6 +- src/tfd/tfd_gpu.h | 4 +- src/tfd/tfd_kernels.cu | 6 +- src/tfd/tfd_kernels.h | 2 +- src/tfd/tfd_transfer.cu | 4 +- src/triangle_smooth.cu | 4 +- src/triangle_smooth.h | 2 +- src/utils/CMakeLists.txt | 16 - src/utils/cuda_error_check.h | 2 +- src/utils/device.cpp | 6 +- src/utils/device_timings.cuh | 2 +- src/utils/device_vector.h | 2 +- src/utils/exceptions.cpp | 2 +- src/utils/host_vector.h | 2 +- src/utils/openmp_helpers.cpp | 2 +- src/utils/pinned_host_allocator.cpp | 2 +- src/utils/pinned_host_allocator.h | 2 +- tests/CMakeLists.txt | 2 +- tests/integration/test_fp_sim_workflow.cpp | 6 +- tests/smarts_filter.cpp | 4 +- tests/test_bfgs_hessian.cpp | 4 +- tests/test_bfgs_minimizer.cu | 16 +- tests/test_boolean_tree.cu | 8 +- tests/test_butina.cpp | 6 +- tests/test_conformer_checkers.cpp | 2 +- tests/test_coordgen.cu | 10 +- tests/test_cuda_error_check.cpp | 2 +- tests/test_device.cpp | 4 +- tests/test_device_timings.cu | 4 +- tests/test_device_vector.cpp | 4 +- tests/test_distgeom.cu | 18 +- tests/test_distgeom_kernels.cu | 12 +- tests/test_etkdg.cu | 22 +- tests/test_etkdg_coordgen.cu | 10 +- tests/test_etkdg_etk_minimize.cu | 8 +- tests/test_etkdg_minimize.cu | 14 +- tests/test_etkdg_result_tracker.cpp | 2 +- tests/test_etkdg_stereochem_checks.cu | 10 +- tests/test_flat_bit_vect.cpp | 2 +- tests/test_flat_bit_vect_device.cu | 8 +- tests/test_flattened_builder.cu | 8 +- tests/test_graph_labeler.cu | 14 +- tests/test_graph_labeler_recursive.cu | 22 +- tests/test_host_vector.cu | 6 +- tests/test_minibatch_planner.cpp | 10 +- tests/test_mmff.cu | 22 +- tests/test_molecules.cu | 10 +- tests/test_morgan_fingerprint.cpp | 6 +- tests/test_openmp_helpers.cpp | 2 +- tests/test_pinned_host_allocator.cpp | 2 +- tests/test_query.cu | 6 +- tests/test_rdkit_bounds_matrix.cpp | 2 +- tests/test_recursive_preprocessor.cu | 16 +- tests/test_similarity.cpp | 2 +- tests/test_substruct_algos.cu | 22 +- tests/test_substruct_integration.cu | 12 +- tests/test_substruct_label_integration.cu | 18 +- tests/test_substruct_search.cu | 8 +- tests/test_tfd.cpp | 4 +- tests/test_tfd_cpu.cpp | 4 +- tests/test_tfd_gpu.cpp | 4 +- tests/test_tfd_kernels.cu | 6 +- tests/test_thread_safe_queue.cpp | 2 +- tests/test_triangle_smooth.cu | 4 +- tests/test_uff.cu | 16 +- tests/test_utils.cpp | 2 +- tests/test_work_splitting.cpp | 2 +- 226 files changed, 1071 insertions(+), 798 deletions(-) create mode 100755 admin/include_check.py create mode 100755 admin/run_include_check.sh diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 1d00e8c4..211a056e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -83,6 +83,26 @@ jobs: set -xeuo pipefail bash admin/run_cmake_format_lint.sh -d + include-check: + name: include-check + runs-on: ubuntu-24.04 + timeout-minutes: 30 + + steps: + - name: Check out source tree + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Run include-path check + shell: bash + run: | + set -xeuo pipefail + bash admin/run_include_check.sh -d + ruff-format: name: ruff-format runs-on: ubuntu-24.04 diff --git a/CMakeLists.txt b/CMakeLists.txt index 939663f8..3684c15f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,6 +63,12 @@ endif() # -------------------------------- set(CMAKE_POSITION_INDEPENDENT_CODE ON) +# Project-rooted include scheme. Every first-party target links this so all in-project includes are written as +# "src/...", "rdkit_extensions/...", "tests/...", "benchmarks/...", or "nvmolkit/..." relative to the project root. +# Enforced by admin/run_include_check.sh. +add_library(nvmolkit_include_root INTERFACE) +target_include_directories(nvmolkit_include_root INTERFACE ${PROJECT_SOURCE_DIR}) + # ------------------------------------------------------ # All our defines. These are all in the cmake directory. # ------------------------------------------------------ @@ -106,6 +112,8 @@ endif() # ------------------------ # Subdirectory includes # ------------------------ +# Apply the project-rooted include search path to every first-party target created in the subdirectories below. +link_libraries(nvmolkit_include_root) add_subdirectory(rdkit_extensions) add_subdirectory(src) if(NVMOLKIT_BUILD_PYTHON_BINDINGS) diff --git a/admin/include_check.py b/admin/include_check.py new file mode 100755 index 00000000..3f340f3b --- /dev/null +++ b/admin/include_check.py @@ -0,0 +1,315 @@ +#!/usr/bin/env python3 +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Enforce project-rooted #include "..." paths for nvMolKit C++/CUDA sources. + +Two modes: + rewrite (default): rewrites non-conforming includes in place. + --check: reports violations and exits non-zero, no edits. + +Project policy: + Every project-local #include "..." must use the path relative to the + repository root, e.g. #include "src/forcefields/mmff.h". Bare neighbor + includes (e.g. #include "mmff.h" referring to a same-dir header) and + upward-relative includes (e.g. #include "../foo/bar.h") are violations. + System / third-party includes using <...> are ignored. +""" + +from __future__ import annotations + +import argparse +import os +import sys +from pathlib import Path +from typing import Iterable + +# Directories scanned for source files. Anything outside this list is ignored. +SCAN_DIRS = ("src", "rdkit_extensions", "tests", "benchmarks", "nvmolkit") + +# Top-level directories considered "project-rooted" for the purposes of +# rewriting bare or relative includes. Order matters when a header name is +# unique only by its containing directory. +ROOT_DIRS = ("src", "rdkit_extensions", "tests", "benchmarks", "nvmolkit") + +# File extensions that we touch. +SOURCE_EXTS = (".h", ".hpp", ".cpp", ".cu", ".cuh", ".cxx", ".cc") + +# Directory names skipped during walks. +SKIP_DIRS = {".git", "build", "_deps", "__pycache__", ".venv", "venv"} + + +class Violation: + __slots__ = ("path", "lineno", "original", "rewritten", "reason") + + def __init__( + self, + path: Path, + lineno: int, + original: str, + rewritten: str | None, + reason: str, + ) -> None: + self.path = path + self.lineno = lineno + self.original = original + self.rewritten = rewritten + self.reason = reason + + +def iter_source_files(project_root: Path) -> Iterable[Path]: + for top in SCAN_DIRS: + base = project_root / top + if not base.is_dir(): + continue + for dirpath, dirnames, filenames in os.walk(base): + dirnames[:] = [d for d in dirnames if d not in SKIP_DIRS] + for name in filenames: + if name.endswith(SOURCE_EXTS): + yield Path(dirpath) / name + + +def build_header_index(project_root: Path) -> dict[str, list[str]]: + """Map basename -> list of project-rooted paths owning that basename.""" + index: dict[str, list[str]] = {} + for src in iter_source_files(project_root): + rel = src.relative_to(project_root).as_posix() + index.setdefault(src.name, []).append(rel) + return index + + +def normalize(rel_posix: str) -> str: + return os.path.normpath(rel_posix).replace(os.sep, "/") + + +def resolve_include( + project_root: Path, + file_path: Path, + include_str: str, + header_index: dict[str, list[str]], +) -> tuple[str | None, str | None]: + """Return (rewritten_path, reason) where rewritten_path is the + project-rooted form, or (None, None) if the include is acceptable as-is + or is not a project header at all. + """ + if include_str.startswith("/"): + return None, None + + # Already project-rooted form. + candidate_root = project_root / include_str + if candidate_root.is_file(): + # Acceptable iff it sits under one of ROOT_DIRS. + first = include_str.split("/", 1)[0] + if first in ROOT_DIRS: + return None, None + + file_dir = file_path.parent + + # Upward-relative: always a violation. + if include_str.startswith("../") or "/../" in include_str: + target = (file_dir / include_str).resolve() + try: + target_rel = target.relative_to(project_root.resolve()).as_posix() + except ValueError: + return None, "include points outside project root" + if (project_root / target_rel).is_file(): + return target_rel, "upward-relative include" + return None, f"upward-relative include with no resolvable target: {include_str}" + + # Bare (no slash) or partial-path include not anchored at project root. + neighbor = (file_dir / include_str).resolve() + try: + neighbor_rel = neighbor.relative_to(project_root.resolve()).as_posix() + except ValueError: + neighbor_rel = None + + if neighbor_rel and (project_root / neighbor_rel).is_file(): + return neighbor_rel, "include resolves to project header but is not project-rooted" + + # The include did not resolve to a file via our local search. It may be + # a partial path that resolves only via another library's include dir; + # try the basename in our header index. + base = include_str.rsplit("/", 1)[-1] + matches = header_index.get(base, []) + matches = [m for m in matches if m.endswith(include_str)] + if len(matches) == 1: + return matches[0], "include resolves via library include dir; rewrite to project-rooted form" + if len(matches) > 1: + return None, ( + f"include {include_str!r} is ambiguous; could be any of: " + + ", ".join(sorted(matches)) + ) + + # Not a project header (system or third-party). + return None, None + + +_INCLUDE_QUOTE = '#include "' +_INCLUDE_ANGLE = "#include <" + + +def process_line( + line: str, + project_root: Path, + file_path: Path, + header_index: dict[str, list[str]], +) -> tuple[str, Violation | None]: + stripped = line.lstrip() + if stripped.startswith(_INCLUDE_QUOTE): + prefix = _INCLUDE_QUOTE + close_char = '"' + elif stripped.startswith(_INCLUDE_ANGLE): + prefix = _INCLUDE_ANGLE + close_char = ">" + else: + return line, None + indent = line[: len(line) - len(stripped)] + after = stripped[len(prefix):] + end = after.find(close_char) + if end < 0: + return line, None + include_str = after[:end] + trailing = after[end + 1:] + + rewritten, reason = resolve_include( + project_root, file_path, include_str, header_index + ) + if rewritten is None: + # Already-correct quoted form, system include, or third-party. + if close_char == ">" and rewritten is None and reason is None: + # Detect angle-bracket project headers that should be quoted. + base = include_str.rsplit("/", 1)[-1] + matches = header_index.get(base, []) + matches = [m for m in matches if m.endswith(include_str)] + if len(matches) == 1: + target = normalize(matches[0]) + new_line = f'{indent}#include "{target}"{trailing}' + if not new_line.endswith("\n") and line.endswith("\n"): + new_line += "\n" + violation = Violation( + file_path, + 0, + f"<{include_str}>", + target, + "angle-bracket project header; should be quoted and project-rooted", + ) + return new_line, violation + return line, None + + rewritten = normalize(rewritten) + new_line = f'{indent}#include "{rewritten}"{trailing}' + if not new_line.endswith("\n") and line.endswith("\n"): + new_line += "\n" + violation = Violation(file_path, 0, include_str, rewritten, reason or "") + return new_line, violation + + +def process_file( + file_path: Path, + project_root: Path, + header_index: dict[str, list[str]], + check_only: bool, +) -> list[Violation]: + text = file_path.read_text() + lines = text.splitlines(keepends=True) + violations: list[Violation] = [] + changed = False + for i, line in enumerate(lines, start=1): + new_line, violation = process_line( + line, project_root, file_path, header_index + ) + if violation is not None: + violation.lineno = i + violations.append(violation) + if new_line != line: + lines[i - 1] = new_line + changed = True + if changed and not check_only: + file_path.write_text("".join(lines)) + return violations + + +def main() -> int: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "-d", + "--check", + action="store_true", + help="report violations and exit non-zero; do not modify files", + ) + parser.add_argument( + "--root", + type=Path, + default=None, + help="project root (defaults to git toplevel of the script)", + ) + args = parser.parse_args() + + if args.root is not None: + project_root = args.root.resolve() + else: + script_dir = Path(__file__).resolve().parent + project_root = script_dir.parent + + header_index = build_header_index(project_root) + + all_violations: list[Violation] = [] + for src in iter_source_files(project_root): + all_violations.extend( + process_file(src, project_root, header_index, args.check) + ) + + if not all_violations: + if args.check: + print("include check: 0 violations") + else: + print("include rewrite: nothing to change") + return 0 + + fixable = [v for v in all_violations if v.rewritten is not None] + unfixable = [v for v in all_violations if v.rewritten is None] + + if args.check: + for v in all_violations: + rel = v.path.relative_to(project_root) + if v.rewritten: + print( + f'{rel}:{v.lineno}: #include "{v.original}" -> ' + f'"{v.rewritten}" ({v.reason})' + ) + else: + print(f"{rel}:{v.lineno}: {v.reason}") + print( + f"include check: {len(fixable)} fixable, " + f"{len(unfixable)} unfixable, {len(all_violations)} total" + ) + return 1 + + for v in fixable: + rel = v.path.relative_to(project_root) + print( + f'{rel}:{v.lineno}: rewrote "{v.original}" -> "{v.rewritten}"' + ) + for v in unfixable: + rel = v.path.relative_to(project_root) + print(f"{rel}:{v.lineno}: WARNING {v.reason}") + + if unfixable: + return 2 + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/admin/run_include_check.sh b/admin/run_include_check.sh new file mode 100755 index 00000000..63dcf4d1 --- /dev/null +++ b/admin/run_include_check.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +# Enforce project-rooted #include "..." paths across the C++/CUDA tree. +# By default rewrites in place. Use -d for check-only mode (CI/PR gating). + +set -e + +CHECK="" +while getopts ":d" opt; do + case ${opt} in + d ) + CHECK="--check" + ;; + \? ) + echo "Usage: run_include_check.sh [-d]" + exit 1 + ;; + esac +done + +ROOT=$(dirname "$(dirname "$(realpath "$0")")") + +python3 "$ROOT/admin/include_check.py" --root "$ROOT" $CHECK diff --git a/benchmarks/benchmark_utils.cpp b/benchmarks/benchmark_utils.cpp index 79acba76..43c050fc 100644 --- a/benchmarks/benchmark_utils.cpp +++ b/benchmarks/benchmark_utils.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "benchmark_utils.h" +#include "benchmarks/benchmark_utils.h" #include #include @@ -29,7 +29,7 @@ #include #include -#include "../tests/test_utils.h" +#include "tests/test_utils.h" namespace BenchUtils { diff --git a/benchmarks/bit_vector.cpp b/benchmarks/bit_vector.cpp index 3f94893a..658cf120 100644 --- a/benchmarks/bit_vector.cpp +++ b/benchmarks/bit_vector.cpp @@ -19,7 +19,7 @@ #include #include -#include "flat_bit_vect.h" +#include "src/data_structures/flat_bit_vect.h" constexpr std::array kNBits = {1, 10, 100, 1000, 10000}; constexpr std::array kNumBitsInVector = {1, 10, 100, 1000, 10000}; diff --git a/benchmarks/eigen_solver_bench.cu b/benchmarks/eigen_solver_bench.cu index 95e2bdde..d12edd60 100644 --- a/benchmarks/eigen_solver_bench.cu +++ b/benchmarks/eigen_solver_bench.cu @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include -#include +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" #include #include #include -#include +#include "src/symmetric_eigensolver.h" #include #include diff --git a/benchmarks/etkdg_embed_bench.cpp b/benchmarks/etkdg_embed_bench.cpp index 66e7fc91..409f0ee1 100644 --- a/benchmarks/etkdg_embed_bench.cpp +++ b/benchmarks/etkdg_embed_bench.cpp @@ -32,12 +32,12 @@ #include #include -#include "../tests/test_utils.h" -#include "conformer_checkers.h" -#include "embedder_utils.h" -#include "etkdg.h" -#include "minimizer/bfgs_minimize.h" -#include "testutils/conformer_checkers.h" +#include "tests/test_utils.h" +#include "src/testutils/conformer_checkers.h" +#include "src/embedder_utils.h" +#include "src/etkdg.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/testutils/conformer_checkers.h" constexpr int maxAtoms = 256; diff --git a/benchmarks/etkdg_ff_bench.cpp b/benchmarks/etkdg_ff_bench.cpp index 84949d2f..d7489fff 100644 --- a/benchmarks/etkdg_ff_bench.cpp +++ b/benchmarks/etkdg_ff_bench.cpp @@ -23,10 +23,10 @@ #include #include -#include "../tests/test_utils.h" -#include "cuda_error_check.h" -#include "dist_geom_flattened_builder.h" -#include "embedder_utils.h" +#include "tests/test_utils.h" +#include "src/utils/cuda_error_check.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/embedder_utils.h" using nvMolKit::AsyncDeviceVector; using namespace nvMolKit::DistGeom; diff --git a/benchmarks/mmff_multimol_bench.cpp b/benchmarks/mmff_multimol_bench.cpp index 1235e606..67293226 100644 --- a/benchmarks/mmff_multimol_bench.cpp +++ b/benchmarks/mmff_multimol_bench.cpp @@ -27,9 +27,9 @@ #include #include -#include "../tests/test_utils.h" -#include "benchmark_utils.h" -#include "bfgs_mmff.h" +#include "tests/test_utils.h" +#include "benchmarks/benchmark_utils.h" +#include "src/minimizer/bfgs_mmff.h" namespace { diff --git a/benchmarks/mmff_optimize_bench.cpp b/benchmarks/mmff_optimize_bench.cpp index b417e470..ba7b2339 100644 --- a/benchmarks/mmff_optimize_bench.cpp +++ b/benchmarks/mmff_optimize_bench.cpp @@ -24,8 +24,8 @@ #include #include -#include "../tests/test_utils.h" -#include "bfgs_mmff.h" +#include "tests/test_utils.h" +#include "src/minimizer/bfgs_mmff.h" void perturbConformer(RDKit::Conformer& conf, const float delta = 0.1, const int seed = 0) { std::mt19937 gen(seed); // Mersenne Twister engine diff --git a/benchmarks/morgan_fp.cpp b/benchmarks/morgan_fp.cpp index 7d9f0e18..9a372dad 100644 --- a/benchmarks/morgan_fp.cpp +++ b/benchmarks/morgan_fp.cpp @@ -27,7 +27,7 @@ #include #include -#include "morgan_fingerprint.h" +#include "src/morgan_fingerprint.h" using namespace RDKit; diff --git a/benchmarks/updateInverseHessianBench.cu b/benchmarks/updateInverseHessianBench.cu index faed0372..d159d4be 100644 --- a/benchmarks/updateInverseHessianBench.cu +++ b/benchmarks/updateInverseHessianBench.cu @@ -27,9 +27,9 @@ #include #include -#include "../src/minimizer/bfgs_hessian.h" -#include "cuda_error_check.h" -#include "device_vector.h" +#include "src/minimizer/bfgs_hessian.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" using nvMolKit::checkReturnCode; diff --git a/nvmolkit/CMakeLists.txt b/nvmolkit/CMakeLists.txt index 401d7c03..aeb7c64f 100644 --- a/nvmolkit/CMakeLists.txt +++ b/nvmolkit/CMakeLists.txt @@ -15,7 +15,6 @@ set(CMAKE_SHARED_MODULE_PREFIX "") -# Set up the libraries and header search paths for this target add_library(_DataStructs MODULE DataStructs.cpp) target_link_libraries( _DataStructs PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ${RDKit_LIBS} @@ -37,10 +36,9 @@ installpythontarget(_Fingerprints ./) add_library(_arrayHelpers MODULE array_helpers.cpp) target_link_libraries(_arrayHelpers PUBLIC ${Boost_LIBRARIES} device_vector) -target_include_directories( - _arrayHelpers PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils ${Python_INCLUDE_DIRS}) -target_include_directories(_arrayHelpers SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) target_link_libraries(_arrayHelpers PRIVATE ${RDKit_LIBS}) +target_include_directories(_arrayHelpers PUBLIC ${Python_INCLUDE_DIRS}) +target_include_directories(_arrayHelpers SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) installpythontarget(_arrayHelpers ./) add_library(_mmffOptimization MODULE mmffOptimization.cpp) @@ -48,9 +46,7 @@ target_link_libraries(_mmffOptimization PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) target_link_libraries(_mmffOptimization PRIVATE ${RDKit_LIBS} bfgs_mmff ff_utils) -target_include_directories( - _mmffOptimization PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils - ${Python_INCLUDE_DIRS}) +target_include_directories(_mmffOptimization PUBLIC ${Python_INCLUDE_DIRS}) target_include_directories(_mmffOptimization SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) installpythontarget(_mmffOptimization ./) @@ -59,9 +55,7 @@ add_library(_uffOptimization MODULE uffOptimization.cpp) target_link_libraries(_uffOptimization PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) target_link_libraries(_uffOptimization PRIVATE ${RDKit_LIBS} bfgs_uff ff_utils) -target_include_directories( - _uffOptimization PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils - ${Python_INCLUDE_DIRS}) +target_include_directories(_uffOptimization PUBLIC ${Python_INCLUDE_DIRS}) target_include_directories(_uffOptimization SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) installpythontarget(_uffOptimization ./) @@ -80,9 +74,7 @@ target_link_libraries( rdkit_uff_flattened device_vector ff_utils) -target_include_directories( - _batchedForcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils - ${Python_INCLUDE_DIRS}) +target_include_directories(_batchedForcefield PUBLIC ${Python_INCLUDE_DIRS}) target_include_directories(_batchedForcefield SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) installpythontarget(_batchedForcefield ./) @@ -91,46 +83,39 @@ add_library(_embedMolecules MODULE embedMolecules.cpp) target_link_libraries(_embedMolecules PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} device_vector) target_link_libraries(_embedMolecules PRIVATE ${RDKit_LIBS} dist_geom etkdg) -target_include_directories( - _embedMolecules PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils - ${Python_INCLUDE_DIRS}) +target_include_directories(_embedMolecules PUBLIC ${Python_INCLUDE_DIRS}) target_include_directories(_embedMolecules SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) installpythontarget(_embedMolecules ./) add_library(_clustering MODULE clustering.cpp) -target_include_directories( - _clustering PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils ${Boost_INCLUDE_DIRS} - ${Python_INCLUDE_DIRS}) target_link_libraries(_clustering PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} device_vector butina device) +target_include_directories(_clustering PUBLIC ${Boost_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS}) installpythontarget(_clustering ./) add_library(_conformerRmsd MODULE conformerRmsd.cpp) -target_include_directories( - _conformerRmsd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils ${Boost_INCLUDE_DIRS} - ${Python_INCLUDE_DIRS}) target_link_libraries( _conformerRmsd PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} device_vector conformer_rmsd_mol device) target_link_libraries(_conformerRmsd PRIVATE ${RDKit_LIBS}) +target_include_directories(_conformerRmsd PUBLIC ${Boost_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS}) installpythontarget(_conformerRmsd ./) add_library(_substructure MODULE substructure.cpp) -target_include_directories( - _substructure - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils ${Boost_INCLUDE_DIRS} - ${Python_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/substruct) target_link_libraries(_substructure PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES}) target_link_libraries(_substructure PRIVATE ${RDKit_LIBS} substructure_search pinned_host_allocator) +target_include_directories(_substructure PUBLIC ${Boost_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS}) installpythontarget(_substructure ./) add_library(_TFD MODULE tfd.cpp) -target_include_directories( - _TFD PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/utils ${Boost_INCLUDE_DIRS} - ${Python_INCLUDE_DIRS}) target_link_libraries(_TFD PUBLIC ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} device_vector) target_link_libraries(_TFD PRIVATE ${RDKit_LIBS} tfd_gpu CUDA::cudart) +target_include_directories(_TFD PUBLIC ${Boost_INCLUDE_DIRS} + ${Python_INCLUDE_DIRS}) installpythontarget(_TFD ./) diff --git a/nvmolkit/DataStructs.cpp b/nvmolkit/DataStructs.cpp index 6f66b8af..b95ebd69 100644 --- a/nvmolkit/DataStructs.cpp +++ b/nvmolkit/DataStructs.cpp @@ -20,9 +20,9 @@ #include #include -#include "array_helpers.h" -#include "device.h" -#include "similarity.h" +#include "nvmolkit/array_helpers.h" +#include "src/utils/device.h" +#include "src/similarity.h" namespace { diff --git a/nvmolkit/array_helpers.cpp b/nvmolkit/array_helpers.cpp index 164473d2..b6b96fcc 100644 --- a/nvmolkit/array_helpers.cpp +++ b/nvmolkit/array_helpers.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "array_helpers.h" +#include "nvmolkit/array_helpers.h" namespace { using namespace boost::python; diff --git a/nvmolkit/array_helpers.h b/nvmolkit/array_helpers.h index 37434902..9e82ef61 100644 --- a/nvmolkit/array_helpers.h +++ b/nvmolkit/array_helpers.h @@ -19,7 +19,7 @@ #include #include -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { diff --git a/nvmolkit/batchedForcefield.cpp b/nvmolkit/batchedForcefield.cpp index 7a196de5..b9864137 100644 --- a/nvmolkit/batchedForcefield.cpp +++ b/nvmolkit/batchedForcefield.cpp @@ -20,19 +20,19 @@ #include #include -#include "bfgs_mmff.h" -#include "bfgs_uff.h" -#include "boost_python_utils.h" -#include "device_vector.h" -#include "ff_utils.h" -#include "forcefield_constraints.h" -#include "hardware_options.h" -#include "mmff_batched_forcefield.h" -#include "mmff_flattened_builder.h" -#include "mmff_properties.h" -#include "mmff_python_utils.h" -#include "uff_batched_forcefield.h" -#include "uff_flattened_builder.h" +#include "src/minimizer/bfgs_mmff.h" +#include "src/minimizer/bfgs_uff.h" +#include "nvmolkit/boost_python_utils.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/forcefield_constraints.h" +#include "src/hardware_options.h" +#include "src/forcefields/mmff_batched_forcefield.h" +#include "rdkit_extensions/mmff_flattened_builder.h" +#include "src/forcefields/mmff_properties.h" +#include "nvmolkit/mmff_python_utils.h" +#include "src/forcefields/uff_batched_forcefield.h" +#include "rdkit_extensions/uff_flattened_builder.h" namespace bp = boost::python; diff --git a/nvmolkit/clustering.cpp b/nvmolkit/clustering.cpp index 190813fd..df9128ee 100644 --- a/nvmolkit/clustering.cpp +++ b/nvmolkit/clustering.cpp @@ -17,9 +17,9 @@ #include #include -#include "array_helpers.h" -#include "butina.h" -#include "device.h" +#include "nvmolkit/array_helpers.h" +#include "src/butina.h" +#include "src/utils/device.h" namespace { diff --git a/nvmolkit/conformerRmsd.cpp b/nvmolkit/conformerRmsd.cpp index 4df8a67b..836bae33 100644 --- a/nvmolkit/conformerRmsd.cpp +++ b/nvmolkit/conformerRmsd.cpp @@ -21,9 +21,9 @@ #include #include -#include "array_helpers.h" -#include "conformer_rmsd_mol.h" -#include "device.h" +#include "nvmolkit/array_helpers.h" +#include "src/conformer_rmsd_mol.h" +#include "src/utils/device.h" namespace { diff --git a/nvmolkit/embedMolecules.cpp b/nvmolkit/embedMolecules.cpp index 5c4c6cd5..315485c1 100644 --- a/nvmolkit/embedMolecules.cpp +++ b/nvmolkit/embedMolecules.cpp @@ -18,8 +18,8 @@ #include #include -#include "boost_python_utils.h" -#include "etkdg.h" +#include "nvmolkit/boost_python_utils.h" +#include "src/etkdg.h" static boost::python::list getGpuIdsPy(nvMolKit::BatchHardwareOptions& opts) { return nvMolKit::vectorToList(opts.gpuIds); diff --git a/nvmolkit/fingerprints.cpp b/nvmolkit/fingerprints.cpp index 5b59c3da..972cc8d8 100644 --- a/nvmolkit/fingerprints.cpp +++ b/nvmolkit/fingerprints.cpp @@ -18,9 +18,9 @@ #include -#include "array_helpers.h" -#include "device.h" -#include "morgan_fingerprint.h" +#include "nvmolkit/array_helpers.h" +#include "src/utils/device.h" +#include "src/morgan_fingerprint.h" namespace { diff --git a/nvmolkit/mmffOptimization.cpp b/nvmolkit/mmffOptimization.cpp index 69a28069..d1be5b00 100644 --- a/nvmolkit/mmffOptimization.cpp +++ b/nvmolkit/mmffOptimization.cpp @@ -15,9 +15,9 @@ #include -#include "bfgs_mmff.h" -#include "boost_python_utils.h" -#include "mmff_python_utils.h" +#include "src/minimizer/bfgs_mmff.h" +#include "nvmolkit/boost_python_utils.h" +#include "nvmolkit/mmff_python_utils.h" BOOST_PYTHON_MODULE(_mmffOptimization) { boost::python::def( diff --git a/nvmolkit/mmff_python_utils.h b/nvmolkit/mmff_python_utils.h index dd49b54b..1891f22d 100644 --- a/nvmolkit/mmff_python_utils.h +++ b/nvmolkit/mmff_python_utils.h @@ -23,7 +23,7 @@ #include #include -#include "mmff_properties.h" +#include "src/forcefields/mmff_properties.h" namespace ForceFields { diff --git a/nvmolkit/substructure.cpp b/nvmolkit/substructure.cpp index d698aea3..131532e7 100644 --- a/nvmolkit/substructure.cpp +++ b/nvmolkit/substructure.cpp @@ -22,9 +22,9 @@ #include #include -#include "boost_python_utils.h" -#include "nvtx.h" -#include "substruct_types.h" +#include "nvmolkit/boost_python_utils.h" +#include "src/utils/nvtx.h" +#include "src/substruct/substruct_types.h" // Forward declarations - avoid including CUDA headers using cudaStream_t = struct CUstream_st*; diff --git a/nvmolkit/tfd.cpp b/nvmolkit/tfd.cpp index 7279851a..fe43478b 100644 --- a/nvmolkit/tfd.cpp +++ b/nvmolkit/tfd.cpp @@ -18,10 +18,10 @@ #include #include -#include "array_helpers.h" -#include "boost_python_utils.h" -#include "nvtx.h" -#include "tfd_gpu.h" +#include "nvmolkit/array_helpers.h" +#include "nvmolkit/boost_python_utils.h" +#include "src/utils/nvtx.h" +#include "src/tfd/tfd_gpu.h" namespace { diff --git a/nvmolkit/uffOptimization.cpp b/nvmolkit/uffOptimization.cpp index 3e83684e..c276eaf8 100644 --- a/nvmolkit/uffOptimization.cpp +++ b/nvmolkit/uffOptimization.cpp @@ -15,8 +15,8 @@ #include -#include "bfgs_uff.h" -#include "boost_python_utils.h" +#include "src/minimizer/bfgs_uff.h" +#include "nvmolkit/boost_python_utils.h" namespace bp = boost::python; diff --git a/rdkit_extensions/CMakeLists.txt b/rdkit_extensions/CMakeLists.txt index 2091d410..ab0fcd6b 100644 --- a/rdkit_extensions/CMakeLists.txt +++ b/rdkit_extensions/CMakeLists.txt @@ -18,50 +18,37 @@ target_link_libraries( rdkit_mmff_flattened PRIVATE ${RDKit_LIBS} device_vector PUBLIC mmff) -target_include_directories(rdkit_mmff_flattened - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(rdkit_uff_flattened uff_flattened_builder.cpp) target_link_libraries( rdkit_uff_flattened PRIVATE ${RDKit_LIBS} device_vector PUBLIC uff) -target_include_directories(rdkit_uff_flattened - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(mmff_contribs mmff_contribs.cpp) target_link_libraries( mmff_contribs PRIVATE ${RDKit_LIBS} CUDA::cudart device_vector ff_utils PUBLIC mmff) -target_include_directories(mmff_contribs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(mmff_builder mmff_builder.cpp) target_link_libraries( mmff_builder PRIVATE ${RDKit_LIBS} CUDA::cudart device_vector ff_utils PUBLIC mmff) -target_include_directories(mmff_builder PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(mmff_optimize INTERFACE) target_link_libraries(mmff_optimize INTERFACE ${RDKit_LIBS} CUDA::cudart rdkit_mmff_flattened) -target_include_directories(mmff_optimize INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(rdkit_dist_geom_flattened dist_geom_flattened_builder.cpp) target_link_libraries( rdkit_dist_geom_flattened PRIVATE ${RDKit_LIBS} device_vector PUBLIC dist_geom) -target_include_directories(rdkit_dist_geom_flattened - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(rdkit_bounds_matrix bounds_matrix.cpp) target_link_libraries(rdkit_bounds_matrix PRIVATE ${RDKit_LIBS}) -target_include_directories(rdkit_bounds_matrix - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(conformer_pruning conformer_pruning.cpp) target_link_libraries(conformer_pruning PRIVATE ${RDKit_LIBS}) -target_include_directories(conformer_pruning - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) \ No newline at end of file diff --git a/rdkit_extensions/bounds_matrix.cpp b/rdkit_extensions/bounds_matrix.cpp index 7df4eac9..aae5dbaa 100644 --- a/rdkit_extensions/bounds_matrix.cpp +++ b/rdkit_extensions/bounds_matrix.cpp @@ -1,4 +1,4 @@ -#include "bounds_matrix.h" +#include "rdkit_extensions/bounds_matrix.h" #include #include diff --git a/rdkit_extensions/conformer_pruning.cpp b/rdkit_extensions/conformer_pruning.cpp index 1973ee00..ab693698 100644 --- a/rdkit_extensions/conformer_pruning.cpp +++ b/rdkit_extensions/conformer_pruning.cpp @@ -1,4 +1,4 @@ -#include "conformer_pruning.h" +#include "rdkit_extensions/conformer_pruning.h" #include #include diff --git a/rdkit_extensions/dist_geom_flattened_builder.cpp b/rdkit_extensions/dist_geom_flattened_builder.cpp index d651451f..1225ff5e 100644 --- a/rdkit_extensions/dist_geom_flattened_builder.cpp +++ b/rdkit_extensions/dist_geom_flattened_builder.cpp @@ -1,4 +1,4 @@ -#include "dist_geom_flattened_builder.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" #include #include diff --git a/rdkit_extensions/dist_geom_flattened_builder.h b/rdkit_extensions/dist_geom_flattened_builder.h index 59894a61..e4541cab 100644 --- a/rdkit_extensions/dist_geom_flattened_builder.h +++ b/rdkit_extensions/dist_geom_flattened_builder.h @@ -7,7 +7,7 @@ #include -#include "dist_geom.h" +#include "src/forcefields/dist_geom.h" namespace nvMolKit { namespace DistGeom { diff --git a/rdkit_extensions/mmff_builder.cpp b/rdkit_extensions/mmff_builder.cpp index d1a93cd3..98f615ef 100644 --- a/rdkit_extensions/mmff_builder.cpp +++ b/rdkit_extensions/mmff_builder.cpp @@ -1,12 +1,12 @@ -#include "mmff_builder.h" +#include "rdkit_extensions/mmff_builder.h" #include #include #include -#include "ff_utils.h" -#include "mmff_contribs.h" -#include "mmff_flattened_builder.h" +#include "src/forcefields/ff_utils.h" +#include "rdkit_extensions/mmff_contribs.h" +#include "rdkit_extensions/mmff_flattened_builder.h" namespace nvMolKit { namespace MMFF { diff --git a/rdkit_extensions/mmff_contribs.cpp b/rdkit_extensions/mmff_contribs.cpp index 66491263..fd8e361a 100644 --- a/rdkit_extensions/mmff_contribs.cpp +++ b/rdkit_extensions/mmff_contribs.cpp @@ -1,4 +1,4 @@ -#include "mmff_contribs.h" +#include "rdkit_extensions/mmff_contribs.h" #include #include @@ -6,9 +6,9 @@ #include -#include "ff_utils.h" -#include "mmff.h" -#include "mmff_flattened_builder.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/mmff.h" +#include "rdkit_extensions/mmff_flattened_builder.h" namespace nvMolKit { namespace MMFF { diff --git a/rdkit_extensions/mmff_contribs.h b/rdkit_extensions/mmff_contribs.h index f826404d..fa57005c 100644 --- a/rdkit_extensions/mmff_contribs.h +++ b/rdkit_extensions/mmff_contribs.h @@ -6,7 +6,7 @@ #include #include -#include "../src/forcefields/mmff.h" +#include "src/forcefields/mmff.h" namespace nvMolKit { namespace MMFF { diff --git a/rdkit_extensions/mmff_flattened_builder.cpp b/rdkit_extensions/mmff_flattened_builder.cpp index a61cd6e1..93f59c86 100644 --- a/rdkit_extensions/mmff_flattened_builder.cpp +++ b/rdkit_extensions/mmff_flattened_builder.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mmff_flattened_builder.h" +#include "rdkit_extensions/mmff_flattened_builder.h" #include #include diff --git a/rdkit_extensions/mmff_flattened_builder.h b/rdkit_extensions/mmff_flattened_builder.h index fda978f8..8dbdf56c 100644 --- a/rdkit_extensions/mmff_flattened_builder.h +++ b/rdkit_extensions/mmff_flattened_builder.h @@ -18,8 +18,8 @@ #include -#include "mmff.h" -#include "mmff_properties.h" +#include "src/forcefields/mmff.h" +#include "src/forcefields/mmff_properties.h" namespace RDKit { class ROMol; diff --git a/rdkit_extensions/mmff_optimize.h b/rdkit_extensions/mmff_optimize.h index 95da06fb..810f4e26 100644 --- a/rdkit_extensions/mmff_optimize.h +++ b/rdkit_extensions/mmff_optimize.h @@ -5,7 +5,7 @@ #include #include -#include "mmff_builder.h" +#include "rdkit_extensions/mmff_builder.h" namespace nvMolKit { namespace MMFF { diff --git a/rdkit_extensions/uff_flattened_builder.cpp b/rdkit_extensions/uff_flattened_builder.cpp index eaa954fa..14051af4 100644 --- a/rdkit_extensions/uff_flattened_builder.cpp +++ b/rdkit_extensions/uff_flattened_builder.cpp @@ -1,4 +1,4 @@ -#include "uff_flattened_builder.h" +#include "rdkit_extensions/uff_flattened_builder.h" #include #include diff --git a/rdkit_extensions/uff_flattened_builder.h b/rdkit_extensions/uff_flattened_builder.h index 94add1fd..593b2c26 100644 --- a/rdkit_extensions/uff_flattened_builder.h +++ b/rdkit_extensions/uff_flattened_builder.h @@ -1,7 +1,7 @@ #ifndef NVMOLKIT_UFF_FLATTENED_BUILDER_H #define NVMOLKIT_UFF_FLATTENED_BUILDER_H -#include "uff.h" +#include "src/forcefields/uff.h" namespace RDKit { class ROMol; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 743821ec..727c8844 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -26,13 +26,10 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/versions.h.in add_library(similarity_kernels similarity_kernels.cu) target_link_libraries(similarity_kernels PRIVATE cuda_error_check device cccl_interface) - -target_include_directories(similarity_kernels - PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(similarity_kernels SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) -add_library(Similarity similarity.cpp) +add_library(Similarity similarity.cpp) target_link_libraries( Similarity PUBLIC CUDA::cudart device_vector @@ -43,15 +40,13 @@ target_link_libraries( openmp_helpers OpenMP::OpenMP_CXX cccl_interface) -target_include_directories(Similarity PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(Similarity SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) + add_library(morganFingerprintKernels morgan_fingerprint_kernels.cu) target_link_libraries( morganFingerprintKernels PRIVATE cuda_error_check flatBitVect ${RDKit_LIBS} cccl_interface PUBLIC device_vector flatBitVect cuda_error_check) -target_include_directories(morganFingerprintKernels - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(morganFingerprintKernels SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) @@ -62,23 +57,18 @@ target_link_libraries( morganFingerprint PRIVATE ${RDKit_LIBS} OpenMP::OpenMP_CXX device openmp_helpers PUBLIC morganFingerprintKernels) -target_include_directories(morganFingerprint PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(symmetricEigenSolver symmetric_eigensolver.cu) target_link_libraries( symmetricEigenSolver PRIVATE CUDA::cudart CUDA::cusolver CUDA::cublas cuda_error_check device) -target_include_directories(symmetricEigenSolver - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(triangle_smooth triangle_smooth.cu) target_link_libraries(triangle_smooth PRIVATE ${RDKit_LIBS} device_vector) -target_include_directories(triangle_smooth PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(embedder_utils embedder_utils.cpp) target_link_libraries(embedder_utils PRIVATE ${RDKit_LIBS} device_vector triangle_smooth) -target_include_directories(embedder_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(embedder_utils PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) add_library(etkdg_impl etkdg_impl.cpp etkdg_kernels.cu) @@ -86,14 +76,12 @@ target_link_libraries( etkdg_impl PRIVATE embedder_utils rdkit_dist_geom_flattened OpenMP::OpenMP_CXX PUBLIC dist_geom ${RDKit_LIBS} device_vector) -target_include_directories(etkdg_impl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library( etkdg_stages etkdg_stage_coordgen.cu etkdg_stage_distgeom_minimize.cu etkdg_stage_update_conformers.cu etkdg_stage_stereochem_checks.cu etkdg_stage_etk_minimization.cu) - target_link_libraries( etkdg_stages PUBLIC bfgs @@ -105,7 +93,6 @@ target_link_libraries( dist_geom rdkit_dist_geom_flattened etkdg) -target_include_directories(etkdg_stages PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(etkdg etkdg.cpp) target_link_libraries( @@ -121,28 +108,23 @@ target_link_libraries( etkdg_stages openmp_helpers OpenMP::OpenMP_CXX) -target_include_directories(etkdg PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(butina butina.cu) target_link_libraries( butina PUBLIC device_vector PRIVATE cub_helpers nvtx) -target_include_directories(butina PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(conformer_rmsd conformer_rmsd.cu) target_link_libraries( conformer_rmsd PUBLIC device_vector PRIVATE cuda_error_check) -target_include_directories(conformer_rmsd PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(conformer_rmsd_mol conformer_rmsd_mol.cpp) target_link_libraries( conformer_rmsd_mol PUBLIC device_vector conformer_rmsd PRIVATE ${RDKit_LIBS}) -target_include_directories(conformer_rmsd_mol - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(tfd) diff --git a/src/butina.cu b/src/butina.cu index 7100bb8b..e14efe0e 100644 --- a/src/butina.cu +++ b/src/butina.cu @@ -17,10 +17,10 @@ #include -#include "butina.h" -#include "cub_helpers.cuh" -#include "host_vector.h" -#include "nvtx.h" +#include "src/butina.h" +#include "src/utils/cub_helpers.cuh" +#include "src/utils/host_vector.h" +#include "src/utils/nvtx.h" /** * TODO: Future optimizations diff --git a/src/butina.h b/src/butina.h index 61560b9c..5657ef05 100644 --- a/src/butina.h +++ b/src/butina.h @@ -16,7 +16,7 @@ #ifndef NVMOLKIT_BUTINA_H #define NVMOLKIT_BUTINA_H -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { diff --git a/src/conformer_rmsd.cu b/src/conformer_rmsd.cu index bb104455..1f203dad 100644 --- a/src/conformer_rmsd.cu +++ b/src/conformer_rmsd.cu @@ -18,8 +18,8 @@ #include #include -#include "conformer_rmsd.h" -#include "cuda_error_check.h" +#include "src/conformer_rmsd.h" +#include "src/utils/cuda_error_check.h" namespace nvMolKit { diff --git a/src/conformer_rmsd.h b/src/conformer_rmsd.h index f6b70e1f..3d0b6099 100644 --- a/src/conformer_rmsd.h +++ b/src/conformer_rmsd.h @@ -16,7 +16,7 @@ #ifndef NVMOLKIT_CONFORMER_RMSD_H #define NVMOLKIT_CONFORMER_RMSD_H -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { diff --git a/src/conformer_rmsd_mol.cpp b/src/conformer_rmsd_mol.cpp index 7ecc167e..8e0e4cc7 100644 --- a/src/conformer_rmsd_mol.cpp +++ b/src/conformer_rmsd_mol.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "conformer_rmsd_mol.h" +#include "src/conformer_rmsd_mol.h" #include @@ -22,7 +22,7 @@ #include #include -#include "utils/host_vector.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/src/conformer_rmsd_mol.h b/src/conformer_rmsd_mol.h index f4225bd6..1ecd41e1 100644 --- a/src/conformer_rmsd_mol.h +++ b/src/conformer_rmsd_mol.h @@ -20,7 +20,7 @@ #include -#include "conformer_rmsd.h" +#include "src/conformer_rmsd.h" namespace nvMolKit { diff --git a/src/data_structures/CMakeLists.txt b/src/data_structures/CMakeLists.txt index 29bee33c..bbfadbb8 100644 --- a/src/data_structures/CMakeLists.txt +++ b/src/data_structures/CMakeLists.txt @@ -14,4 +14,3 @@ # the License. add_library(flatBitVect INTERFACE) -target_include_directories(flatBitVect INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/embedder_utils.cpp b/src/embedder_utils.cpp index 726e986a..80235988 100644 --- a/src/embedder_utils.cpp +++ b/src/embedder_utils.cpp @@ -19,7 +19,7 @@ * 2. Initializing and configuring the ETKDG pipeline * 3. Managing force field parameters and variables for the embedding process */ -#include "embedder_utils.h" +#include "src/embedder_utils.h" #include #include diff --git a/src/etkdg.cpp b/src/etkdg.cpp index f1f0cb6b..0ca7fad9 100644 --- a/src/etkdg.cpp +++ b/src/etkdg.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "etkdg.h" +#include "src/etkdg.h" #include @@ -21,16 +21,16 @@ #include #include -#include "conformer_pruning.h" -#include "device.h" -#include "etkdg_stage_coordgen.h" -#include "etkdg_stage_distgeom_minimize.h" -#include "etkdg_stage_etk_minimization.h" -#include "etkdg_stage_stereochem_checks.h" -#include "etkdg_stage_update_conformers.h" -#include "host_vector.h" -#include "nvtx.h" -#include "openmp_helpers.h" +#include "rdkit_extensions/conformer_pruning.h" +#include "src/utils/device.h" +#include "src/etkdg_stage_coordgen.h" +#include "src/etkdg_stage_distgeom_minimize.h" +#include "src/etkdg_stage_etk_minimization.h" +#include "src/etkdg_stage_stereochem_checks.h" +#include "src/etkdg_stage_update_conformers.h" +#include "src/utils/host_vector.h" +#include "src/utils/nvtx.h" +#include "src/utils/openmp_helpers.h" namespace nvMolKit { namespace { diff --git a/src/etkdg.h b/src/etkdg.h index 74b830cd..b5879246 100644 --- a/src/etkdg.h +++ b/src/etkdg.h @@ -18,9 +18,9 @@ #include -#include "bfgs_minimize.h" -#include "etkdg_impl.h" -#include "hardware_options.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/etkdg_impl.h" +#include "src/hardware_options.h" namespace RDKit { class ROMol; diff --git a/src/etkdg_impl.cpp b/src/etkdg_impl.cpp index 429f414d..1e5a66ed 100644 --- a/src/etkdg_impl.cpp +++ b/src/etkdg_impl.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "etkdg_impl.h" +#include "src/etkdg_impl.h" #include #include @@ -24,10 +24,10 @@ #include #include -#include "device_vector.h" -#include "dist_geom_flattened_builder.h" -#include "nvtx.h" -#include "triangle_smooth.h" +#include "src/utils/device_vector.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/utils/nvtx.h" +#include "src/triangle_smooth.h" namespace nvMolKit { diff --git a/src/etkdg_impl.h b/src/etkdg_impl.h index c49080a0..84fed1c4 100644 --- a/src/etkdg_impl.h +++ b/src/etkdg_impl.h @@ -29,10 +29,10 @@ #include #include -#include "device_vector.h" -#include "dist_geom.h" -#include "embedder_utils.h" -#include "host_vector.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/dist_geom.h" +#include "src/embedder_utils.h" +#include "src/utils/host_vector.h" // forward declarations diff --git a/src/etkdg_kernels.cu b/src/etkdg_kernels.cu index 1e6ac75b..cd651b51 100644 --- a/src/etkdg_kernels.cu +++ b/src/etkdg_kernels.cu @@ -15,7 +15,7 @@ #include -#include "etkdg_impl.h" +#include "src/etkdg_impl.h" __global__ void collectAndFilterFailuresKernel(const int numTerms, const uint8_t* stageFailed, diff --git a/src/etkdg_stage_coordgen.cu b/src/etkdg_stage_coordgen.cu index 23f77a9c..9ca1a67e 100644 --- a/src/etkdg_stage_coordgen.cu +++ b/src/etkdg_stage_coordgen.cu @@ -17,7 +17,7 @@ #include #include -#include "etkdg_stage_coordgen.h" +#include "src/etkdg_stage_coordgen.h" namespace nvMolKit { diff --git a/src/etkdg_stage_coordgen.h b/src/etkdg_stage_coordgen.h index 1d27dee5..59cc9fc8 100644 --- a/src/etkdg_stage_coordgen.h +++ b/src/etkdg_stage_coordgen.h @@ -19,9 +19,9 @@ #include #include -#include "coord_gen.h" -#include "etkdg_impl.h" -#include "host_vector.h" +#include "src/forcefields/coord_gen.h" +#include "src/etkdg_impl.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/src/etkdg_stage_distgeom_minimize.cu b/src/etkdg_stage_distgeom_minimize.cu index 24f604da..191db300 100644 --- a/src/etkdg_stage_distgeom_minimize.cu +++ b/src/etkdg_stage_distgeom_minimize.cu @@ -17,13 +17,13 @@ #include -#include "dg_batched_forcefield.h" -#include "dist_geom.h" -#include "dist_geom_flattened_builder.h" -#include "etkdg_impl.h" -#include "etkdg_stage_distgeom_minimize.h" -#include "forcefields/kernel_utils.cuh" -#include "nvtx.h" +#include "src/forcefields/dg_batched_forcefield.h" +#include "src/forcefields/dist_geom.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_distgeom_minimize.h" +#include "src/forcefields/kernel_utils.cuh" +#include "src/utils/nvtx.h" using ::nvMolKit::detail::ETKDGContext; using ::nvMolKit::detail::ETKDGStage; diff --git a/src/etkdg_stage_distgeom_minimize.h b/src/etkdg_stage_distgeom_minimize.h index 9d35fb4b..d9ee912b 100644 --- a/src/etkdg_stage_distgeom_minimize.h +++ b/src/etkdg_stage_distgeom_minimize.h @@ -20,9 +20,9 @@ #include -#include "bfgs_minimize.h" -#include "dist_geom.h" -#include "etkdg_impl.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/forcefields/dist_geom.h" +#include "src/etkdg_impl.h" using ::nvMolKit::detail::EmbedArgs; using ::nvMolKit::detail::ETKDGContext; diff --git a/src/etkdg_stage_etk_minimization.cu b/src/etkdg_stage_etk_minimization.cu index 6a677be2..253be2b1 100644 --- a/src/etkdg_stage_etk_minimization.cu +++ b/src/etkdg_stage_etk_minimization.cu @@ -16,10 +16,10 @@ #include #include -#include "dist_geom_flattened_builder.h" -#include "etk_batched_forcefield.h" -#include "etkdg_stage_etk_minimization.h" -#include "minimizer/bfgs_minimize.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/forcefields/etk_batched_forcefield.h" +#include "src/etkdg_stage_etk_minimization.h" +#include "src/minimizer/bfgs_minimize.h" namespace nvMolKit { namespace detail { diff --git a/src/etkdg_stage_etk_minimization.h b/src/etkdg_stage_etk_minimization.h index 1f5a379b..2c29e0c3 100644 --- a/src/etkdg_stage_etk_minimization.h +++ b/src/etkdg_stage_etk_minimization.h @@ -18,9 +18,9 @@ #include -#include "dist_geom.h" -#include "etkdg_impl.h" -#include "minimizer/bfgs_minimize.h" +#include "src/forcefields/dist_geom.h" +#include "src/etkdg_impl.h" +#include "src/minimizer/bfgs_minimize.h" using ::nvMolKit::detail::EmbedArgs; using ::nvMolKit::detail::ETKDGContext; diff --git a/src/etkdg_stage_stereochem_checks.cu b/src/etkdg_stage_stereochem_checks.cu index b8b691ab..56455dec 100644 --- a/src/etkdg_stage_stereochem_checks.cu +++ b/src/etkdg_stage_stereochem_checks.cu @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "etkdg_stage_stereochem_checks.h" -#include "kernel_utils.cuh" +#include "src/etkdg_stage_stereochem_checks.h" +#include "src/forcefields/kernel_utils.cuh" namespace nvMolKit { namespace detail { diff --git a/src/etkdg_stage_stereochem_checks.h b/src/etkdg_stage_stereochem_checks.h index c356e945..9e7d649c 100644 --- a/src/etkdg_stage_stereochem_checks.h +++ b/src/etkdg_stage_stereochem_checks.h @@ -18,7 +18,7 @@ #include -#include "etkdg_impl.h" +#include "src/etkdg_impl.h" namespace nvMolKit { namespace detail { diff --git a/src/etkdg_stage_update_conformers.cu b/src/etkdg_stage_update_conformers.cu index f8c4fb88..ccd9973a 100644 --- a/src/etkdg_stage_update_conformers.cu +++ b/src/etkdg_stage_update_conformers.cu @@ -15,7 +15,7 @@ #include -#include "etkdg_stage_update_conformers.h" +#include "src/etkdg_stage_update_conformers.h" namespace nvMolKit { namespace detail { diff --git a/src/etkdg_stage_update_conformers.h b/src/etkdg_stage_update_conformers.h index 26585a40..e41c2243 100644 --- a/src/etkdg_stage_update_conformers.h +++ b/src/etkdg_stage_update_conformers.h @@ -20,8 +20,8 @@ #include #include -#include "etkdg_impl.h" -#include "host_vector.h" +#include "src/etkdg_impl.h" +#include "src/utils/host_vector.h" namespace nvMolKit { namespace detail { diff --git a/src/forcefields/CMakeLists.txt b/src/forcefields/CMakeLists.txt index e61bf714..d53d5246 100644 --- a/src/forcefields/CMakeLists.txt +++ b/src/forcefields/CMakeLists.txt @@ -15,35 +15,27 @@ add_library(ff_kernel_utils kernel_utils.cu) target_link_libraries(ff_kernel_utils PUBLIC device_vector) -target_include_directories(ff_kernel_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(ff_utils ff_utils.cpp) target_link_libraries(ff_utils PRIVATE ${RDKit_LIBS}) -target_include_directories(ff_utils PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(batched_forcefield batched_forcefield.cpp) target_link_libraries(batched_forcefield PUBLIC device_vector) -target_include_directories(batched_forcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) add_library(forcefield_constraints forcefield_constraints.cpp) target_link_libraries(forcefield_constraints PUBLIC batched_forcefield) -target_include_directories(forcefield_constraints - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(mmff mmff.cu mmff_kernels.cu) target_link_libraries( mmff PUBLIC batched_forcefield forcefield_constraints PRIVATE device_vector ff_kernel_utils) -target_include_directories(mmff PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(uff uff.cu uff_kernels.cu) target_link_libraries( uff PUBLIC forcefield_constraints PRIVATE device_vector ff_kernel_utils) -target_include_directories(uff PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(dist_geom dist_geom.cu dist_geom_kernels.cu coord_gen.cu) target_link_libraries( @@ -51,40 +43,27 @@ target_link_libraries( PUBLIC batched_forcefield PRIVATE device_vector ff_kernel_utils ${RDKit_LIBS} rdkit_bounds_matrix symmetricEigenSolver) -target_include_directories(dist_geom PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(mmff_batched_forcefield mmff_batched_forcefield.cu) target_link_libraries( mmff_batched_forcefield PUBLIC batched_forcefield mmff PRIVATE device_vector) -target_include_directories( - mmff_batched_forcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) add_library(uff_batched_forcefield uff_batched_forcefield.cu) target_link_libraries( uff_batched_forcefield PUBLIC batched_forcefield uff PRIVATE device_vector) -target_include_directories( - uff_batched_forcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) add_library(dg_batched_forcefield dg_batched_forcefield.cu) target_link_libraries( dg_batched_forcefield PUBLIC batched_forcefield dist_geom PRIVATE device_vector) -target_include_directories( - dg_batched_forcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) add_library(etk_batched_forcefield etk_batched_forcefield.cu) target_link_libraries( etk_batched_forcefield PUBLIC batched_forcefield dist_geom PRIVATE device_vector) -target_include_directories( - etk_batched_forcefield PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) diff --git a/src/forcefields/batched_forcefield.cpp b/src/forcefields/batched_forcefield.cpp index a41276e6..562dbe98 100644 --- a/src/forcefields/batched_forcefield.cpp +++ b/src/forcefields/batched_forcefield.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "batched_forcefield.h" +#include "src/forcefields/batched_forcefield.h" #include diff --git a/src/forcefields/batched_forcefield.h b/src/forcefields/batched_forcefield.h index 09d3c5d2..fc49b3e3 100644 --- a/src/forcefields/batched_forcefield.h +++ b/src/forcefields/batched_forcefield.h @@ -21,7 +21,7 @@ #include #include -#include "../minimizer/bfgs_types.h" +#include "src/minimizer/bfgs_types.h" namespace nvMolKit { diff --git a/src/forcefields/coord_gen.cu b/src/forcefields/coord_gen.cu index c8c6c158..2e94341e 100644 --- a/src/forcefields/coord_gen.cu +++ b/src/forcefields/coord_gen.cu @@ -23,10 +23,10 @@ #include -#include "bounds_matrix.h" -#include "coord_gen.h" -#include "device_vector.h" -#include "symmetric_eigensolver.h" +#include "rdkit_extensions/bounds_matrix.h" +#include "src/forcefields/coord_gen.h" +#include "src/utils/device_vector.h" +#include "src/symmetric_eigensolver.h" namespace nvMolKit { diff --git a/src/forcefields/dg_batched_forcefield.cu b/src/forcefields/dg_batched_forcefield.cu index bc0827e7..930cbfaf 100644 --- a/src/forcefields/dg_batched_forcefield.cu +++ b/src/forcefields/dg_batched_forcefield.cu @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "dg_batched_forcefield.h" +#include "src/forcefields/dg_batched_forcefield.h" namespace nvMolKit { diff --git a/src/forcefields/dg_batched_forcefield.h b/src/forcefields/dg_batched_forcefield.h index 9b8b5624..befc415b 100644 --- a/src/forcefields/dg_batched_forcefield.h +++ b/src/forcefields/dg_batched_forcefield.h @@ -16,8 +16,8 @@ #ifndef NVMOLKIT_DG_BATCHED_FORCEFIELD_H #define NVMOLKIT_DG_BATCHED_FORCEFIELD_H -#include "batched_forcefield.h" -#include "dist_geom.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/forcefields/dist_geom.h" namespace nvMolKit { diff --git a/src/forcefields/dist_geom.cu b/src/forcefields/dist_geom.cu index 33d01616..6e9c75b8 100644 --- a/src/forcefields/dist_geom.cu +++ b/src/forcefields/dist_geom.cu @@ -16,11 +16,11 @@ #include #include -#include "device_vector.h" -#include "dist_geom.h" -#include "dist_geom_kernels.h" -#include "dist_geom_kernels_device.cuh" -#include "kernel_utils.cuh" +#include "src/utils/device_vector.h" +#include "src/forcefields/dist_geom.h" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/forcefields/dist_geom_kernels_device.cuh" +#include "src/forcefields/kernel_utils.cuh" namespace nvMolKit { namespace DistGeom { diff --git a/src/forcefields/dist_geom.h b/src/forcefields/dist_geom.h index 4a503de5..d663af5f 100644 --- a/src/forcefields/dist_geom.h +++ b/src/forcefields/dist_geom.h @@ -19,9 +19,9 @@ #include #include -#include "batched_forcefield.h" -#include "device_vector.h" -#include "dist_geom_kernels.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/dist_geom_kernels.h" namespace nvMolKit { namespace DistGeom { diff --git a/src/forcefields/dist_geom_kernels.cu b/src/forcefields/dist_geom_kernels.cu index 71f7f788..86c9398a 100644 --- a/src/forcefields/dist_geom_kernels.cu +++ b/src/forcefields/dist_geom_kernels.cu @@ -15,9 +15,9 @@ #include -#include "dist_geom_kernels.h" -#include "dist_geom_kernels_device.cuh" -#include "kernel_utils.cuh" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/forcefields/dist_geom_kernels_device.cuh" +#include "src/forcefields/kernel_utils.cuh" using namespace nvMolKit::FFKernelUtils; diff --git a/src/forcefields/dist_geom_kernels_device.cuh b/src/forcefields/dist_geom_kernels_device.cuh index 4e9758a0..193dc07a 100644 --- a/src/forcefields/dist_geom_kernels_device.cuh +++ b/src/forcefields/dist_geom_kernels_device.cuh @@ -18,7 +18,7 @@ #include -#include "kernel_utils.cuh" +#include "src/forcefields/kernel_utils.cuh" #ifndef M_PI #define M_PI 3.14159265358979323846 diff --git a/src/forcefields/etk_batched_forcefield.cu b/src/forcefields/etk_batched_forcefield.cu index 5af62167..c83ff86e 100644 --- a/src/forcefields/etk_batched_forcefield.cu +++ b/src/forcefields/etk_batched_forcefield.cu @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "etk_batched_forcefield.h" +#include "src/forcefields/etk_batched_forcefield.h" namespace nvMolKit { diff --git a/src/forcefields/etk_batched_forcefield.h b/src/forcefields/etk_batched_forcefield.h index d5472987..ad5a25aa 100644 --- a/src/forcefields/etk_batched_forcefield.h +++ b/src/forcefields/etk_batched_forcefield.h @@ -16,8 +16,8 @@ #ifndef NVMOLKIT_ETK_BATCHED_FORCEFIELD_H #define NVMOLKIT_ETK_BATCHED_FORCEFIELD_H -#include "batched_forcefield.h" -#include "dist_geom.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/forcefields/dist_geom.h" namespace nvMolKit { diff --git a/src/forcefields/ff_utils.cpp b/src/forcefields/ff_utils.cpp index 99849c6a..6685961d 100644 --- a/src/forcefields/ff_utils.cpp +++ b/src/forcefields/ff_utils.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "ff_utils.h" +#include "src/forcefields/ff_utils.h" #include #include diff --git a/src/forcefields/forcefield_constraints.cpp b/src/forcefields/forcefield_constraints.cpp index ff34b99d..8ba34741 100644 --- a/src/forcefields/forcefield_constraints.cpp +++ b/src/forcefields/forcefield_constraints.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "forcefield_constraints.h" +#include "src/forcefields/forcefield_constraints.h" #include #include diff --git a/src/forcefields/forcefield_constraints.h b/src/forcefields/forcefield_constraints.h index a2c06d7d..902283c6 100644 --- a/src/forcefields/forcefield_constraints.h +++ b/src/forcefields/forcefield_constraints.h @@ -22,8 +22,8 @@ // TODO: Constraint term types, constraint kernels, and launchReduceEnergiesKernel currently live in // mmff.h / mmff_kernels.h but are forcefield-generic. They should be extracted into shared headers // so that UFF (and future forcefields) don't depend on MMFF. -#include "mmff.h" -#include "uff.h" +#include "src/forcefields/mmff.h" +#include "src/forcefields/uff.h" namespace nvMolKit::ForceFieldConstraints { diff --git a/src/forcefields/kernel_utils.cu b/src/forcefields/kernel_utils.cu index c1b1e67f..4f6b9c0c 100644 --- a/src/forcefields/kernel_utils.cu +++ b/src/forcefields/kernel_utils.cu @@ -15,7 +15,7 @@ #include -#include "kernel_utils.cuh" +#include "src/forcefields/kernel_utils.cuh" namespace nvMolKit { namespace FFKernelUtils { diff --git a/src/forcefields/kernel_utils.cuh b/src/forcefields/kernel_utils.cuh index b053e5e3..0f70db30 100644 --- a/src/forcefields/kernel_utils.cuh +++ b/src/forcefields/kernel_utils.cuh @@ -20,7 +20,7 @@ #include -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { namespace FFKernelUtils { diff --git a/src/forcefields/mmff.cu b/src/forcefields/mmff.cu index 382ac2f3..410d106b 100644 --- a/src/forcefields/mmff.cu +++ b/src/forcefields/mmff.cu @@ -16,9 +16,9 @@ #include #include -#include "kernel_utils.cuh" -#include "mmff.h" -#include "mmff_kernels.h" +#include "src/forcefields/kernel_utils.cuh" +#include "src/forcefields/mmff.h" +#include "src/forcefields/mmff_kernels.h" namespace nvMolKit { namespace MMFF { diff --git a/src/forcefields/mmff.h b/src/forcefields/mmff.h index 22f50877..5e6efe03 100644 --- a/src/forcefields/mmff.h +++ b/src/forcefields/mmff.h @@ -20,9 +20,9 @@ #include #include -#include "batched_forcefield.h" -#include "device_vector.h" -#include "mmff_kernels.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/mmff_kernels.h" namespace nvMolKit { namespace MMFF { diff --git a/src/forcefields/mmff_batched_forcefield.cu b/src/forcefields/mmff_batched_forcefield.cu index ef9c341d..058cb653 100644 --- a/src/forcefields/mmff_batched_forcefield.cu +++ b/src/forcefields/mmff_batched_forcefield.cu @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mmff_batched_forcefield.h" +#include "src/forcefields/mmff_batched_forcefield.h" namespace nvMolKit { diff --git a/src/forcefields/mmff_batched_forcefield.h b/src/forcefields/mmff_batched_forcefield.h index 91b131d2..20d449a3 100644 --- a/src/forcefields/mmff_batched_forcefield.h +++ b/src/forcefields/mmff_batched_forcefield.h @@ -16,8 +16,8 @@ #ifndef NVMOLKIT_MMFF_BATCHED_FORCEFIELD_H #define NVMOLKIT_MMFF_BATCHED_FORCEFIELD_H -#include "batched_forcefield.h" -#include "mmff.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/forcefields/mmff.h" namespace nvMolKit { diff --git a/src/forcefields/mmff_kernels.cu b/src/forcefields/mmff_kernels.cu index 82738053..67363cee 100644 --- a/src/forcefields/mmff_kernels.cu +++ b/src/forcefields/mmff_kernels.cu @@ -15,9 +15,9 @@ #include -#include "kernel_utils.cuh" -#include "mmff_kernels.h" -#include "mmff_kernels_device.cuh" +#include "src/forcefields/kernel_utils.cuh" +#include "src/forcefields/mmff_kernels.h" +#include "src/forcefields/mmff_kernels_device.cuh" using namespace nvMolKit::FFKernelUtils; diff --git a/src/forcefields/mmff_kernels_device.cuh b/src/forcefields/mmff_kernels_device.cuh index a4328464..4b7a4fa5 100644 --- a/src/forcefields/mmff_kernels_device.cuh +++ b/src/forcefields/mmff_kernels_device.cuh @@ -16,7 +16,7 @@ #ifndef NVMOLKIT_MMFF_KERNELS_DEVICE_CUH #define NVMOLKIT_MMFF_KERNELS_DEVICE_CUH -#include "kernel_utils.cuh" +#include "src/forcefields/kernel_utils.cuh" using namespace nvMolKit::FFKernelUtils; diff --git a/src/forcefields/uff.cu b/src/forcefields/uff.cu index 3ded0796..392cc874 100644 --- a/src/forcefields/uff.cu +++ b/src/forcefields/uff.cu @@ -16,8 +16,8 @@ #include #include -#include "kernel_utils.cuh" -#include "uff.h" +#include "src/forcefields/kernel_utils.cuh" +#include "src/forcefields/uff.h" namespace nvMolKit { namespace UFF { diff --git a/src/forcefields/uff.h b/src/forcefields/uff.h index 8f132c2d..2712db8d 100644 --- a/src/forcefields/uff.h +++ b/src/forcefields/uff.h @@ -20,12 +20,12 @@ #include #include -#include "batched_forcefield.h" -#include "device_vector.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/utils/device_vector.h" // TODO: Constraint types and kernels (DistanceConstraintTerms, launchReduceEnergiesKernel, etc.) // should be extracted from MMFF into shared forcefield-generic headers so UFF doesn't depend on MMFF. -#include "mmff.h" -#include "uff_kernels.h" +#include "src/forcefields/mmff.h" +#include "src/forcefields/uff_kernels.h" namespace nvMolKit { namespace UFF { diff --git a/src/forcefields/uff_batched_forcefield.cu b/src/forcefields/uff_batched_forcefield.cu index 7cd9445d..b569427b 100644 --- a/src/forcefields/uff_batched_forcefield.cu +++ b/src/forcefields/uff_batched_forcefield.cu @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "uff_batched_forcefield.h" +#include "src/forcefields/uff_batched_forcefield.h" namespace nvMolKit { namespace { diff --git a/src/forcefields/uff_batched_forcefield.h b/src/forcefields/uff_batched_forcefield.h index b41721cb..7ac9a2eb 100644 --- a/src/forcefields/uff_batched_forcefield.h +++ b/src/forcefields/uff_batched_forcefield.h @@ -16,8 +16,8 @@ #ifndef NVMOLKIT_UFF_BATCHED_FORCEFIELD_H #define NVMOLKIT_UFF_BATCHED_FORCEFIELD_H -#include "batched_forcefield.h" -#include "uff.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/forcefields/uff.h" namespace nvMolKit { diff --git a/src/forcefields/uff_kernels.cu b/src/forcefields/uff_kernels.cu index 418f79af..33e76796 100644 --- a/src/forcefields/uff_kernels.cu +++ b/src/forcefields/uff_kernels.cu @@ -15,9 +15,9 @@ #include -#include "kernel_utils.cuh" -#include "uff_kernels.h" -#include "uff_kernels_device.cuh" +#include "src/forcefields/kernel_utils.cuh" +#include "src/forcefields/uff_kernels.h" +#include "src/forcefields/uff_kernels_device.cuh" using namespace nvMolKit::FFKernelUtils; diff --git a/src/forcefields/uff_kernels.h b/src/forcefields/uff_kernels.h index c9d98444..c30a6ec2 100644 --- a/src/forcefields/uff_kernels.h +++ b/src/forcefields/uff_kernels.h @@ -18,7 +18,7 @@ #include -#include "mmff_kernels.h" +#include "src/forcefields/mmff_kernels.h" namespace nvMolKit { namespace UFF { diff --git a/src/forcefields/uff_kernels_device.cuh b/src/forcefields/uff_kernels_device.cuh index 4f9aea3e..f95db9c9 100644 --- a/src/forcefields/uff_kernels_device.cuh +++ b/src/forcefields/uff_kernels_device.cuh @@ -18,7 +18,7 @@ #include -#include "mmff_kernels_device.cuh" +#include "src/forcefields/mmff_kernels_device.cuh" using namespace nvMolKit::FFKernelUtils; diff --git a/src/load_store.cuh b/src/load_store.cuh index 7fccce0a..e4b2e5ed 100644 --- a/src/load_store.cuh +++ b/src/load_store.cuh @@ -19,7 +19,7 @@ #include #include -#include "macros_ptx.cuh" +#include "src/utils/macros_ptx.cuh" namespace nvMolKit { diff --git a/src/minimizer/CMakeLists.txt b/src/minimizer/CMakeLists.txt index c8c59cc6..633e2e8f 100644 --- a/src/minimizer/CMakeLists.txt +++ b/src/minimizer/CMakeLists.txt @@ -20,15 +20,11 @@ target_link_libraries( PUBLIC host_vector device_vector PRIVATE ${RDKit_LIBS} batched_forcefield rdkit_mmff_flattened dist_geom cub_helpers cccl_interface) -target_include_directories(bfgs PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - add_library(bfgs_common bfgs_common.cpp) target_link_libraries( bfgs_common PUBLIC host_vector device PRIVATE ${RDKit_LIBS} OpenMP::OpenMP_CXX) -target_include_directories(bfgs_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - add_library(bfgs_mmff bfgs_mmff.cpp) target_link_libraries( bfgs_mmff @@ -42,8 +38,6 @@ target_link_libraries( OpenMP::OpenMP_CXX openmp_helpers cccl_interface) -target_include_directories(bfgs_mmff PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - add_library(bfgs_uff bfgs_uff.cpp) target_link_libraries( bfgs_uff @@ -57,4 +51,3 @@ target_link_libraries( OpenMP::OpenMP_CXX openmp_helpers cccl_interface) -target_include_directories(bfgs_uff PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/minimizer/bfgs_common.cpp b/src/minimizer/bfgs_common.cpp index 718b6cc6..81b93730 100644 --- a/src/minimizer/bfgs_common.cpp +++ b/src/minimizer/bfgs_common.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bfgs_common.h" +#include "src/minimizer/bfgs_common.h" #include #include diff --git a/src/minimizer/bfgs_common.h b/src/minimizer/bfgs_common.h index 61b15bde..46915f31 100644 --- a/src/minimizer/bfgs_common.h +++ b/src/minimizer/bfgs_common.h @@ -19,9 +19,9 @@ #include #include -#include "../hardware_options.h" -#include "device.h" -#include "host_vector.h" +#include "src/hardware_options.h" +#include "src/utils/device.h" +#include "src/utils/host_vector.h" namespace RDKit { class ROMol; diff --git a/src/minimizer/bfgs_hessian.cu b/src/minimizer/bfgs_hessian.cu index 04164cb1..7ba58718 100644 --- a/src/minimizer/bfgs_hessian.cu +++ b/src/minimizer/bfgs_hessian.cu @@ -19,10 +19,10 @@ #include #include -#include "bfgs_hessian.h" -#include "cuda_error_check.h" -#include "device_vector.h" -#include "host_vector.h" +#include "src/minimizer/bfgs_hessian.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" +#include "src/utils/host_vector.h" namespace cg = cooperative_groups; namespace nvMolKit { diff --git a/src/minimizer/bfgs_hessian.h b/src/minimizer/bfgs_hessian.h index bc0431ac..93c2a47f 100644 --- a/src/minimizer/bfgs_hessian.h +++ b/src/minimizer/bfgs_hessian.h @@ -16,8 +16,8 @@ #ifndef NVMOLKIT_BFGS_HESSIAN_H #define NVMOLKIT_BFGS_HESSIAN_H -#include "device_vector.h" -#include "host_vector.h" +#include "src/utils/device_vector.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/src/minimizer/bfgs_minimize.cu b/src/minimizer/bfgs_minimize.cu index 672b54c1..3de76b68 100644 --- a/src/minimizer/bfgs_minimize.cu +++ b/src/minimizer/bfgs_minimize.cu @@ -16,17 +16,17 @@ #include #include -#include "batched_forcefield.h" -#include "bfgs_hessian.h" -#include "bfgs_minimize.h" -#include "bfgs_minimize_permol_kernels.h" -#include "cub_helpers.cuh" -#include "device_vector.h" -#include "dist_geom.h" -#include "dist_geom_kernels.h" -#include "mmff.h" -#include "mmff_kernels.h" -#include "nvtx.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/minimizer/bfgs_hessian.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/minimizer/bfgs_minimize_permol_kernels.h" +#include "src/utils/cub_helpers.cuh" +#include "src/utils/device_vector.h" +#include "src/forcefields/dist_geom.h" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/forcefields/mmff.h" +#include "src/forcefields/mmff_kernels.h" +#include "src/utils/nvtx.h" namespace nvMolKit { constexpr double FUNCTOL = 1e-4; //!< Default tolerance for function convergence in the minimizer diff --git a/src/minimizer/bfgs_minimize.h b/src/minimizer/bfgs_minimize.h index cf9f2de2..b1313d13 100644 --- a/src/minimizer/bfgs_minimize.h +++ b/src/minimizer/bfgs_minimize.h @@ -16,13 +16,13 @@ #ifndef NVMOLKIT_BFGS_MINIMIZE_H #define NVMOLKIT_BFGS_MINIMIZE_H -#include +#include "src/utils/device_vector.h" #include #include -#include "bfgs_types.h" -#include "host_vector.h" +#include "src/minimizer/bfgs_types.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/src/minimizer/bfgs_minimize_permol_kernels.cu b/src/minimizer/bfgs_minimize_permol_kernels.cu index 387cfee5..ad94465d 100644 --- a/src/minimizer/bfgs_minimize_permol_kernels.cu +++ b/src/minimizer/bfgs_minimize_permol_kernels.cu @@ -15,12 +15,12 @@ #include -#include "bfgs_minimize_permol_kernels.h" -#include "cub_helpers.cuh" -#include "device_vector.h" -#include "dist_geom_kernels_device.cuh" -#include "mmff_kernels.h" -#include "mmff_kernels_device.cuh" +#include "src/minimizer/bfgs_minimize_permol_kernels.h" +#include "src/utils/cub_helpers.cuh" +#include "src/utils/device_vector.h" +#include "src/forcefields/dist_geom_kernels_device.cuh" +#include "src/forcefields/mmff_kernels.h" +#include "src/forcefields/mmff_kernels_device.cuh" namespace nvMolKit { diff --git a/src/minimizer/bfgs_minimize_permol_kernels.h b/src/minimizer/bfgs_minimize_permol_kernels.h index f3876433..24a966af 100644 --- a/src/minimizer/bfgs_minimize_permol_kernels.h +++ b/src/minimizer/bfgs_minimize_permol_kernels.h @@ -18,9 +18,9 @@ #include -#include "bfgs_types.h" -#include "dist_geom_kernels.h" -#include "mmff_kernels.h" +#include "src/minimizer/bfgs_types.h" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/forcefields/mmff_kernels.h" namespace nvMolKit { diff --git a/src/minimizer/bfgs_mmff.cpp b/src/minimizer/bfgs_mmff.cpp index 4fa0a7d6..7fa684f6 100644 --- a/src/minimizer/bfgs_mmff.cpp +++ b/src/minimizer/bfgs_mmff.cpp @@ -13,20 +13,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bfgs_mmff.h" +#include "src/minimizer/bfgs_mmff.h" #include #include #include -#include "bfgs_common.h" -#include "bfgs_minimize.h" -#include "ff_utils.h" -#include "mmff_batched_forcefield.h" -#include "mmff_flattened_builder.h" -#include "nvtx.h" -#include "openmp_helpers.h" +#include "src/minimizer/bfgs_common.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/mmff_batched_forcefield.h" +#include "rdkit_extensions/mmff_flattened_builder.h" +#include "src/utils/nvtx.h" +#include "src/utils/openmp_helpers.h" namespace nvMolKit::MMFF { diff --git a/src/minimizer/bfgs_mmff.h b/src/minimizer/bfgs_mmff.h index f317d130..8f29e458 100644 --- a/src/minimizer/bfgs_mmff.h +++ b/src/minimizer/bfgs_mmff.h @@ -18,10 +18,10 @@ #include -#include "../hardware_options.h" -#include "bfgs_minimize.h" -#include "forcefield_constraints.h" -#include "mmff_properties.h" +#include "src/hardware_options.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/forcefields/forcefield_constraints.h" +#include "src/forcefields/mmff_properties.h" namespace RDKit { class ROMol; diff --git a/src/minimizer/bfgs_uff.cpp b/src/minimizer/bfgs_uff.cpp index be8fec3e..500fa9e8 100644 --- a/src/minimizer/bfgs_uff.cpp +++ b/src/minimizer/bfgs_uff.cpp @@ -13,20 +13,20 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "bfgs_uff.h" +#include "src/minimizer/bfgs_uff.h" #include #include #include -#include "bfgs_common.h" -#include "bfgs_minimize.h" -#include "ff_utils.h" -#include "nvtx.h" -#include "openmp_helpers.h" -#include "uff_batched_forcefield.h" -#include "uff_flattened_builder.h" +#include "src/minimizer/bfgs_common.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/forcefields/ff_utils.h" +#include "src/utils/nvtx.h" +#include "src/utils/openmp_helpers.h" +#include "src/forcefields/uff_batched_forcefield.h" +#include "rdkit_extensions/uff_flattened_builder.h" namespace nvMolKit::UFF { diff --git a/src/minimizer/bfgs_uff.h b/src/minimizer/bfgs_uff.h index fa845ce2..5c2f7660 100644 --- a/src/minimizer/bfgs_uff.h +++ b/src/minimizer/bfgs_uff.h @@ -19,9 +19,9 @@ #include #include -#include "../hardware_options.h" -#include "bfgs_minimize.h" -#include "forcefield_constraints.h" +#include "src/hardware_options.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/forcefields/forcefield_constraints.h" namespace RDKit { class ROMol; diff --git a/src/morgan_fingerprint.cpp b/src/morgan_fingerprint.cpp index 065d1223..ba143b52 100644 --- a/src/morgan_fingerprint.cpp +++ b/src/morgan_fingerprint.cpp @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "morgan_fingerprint.h" +#include "src/morgan_fingerprint.h" #include #include #include -#include "device.h" +#include "src/utils/device.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint.h b/src/morgan_fingerprint.h index f484fa96..01193c2f 100644 --- a/src/morgan_fingerprint.h +++ b/src/morgan_fingerprint.h @@ -20,10 +20,10 @@ #include #include -#include "flat_bit_vect.h" -#include "morgan_fingerprint_common.h" -#include "morgan_fingerprint_cpu.h" -#include "morgan_fingerprint_gpu.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/morgan_fingerprint_common.h" +#include "src/morgan_fingerprint_cpu.h" +#include "src/morgan_fingerprint_gpu.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint_common.cpp b/src/morgan_fingerprint_common.cpp index bad75787..ca4ce8de 100644 --- a/src/morgan_fingerprint_common.cpp +++ b/src/morgan_fingerprint_common.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "morgan_fingerprint_common.h" +#include "src/morgan_fingerprint_common.h" #include diff --git a/src/morgan_fingerprint_cpu.cpp b/src/morgan_fingerprint_cpu.cpp index 247720a9..b661f7f9 100644 --- a/src/morgan_fingerprint_cpu.cpp +++ b/src/morgan_fingerprint_cpu.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "morgan_fingerprint_cpu.h" +#include "src/morgan_fingerprint_cpu.h" #include #include @@ -21,7 +21,7 @@ #include -#include "openmp_helpers.h" +#include "src/utils/openmp_helpers.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint_cpu.h b/src/morgan_fingerprint_cpu.h index 187cd6e3..a808e4df 100644 --- a/src/morgan_fingerprint_cpu.h +++ b/src/morgan_fingerprint_cpu.h @@ -21,7 +21,7 @@ #include -#include "morgan_fingerprint_common.h" +#include "src/morgan_fingerprint_common.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint_gpu.cpp b/src/morgan_fingerprint_gpu.cpp index a2d248f2..ac56ac65 100644 --- a/src/morgan_fingerprint_gpu.cpp +++ b/src/morgan_fingerprint_gpu.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "morgan_fingerprint_gpu.h" +#include "src/morgan_fingerprint_gpu.h" #include #include @@ -24,13 +24,13 @@ #include #include -#include "flat_bit_vect.h" -#include "morgan_fingerprint_common.h" -#include "morgan_fingerprint_cpu.h" -#include "morgan_fingerprint_kernels.h" -#include "nvtx.h" -#include "openmp_helpers.h" -#include "utils/host_vector.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/morgan_fingerprint_common.h" +#include "src/morgan_fingerprint_cpu.h" +#include "src/morgan_fingerprint_kernels.h" +#include "src/utils/nvtx.h" +#include "src/utils/openmp_helpers.h" +#include "src/utils/host_vector.h" namespace nvMolKit { namespace { diff --git a/src/morgan_fingerprint_gpu.h b/src/morgan_fingerprint_gpu.h index e2632a6f..b9cfc8dd 100644 --- a/src/morgan_fingerprint_gpu.h +++ b/src/morgan_fingerprint_gpu.h @@ -21,8 +21,8 @@ #include -#include "morgan_fingerprint_common.h" -#include "morgan_fingerprint_kernels.h" +#include "src/morgan_fingerprint_common.h" +#include "src/morgan_fingerprint_kernels.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint_kernels.cu b/src/morgan_fingerprint_kernels.cu index 75c3f296..27e57a18 100644 --- a/src/morgan_fingerprint_kernels.cu +++ b/src/morgan_fingerprint_kernels.cu @@ -21,10 +21,10 @@ #include namespace cg = cooperative_groups; -#include "cuda_error_check.h" -#include "device_vector.h" -#include "flat_bit_vect.h" -#include "morgan_fingerprint_kernels.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/morgan_fingerprint_kernels.h" namespace nvMolKit { diff --git a/src/morgan_fingerprint_kernels.h b/src/morgan_fingerprint_kernels.h index 4171d619..f2f6410a 100644 --- a/src/morgan_fingerprint_kernels.h +++ b/src/morgan_fingerprint_kernels.h @@ -18,11 +18,11 @@ #include -#include "device.h" -#include "flat_bit_vect.h" -#include "morgan_fingerprint_common.h" -#include "utils/device_vector.h" -#include "utils/host_vector.h" +#include "src/utils/device.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/morgan_fingerprint_common.h" +#include "src/utils/device_vector.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/src/similarity.cpp b/src/similarity.cpp index fdeed252..5fa5997f 100644 --- a/src/similarity.cpp +++ b/src/similarity.cpp @@ -13,16 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "similarity.h" +#include "src/similarity.h" #include -#include "device.h" -#include "device_vector.h" -#include "host_vector.h" -#include "openmp_helpers.h" -#include "similarity_kernels.h" -#include "utils/nvtx.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/utils/host_vector.h" +#include "src/utils/openmp_helpers.h" +#include "src/similarity_kernels.h" +#include "src/utils/nvtx.h" namespace nvMolKit { using internal::kBlockType; diff --git a/src/similarity.h b/src/similarity.h index 2023bc81..fcfc98a8 100644 --- a/src/similarity.h +++ b/src/similarity.h @@ -21,7 +21,7 @@ #include #include -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { diff --git a/src/similarity_kernels.cu b/src/similarity_kernels.cu index 01b81880..c29fd18e 100644 --- a/src/similarity_kernels.cu +++ b/src/similarity_kernels.cu @@ -16,10 +16,10 @@ #include #include -#include "device_vector.h" -#include "load_store.cuh" -#include "similarity_kernels.h" -#include "similarity_op.cuh" +#include "src/utils/device_vector.h" +#include "src/load_store.cuh" +#include "src/similarity_kernels.h" +#include "src/similarity_op.cuh" namespace nvMolKit { diff --git a/src/similarity_kernels.h b/src/similarity_kernels.h index 7cb40551..284edb6f 100644 --- a/src/similarity_kernels.h +++ b/src/similarity_kernels.h @@ -20,7 +20,7 @@ #include #include -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { namespace internal { diff --git a/src/similarity_op.cuh b/src/similarity_op.cuh index 14c7bb22..1dcb573f 100644 --- a/src/similarity_op.cuh +++ b/src/similarity_op.cuh @@ -20,7 +20,7 @@ #include #include -#include "macros_ptx.cuh" +#include "src/utils/macros_ptx.cuh" namespace nvMolKit { diff --git a/src/substruct/CMakeLists.txt b/src/substruct/CMakeLists.txt index d52bb24d..0d297a5d 100644 --- a/src/substruct/CMakeLists.txt +++ b/src/substruct/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. # All rights reserved. SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not @@ -14,25 +14,19 @@ # the License. add_library(packed_bonds packed_bonds.cpp) -target_include_directories(packed_bonds PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(molecules molecules.cpp) -target_include_directories(molecules PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries( molecules PUBLIC device_vector flatBitVect OpenMP::OpenMP_CXX packed_bonds device PRIVATE ${RDKit_LIBS} nvtx) add_library(substruct_kernels substruct_kernels.cu) -target_include_directories(substruct_kernels PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( substruct_kernels PUBLIC molecules device_vector flatBitVect cuda_error_check device_timings) add_library(substruct_definitions INTERFACE) -target_include_directories(substruct_definitions - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library( substructure_search @@ -43,8 +37,6 @@ add_library( pinned_buffer_pool.cpp substruct_launch_config.cpp substruct_search_internal.cpp) -target_include_directories(substructure_search - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries( substructure_search PUBLIC molecules diff --git a/src/substruct/boolean_tree.cuh b/src/substruct/boolean_tree.cuh index 592a5dc9..fc9ad854 100644 --- a/src/substruct/boolean_tree.cuh +++ b/src/substruct/boolean_tree.cuh @@ -18,7 +18,7 @@ #include -#include "atom_data_packed.h" +#include "src/substruct/atom_data_packed.h" #ifdef __CUDACC__ #define HD_CALLABLE __host__ __device__ __forceinline__ diff --git a/src/substruct/gpu_executor.cu b/src/substruct/gpu_executor.cu index c6304e69..fe0cdc97 100644 --- a/src/substruct/gpu_executor.cu +++ b/src/substruct/gpu_executor.cu @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "cuda_error_check.h" -#include "gpu_executor.h" +#include "src/utils/cuda_error_check.h" +#include "src/substruct/gpu_executor.h" namespace nvMolKit { diff --git a/src/substruct/gpu_executor.h b/src/substruct/gpu_executor.h index 479383e2..32d2fb5e 100644 --- a/src/substruct/gpu_executor.h +++ b/src/substruct/gpu_executor.h @@ -20,14 +20,14 @@ #include #include -#include "device.h" -#include "device_vector.h" -#include "minibatch_planner.h" -#include "molecules_device.cuh" -#include "pinned_buffer_pool.h" -#include "recursive_preprocessor.h" -#include "substruct_search_internal.h" -#include "substruct_types.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/substruct/minibatch_planner.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/pinned_buffer_pool.h" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/substruct_search_internal.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/graph_labeler.cuh b/src/substruct/graph_labeler.cuh index 9b2ea66c..1b779005 100644 --- a/src/substruct/graph_labeler.cuh +++ b/src/substruct/graph_labeler.cuh @@ -18,12 +18,12 @@ #include -#include "atom_data_packed.h" -#include "boolean_tree.cuh" -#include "flat_bit_vect.h" -#include "molecules.h" -#include "molecules_device.cuh" -#include "substruct_debug.h" +#include "src/substruct/atom_data_packed.h" +#include "src/substruct/boolean_tree.cuh" +#include "src/data_structures/flat_bit_vect.h" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/substruct_debug.h" namespace nvMolKit { diff --git a/src/substruct/minibatch_planner.cpp b/src/substruct/minibatch_planner.cpp index 4dc9909b..9932dc03 100644 --- a/src/substruct/minibatch_planner.cpp +++ b/src/substruct/minibatch_planner.cpp @@ -13,13 +13,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "minibatch_planner.h" +#include "src/substruct/minibatch_planner.h" #include -#include "nvtx.h" -#include "recursive_preprocessor.h" -#include "thread_worker_context.h" +#include "src/utils/nvtx.h" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/thread_worker_context.h" namespace nvMolKit { diff --git a/src/substruct/minibatch_planner.h b/src/substruct/minibatch_planner.h index 7465fd3c..64971a80 100644 --- a/src/substruct/minibatch_planner.h +++ b/src/substruct/minibatch_planner.h @@ -19,8 +19,8 @@ #include #include -#include "pinned_buffer_pool.h" -#include "substruct_types.h" +#include "src/substruct/pinned_buffer_pool.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/molecules.cpp b/src/substruct/molecules.cpp index 3613b9b0..4ef36d48 100644 --- a/src/substruct/molecules.cpp +++ b/src/substruct/molecules.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "molecules.h" +#include "src/substruct/molecules.h" #include #include @@ -29,11 +29,11 @@ #include #include -#include "nvtx.h" -#include "packed_bonds.h" -#include "rdkit_compat.h" -#include "substruct_debug.h" -#include "substruct_types.h" +#include "src/utils/nvtx.h" +#include "src/substruct/packed_bonds.h" +#include "src/utils/rdkit_compat.h" +#include "src/substruct/substruct_debug.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/molecules.h b/src/substruct/molecules.h index 8d3fe1e4..520e12eb 100644 --- a/src/substruct/molecules.h +++ b/src/substruct/molecules.h @@ -22,10 +22,10 @@ #include #include -#include "atom_data_packed.h" -#include "boolean_tree.cuh" -#include "device_vector.h" -#include "packed_bonds.h" +#include "src/substruct/atom_data_packed.h" +#include "src/substruct/boolean_tree.cuh" +#include "src/utils/device_vector.h" +#include "src/substruct/packed_bonds.h" namespace RDKit { class ROMol; diff --git a/src/substruct/molecules_device.cuh b/src/substruct/molecules_device.cuh index 8d7b3e99..5c2a4558 100644 --- a/src/substruct/molecules_device.cuh +++ b/src/substruct/molecules_device.cuh @@ -16,10 +16,10 @@ #ifndef NVMOLKIT_MOLECULES_DEVICE_CUH #define NVMOLKIT_MOLECULES_DEVICE_CUH -#include "atom_data_packed.h" -#include "boolean_tree.cuh" -#include "molecules.h" -#include "packed_bonds.h" +#include "src/substruct/atom_data_packed.h" +#include "src/substruct/boolean_tree.cuh" +#include "src/substruct/molecules.h" +#include "src/substruct/packed_bonds.h" namespace nvMolKit { diff --git a/src/substruct/packed_bonds.cpp b/src/substruct/packed_bonds.cpp index 8b4c594c..18cfc7fa 100644 --- a/src/substruct/packed_bonds.cpp +++ b/src/substruct/packed_bonds.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "packed_bonds.h" +#include "src/substruct/packed_bonds.h" namespace nvMolKit { diff --git a/src/substruct/packed_bonds_device.cuh b/src/substruct/packed_bonds_device.cuh index 7fcb35b5..c8284c57 100644 --- a/src/substruct/packed_bonds_device.cuh +++ b/src/substruct/packed_bonds_device.cuh @@ -16,7 +16,7 @@ #ifndef NVMOLKIT_PACKED_BONDS_DEVICE_CUH #define NVMOLKIT_PACKED_BONDS_DEVICE_CUH -#include "packed_bonds.h" +#include "src/substruct/packed_bonds.h" namespace nvMolKit { diff --git a/src/substruct/pinned_buffer_pool.cpp b/src/substruct/pinned_buffer_pool.cpp index 4f44c055..c46060c6 100644 --- a/src/substruct/pinned_buffer_pool.cpp +++ b/src/substruct/pinned_buffer_pool.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pinned_buffer_pool.h" +#include "src/substruct/pinned_buffer_pool.h" #include diff --git a/src/substruct/pinned_buffer_pool.h b/src/substruct/pinned_buffer_pool.h index b6df67d1..78c1663d 100644 --- a/src/substruct/pinned_buffer_pool.h +++ b/src/substruct/pinned_buffer_pool.h @@ -21,9 +21,9 @@ #include #include -#include "pinned_host_allocator.h" -#include "substruct_types.h" -#include "thread_safe_queue.h" +#include "src/utils/pinned_host_allocator.h" +#include "src/substruct/substruct_types.h" +#include "src/utils/thread_safe_queue.h" namespace nvMolKit { diff --git a/src/substruct/recursive_preprocessor.cu b/src/substruct/recursive_preprocessor.cu index 1a91e12c..a1bc2f52 100644 --- a/src/substruct/recursive_preprocessor.cu +++ b/src/substruct/recursive_preprocessor.cu @@ -18,12 +18,12 @@ #include #include -#include "molecules_device.cuh" -#include "recursive_preprocessor.h" -#include "substruct_debug.h" -#include "substruct_kernels.h" -#include "substruct_launch_config.h" -#include "substruct_search_internal.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/substruct_debug.h" +#include "src/substruct/substruct_kernels.h" +#include "src/substruct/substruct_launch_config.h" +#include "src/substruct/substruct_search_internal.h" namespace nvMolKit { diff --git a/src/substruct/recursive_preprocessor.h b/src/substruct/recursive_preprocessor.h index 5b15c4e8..8ead6054 100644 --- a/src/substruct/recursive_preprocessor.h +++ b/src/substruct/recursive_preprocessor.h @@ -25,14 +25,14 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" -#include "molecules.h" -#include "molecules_device.cuh" -#include "nvtx.h" -#include "pinned_host_allocator.h" -#include "substruct_types.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/utils/nvtx.h" +#include "src/utils/pinned_host_allocator.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/substruct_algos.cuh b/src/substruct/substruct_algos.cuh index e7c1b1a5..60693fef 100644 --- a/src/substruct/substruct_algos.cuh +++ b/src/substruct/substruct_algos.cuh @@ -20,12 +20,12 @@ #include -#include "device_timings.cuh" -#include "flat_bit_vect.h" -#include "molecules_device.cuh" -#include "packed_bonds_device.cuh" -#include "substruct_debug.h" -#include "substruct_types.h" +#include "src/utils/device_timings.cuh" +#include "src/data_structures/flat_bit_vect.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/packed_bonds_device.cuh" +#include "src/substruct/substruct_debug.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/substruct_kernels.cu b/src/substruct/substruct_kernels.cu index 332544e4..61ffbe3c 100644 --- a/src/substruct/substruct_kernels.cu +++ b/src/substruct/substruct_kernels.cu @@ -13,16 +13,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "flat_bit_vect.h" -#include "graph_labeler.cuh" -#include "molecules_device.cuh" -#include "sm_shared_mem_config.cuh" -#include "substruct_algos.cuh" -#include "substruct_debug.h" -#include "substruct_kernels.h" -#include "substruct_launch_config.h" -#include "substruct_search_internal.h" -#include "substruct_types.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/sm_shared_mem_config.cuh" +#include "src/substruct/substruct_algos.cuh" +#include "src/substruct/substruct_debug.h" +#include "src/substruct/substruct_kernels.h" +#include "src/substruct/substruct_launch_config.h" +#include "src/substruct/substruct_search_internal.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { namespace { diff --git a/src/substruct/substruct_kernels.h b/src/substruct/substruct_kernels.h index 2d07f89c..c0feaa76 100644 --- a/src/substruct/substruct_kernels.h +++ b/src/substruct/substruct_kernels.h @@ -20,8 +20,8 @@ #include -#include "molecules.h" -#include "substruct_types.h" +#include "src/substruct/molecules.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/substruct/substruct_launch_config.cpp b/src/substruct/substruct_launch_config.cpp index 452212fe..b0856431 100644 --- a/src/substruct/substruct_launch_config.cpp +++ b/src/substruct/substruct_launch_config.cpp @@ -15,7 +15,7 @@ #include -#include "substruct_types.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { TemplateConfigProperties getTemplateConfigProperties(SubstructTemplateConfig config) { diff --git a/src/substruct/substruct_search.cu b/src/substruct/substruct_search.cu index 96542204..9d3466fe 100644 --- a/src/substruct/substruct_search.cu +++ b/src/substruct/substruct_search.cu @@ -32,23 +32,23 @@ #include #include -#include "cuda_error_check.h" -#include "gpu_executor.h" -#include "graph_labeler.cuh" -#include "host_vector.h" -#include "minibatch_planner.h" -#include "molecules_device.cuh" -#include "nvtx.h" -#include "pinned_buffer_pool.h" -#include "recursive_preprocessor.h" -#include "sm_shared_mem_config.cuh" -#include "substruct_algos.cuh" -#include "substruct_debug.h" -#include "substruct_kernels.h" -#include "substruct_launch_config.h" -#include "substruct_search.h" -#include "substruct_search_internal.h" -#include "thread_safe_queue.h" +#include "src/utils/cuda_error_check.h" +#include "src/substruct/gpu_executor.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/utils/host_vector.h" +#include "src/substruct/minibatch_planner.h" +#include "src/substruct/molecules_device.cuh" +#include "src/utils/nvtx.h" +#include "src/substruct/pinned_buffer_pool.h" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/sm_shared_mem_config.cuh" +#include "src/substruct/substruct_algos.cuh" +#include "src/substruct/substruct_debug.h" +#include "src/substruct/substruct_kernels.h" +#include "src/substruct/substruct_launch_config.h" +#include "src/substruct/substruct_search.h" +#include "src/substruct/substruct_search_internal.h" +#include "src/utils/thread_safe_queue.h" namespace nvMolKit { diff --git a/src/substruct/substruct_search.h b/src/substruct/substruct_search.h index 638b5cba..14f05278 100644 --- a/src/substruct/substruct_search.h +++ b/src/substruct/substruct_search.h @@ -20,7 +20,7 @@ #include -#include "substruct_types.h" +#include "src/substruct/substruct_types.h" namespace RDKit { class ROMol; diff --git a/src/substruct/substruct_search_internal.cpp b/src/substruct/substruct_search_internal.cpp index 94c84217..fd53bf20 100644 --- a/src/substruct/substruct_search_internal.cpp +++ b/src/substruct/substruct_search_internal.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "substruct_search_internal.h" +#include "src/substruct/substruct_search_internal.h" #include #include @@ -21,13 +21,13 @@ #include #include -#include "cuda_error_check.h" -#include "gpu_executor.h" -#include "nvtx.h" -#include "pinned_buffer_pool.h" -#include "substruct_launch_config.h" -#include "substruct_search.h" -#include "thread_worker_context.h" +#include "src/utils/cuda_error_check.h" +#include "src/substruct/gpu_executor.h" +#include "src/utils/nvtx.h" +#include "src/substruct/pinned_buffer_pool.h" +#include "src/substruct/substruct_launch_config.h" +#include "src/substruct/substruct_search.h" +#include "src/substruct/thread_worker_context.h" namespace nvMolKit { diff --git a/src/substruct/substruct_search_internal.h b/src/substruct/substruct_search_internal.h index 81da6fa8..dfc2341c 100644 --- a/src/substruct/substruct_search_internal.h +++ b/src/substruct/substruct_search_internal.h @@ -32,21 +32,21 @@ #include #include -#include "cuda_error_check.h" -#include "host_vector.h" -#include "nvtx.h" -#include "pinned_host_allocator.h" -#include "thread_safe_queue.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/host_vector.h" +#include "src/utils/nvtx.h" +#include "src/utils/pinned_host_allocator.h" +#include "src/utils/thread_safe_queue.h" namespace RDKit { class ROMol; } // namespace RDKit -#include "device.h" -#include "device_vector.h" -#include "molecules.h" -#include "recursive_preprocessor.h" -#include "substruct_search.h" -#include "thread_worker_context.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/substruct/molecules.h" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/substruct_search.h" +#include "src/substruct/thread_worker_context.h" namespace nvMolKit { diff --git a/src/substruct/substruct_types.h b/src/substruct/substruct_types.h index 0690b76b..12b0b481 100644 --- a/src/substruct/substruct_types.h +++ b/src/substruct/substruct_types.h @@ -18,9 +18,9 @@ #include -#include "substruct_constants.h" -#include "substruct_results.h" -#include "substruct_template_config.h" +#include "src/substruct/substruct_constants.h" +#include "src/substruct/substruct_results.h" +#include "src/substruct/substruct_template_config.h" namespace nvMolKit { diff --git a/src/substruct/thread_worker_context.h b/src/substruct/thread_worker_context.h index 48ebd107..a809af8b 100644 --- a/src/substruct/thread_worker_context.h +++ b/src/substruct/thread_worker_context.h @@ -19,7 +19,7 @@ #include #include -#include "substruct_template_config.h" +#include "src/substruct/substruct_template_config.h" namespace nvMolKit { diff --git a/src/symmetric_eigensolver.cu b/src/symmetric_eigensolver.cu index f120d5d7..9acd9b82 100644 --- a/src/symmetric_eigensolver.cu +++ b/src/symmetric_eigensolver.cu @@ -20,9 +20,9 @@ #include #include -#include "cuda_error_check.h" -#include "device_vector.h" -#include "symmetric_eigensolver.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" +#include "src/symmetric_eigensolver.h" namespace nvMolKit { diff --git a/src/testutils/CMakeLists.txt b/src/testutils/CMakeLists.txt index 675f9f5f..25d227c6 100644 --- a/src/testutils/CMakeLists.txt +++ b/src/testutils/CMakeLists.txt @@ -15,13 +15,9 @@ if(NVMOLKIT_BUILD_TESTS OR NVMOLKIT_BUILD_BENCHMARKS) add_library(molData mol_data.cpp) - target_include_directories(molData PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(molData PRIVATE ${RDKit_LIBS}) add_library(substruct_validation substruct_validation.cu) - target_include_directories( - substruct_validation PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} - ${PROJECT_SOURCE_DIR}/src) target_link_libraries( substruct_validation PUBLIC ${RDKit_LIBS} substructure_search substruct_definitions @@ -30,5 +26,3 @@ endif() add_library(conformer_checkers conformer_checkers.cpp) target_link_libraries(conformer_checkers PRIVATE ${RDKit_LIBS}) -target_include_directories(conformer_checkers - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/testutils/conformer_checkers.cpp b/src/testutils/conformer_checkers.cpp index 5ed03059..0b67f23f 100644 --- a/src/testutils/conformer_checkers.cpp +++ b/src/testutils/conformer_checkers.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "conformer_checkers.h" +#include "src/testutils/conformer_checkers.h" #include diff --git a/src/testutils/mol_data.cpp b/src/testutils/mol_data.cpp index 6487e67e..53db357c 100644 --- a/src/testutils/mol_data.cpp +++ b/src/testutils/mol_data.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "mol_data.h" +#include "src/testutils/mol_data.h" #include diff --git a/src/testutils/substruct_validation.cu b/src/testutils/substruct_validation.cu index 19aebab9..1eaa8deb 100644 --- a/src/testutils/substruct_validation.cu +++ b/src/testutils/substruct_validation.cu @@ -20,12 +20,12 @@ #include #include -#include "cuda_error_check.h" -#include "device_vector.h" -#include "graph_labeler.cuh" -#include "molecules_device.cuh" -#include "substruct_search_internal.h" -#include "substruct_validation.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/substruct_search_internal.h" +#include "src/testutils/substruct_validation.h" namespace nvMolKit { diff --git a/src/testutils/substruct_validation.h b/src/testutils/substruct_validation.h index 53950356..565cc688 100644 --- a/src/testutils/substruct_validation.h +++ b/src/testutils/substruct_validation.h @@ -24,7 +24,7 @@ #include #include -#include "substruct_types.h" +#include "src/substruct/substruct_types.h" namespace nvMolKit { diff --git a/src/tfd/CMakeLists.txt b/src/tfd/CMakeLists.txt index 1eeafaf4..c4bd495b 100644 --- a/src/tfd/CMakeLists.txt +++ b/src/tfd/CMakeLists.txt @@ -19,7 +19,6 @@ target_link_libraries( tfd_cpu PRIVATE ${RDKit_LIBS} OpenMP::OpenMP_CXX openmp_helpers nvtx PUBLIC device_vector) -target_include_directories(tfd_cpu PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) # TFD GPU kernels add_library(tfd_kernels tfd_kernels.cu) @@ -27,7 +26,6 @@ target_link_libraries( tfd_kernels PRIVATE cuda_error_check PUBLIC device_vector) -target_include_directories(tfd_kernels PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) # TFD GPU orchestration add_library(tfd_gpu tfd_gpu.cpp) @@ -35,4 +33,3 @@ target_link_libraries( tfd_gpu PRIVATE tfd_kernels tfd_cpu ${RDKit_LIBS} nvtx PUBLIC device_vector device) -target_include_directories(tfd_gpu PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/tfd/tfd_common.cpp b/src/tfd/tfd_common.cpp index c39627c9..e8c8b74f 100644 --- a/src/tfd/tfd_common.cpp +++ b/src/tfd/tfd_common.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tfd_common.h" +#include "src/tfd/tfd_common.h" #include #include @@ -29,7 +29,7 @@ #include #include -#include "nvtx.h" +#include "src/utils/nvtx.h" namespace nvMolKit { diff --git a/src/tfd/tfd_common.h b/src/tfd/tfd_common.h index e85cf9e5..7bd30494 100644 --- a/src/tfd/tfd_common.h +++ b/src/tfd/tfd_common.h @@ -21,8 +21,8 @@ #include #include -#include "device_vector.h" -#include "tfd_types.h" +#include "src/utils/device_vector.h" +#include "src/tfd/tfd_types.h" namespace nvMolKit { diff --git a/src/tfd/tfd_cpu.cpp b/src/tfd/tfd_cpu.cpp index ef85ac97..ad259059 100644 --- a/src/tfd/tfd_cpu.cpp +++ b/src/tfd/tfd_cpu.cpp @@ -13,17 +13,17 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tfd_cpu.h" +#include "src/tfd/tfd_cpu.h" #include -#include "tfd_detail.h" +#include "src/tfd/tfd_detail.h" #ifdef _OPENMP #include #endif -#include "nvtx.h" +#include "src/utils/nvtx.h" namespace nvMolKit { diff --git a/src/tfd/tfd_cpu.h b/src/tfd/tfd_cpu.h index 4f043f14..7b99590f 100644 --- a/src/tfd/tfd_cpu.h +++ b/src/tfd/tfd_cpu.h @@ -18,7 +18,7 @@ #include -#include "tfd_common.h" +#include "src/tfd/tfd_common.h" namespace nvMolKit { diff --git a/src/tfd/tfd_gpu.cpp b/src/tfd/tfd_gpu.cpp index 1df862d9..04151f70 100644 --- a/src/tfd/tfd_gpu.cpp +++ b/src/tfd/tfd_gpu.cpp @@ -13,14 +13,14 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "tfd_gpu.h" +#include "src/tfd/tfd_gpu.h" #include #include -#include "nvtx.h" -#include "tfd_kernels.h" +#include "src/utils/nvtx.h" +#include "src/tfd/tfd_kernels.h" namespace nvMolKit { diff --git a/src/tfd/tfd_gpu.h b/src/tfd/tfd_gpu.h index 6560cb5f..b3fb46fa 100644 --- a/src/tfd/tfd_gpu.h +++ b/src/tfd/tfd_gpu.h @@ -18,8 +18,8 @@ #include -#include "device.h" -#include "tfd_common.h" +#include "src/utils/device.h" +#include "src/tfd/tfd_common.h" namespace nvMolKit { diff --git a/src/tfd/tfd_kernels.cu b/src/tfd/tfd_kernels.cu index 28c3314a..5042feff 100644 --- a/src/tfd/tfd_kernels.cu +++ b/src/tfd/tfd_kernels.cu @@ -13,9 +13,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "cuda_error_check.h" -#include "tfd_detail.h" -#include "tfd_kernels.h" +#include "src/utils/cuda_error_check.h" +#include "src/tfd/tfd_detail.h" +#include "src/tfd/tfd_kernels.h" namespace nvMolKit { diff --git a/src/tfd/tfd_kernels.h b/src/tfd/tfd_kernels.h index 190a5035..397a7e91 100644 --- a/src/tfd/tfd_kernels.h +++ b/src/tfd/tfd_kernels.h @@ -20,7 +20,7 @@ #include -#include "tfd_types.h" +#include "src/tfd/tfd_types.h" namespace nvMolKit { diff --git a/src/tfd/tfd_transfer.cu b/src/tfd/tfd_transfer.cu index 57de75a8..a5d0a172 100644 --- a/src/tfd/tfd_transfer.cu +++ b/src/tfd/tfd_transfer.cu @@ -13,8 +13,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "cuda_error_check.h" -#include "tfd_common.h" +#include "src/utils/cuda_error_check.h" +#include "src/tfd/tfd_common.h" namespace nvMolKit { diff --git a/src/triangle_smooth.cu b/src/triangle_smooth.cu index 226c0e38..4ae53e7a 100644 --- a/src/triangle_smooth.cu +++ b/src/triangle_smooth.cu @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include +#include "src/utils/cuda_error_check.h" #include #include -#include "triangle_smooth.h" +#include "src/triangle_smooth.h" namespace nvMolKit { diff --git a/src/triangle_smooth.h b/src/triangle_smooth.h index c10d605e..793c29e4 100644 --- a/src/triangle_smooth.h +++ b/src/triangle_smooth.h @@ -21,7 +21,7 @@ #include #include -#include "device_vector.h" +#include "src/utils/device_vector.h" namespace nvMolKit { //! GPU-compatible batch bounds matrix buffer for triangle smoothing operations on multiple molecules diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index 0e40c277..97dcd6d5 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -15,54 +15,38 @@ add_library(exceptions exceptions.cpp) target_link_libraries(exceptions PRIVATE CUDA::cudart) -target_include_directories(exceptions PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) target_compile_options(exceptions PRIVATE "-fPIC") add_library(cuda_error_check INTERFACE) target_link_libraries(cuda_error_check INTERFACE exceptions CUDA::cudart) -target_include_directories(cuda_error_check - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(device_vector INTERFACE) target_link_libraries(device_vector INTERFACE CUDA::cudart cuda_error_check cccl_interface) -target_include_directories(device_vector INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(host_vector INTERFACE) target_link_libraries(host_vector INTERFACE CUDA::cudart cuda_error_check) -target_include_directories(host_vector INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(pinned_host_allocator pinned_host_allocator.cpp) target_link_libraries(pinned_host_allocator PUBLIC host_vector) -target_include_directories(pinned_host_allocator - PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) add_library(device device.cpp) target_link_libraries(device PRIVATE CUDA::cudart cuda_error_check) -target_include_directories(device INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(rdkit_utils INTERFACE) -target_include_directories(rdkit_utils INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(work_splitting INTERFACE) -target_include_directories(work_splitting INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(nvtx INTERFACE) target_link_libraries(nvtx INTERFACE CUDA::nvtx3) -target_include_directories(nvtx INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(openmp_helpers openmp_helpers.cpp) target_link_libraries(openmp_helpers PRIVATE OpenMP::OpenMP_CXX) -target_include_directories(openmp_helpers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(cub_helpers INTERFACE) target_link_libraries(cub_helpers INTERFACE CUDA::cudart) -target_include_directories(cub_helpers INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(device_timings INTERFACE) target_link_libraries(device_timings INTERFACE cuda_error_check) -target_include_directories(device_timings INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) add_library(thread_safe_queue INTERFACE) -target_include_directories(thread_safe_queue - INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/src/utils/cuda_error_check.h b/src/utils/cuda_error_check.h index f634507a..1185a6af 100644 --- a/src/utils/cuda_error_check.h +++ b/src/utils/cuda_error_check.h @@ -19,7 +19,7 @@ #include #include "cuda_runtime.h" -#include "exceptions.h" +#include "src/utils/exceptions.h" //! Checks a CUDA return code, throwing a CudaBadReturnCode error //! if nonzero, and printing out line info if in debug mode. diff --git a/src/utils/device.cpp b/src/utils/device.cpp index bbdda60c..6e447ba6 100644 --- a/src/utils/device.cpp +++ b/src/utils/device.cpp @@ -13,12 +13,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "device.h" +#include "src/utils/device.h" #include -#include "cuda_error_check.h" -#include "nvtx.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/nvtx.h" namespace nvMolKit { diff --git a/src/utils/device_timings.cuh b/src/utils/device_timings.cuh index 80dab262..5f7aa930 100644 --- a/src/utils/device_timings.cuh +++ b/src/utils/device_timings.cuh @@ -22,7 +22,7 @@ #include #include -#include "cuda_error_check.h" +#include "src/utils/cuda_error_check.h" namespace nvMolKit { diff --git a/src/utils/device_vector.h b/src/utils/device_vector.h index ffcddecb..b81041e3 100644 --- a/src/utils/device_vector.h +++ b/src/utils/device_vector.h @@ -23,7 +23,7 @@ #include #include -#include "cuda_error_check.h" +#include "src/utils/cuda_error_check.h" namespace nvMolKit { diff --git a/src/utils/exceptions.cpp b/src/utils/exceptions.cpp index 73226633..60b97e73 100644 --- a/src/utils/exceptions.cpp +++ b/src/utils/exceptions.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "exceptions.h" +#include "src/utils/exceptions.h" #include diff --git a/src/utils/host_vector.h b/src/utils/host_vector.h index f42a17b6..6fafd3d9 100644 --- a/src/utils/host_vector.h +++ b/src/utils/host_vector.h @@ -28,7 +28,7 @@ #include #include -#include "cuda_error_check.h" +#include "src/utils/cuda_error_check.h" namespace nvMolKit { diff --git a/src/utils/openmp_helpers.cpp b/src/utils/openmp_helpers.cpp index be78ed8e..089d3aa3 100644 --- a/src/utils/openmp_helpers.cpp +++ b/src/utils/openmp_helpers.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "openmp_helpers.h" +#include "src/utils/openmp_helpers.h" namespace nvMolKit { namespace detail { diff --git a/src/utils/pinned_host_allocator.cpp b/src/utils/pinned_host_allocator.cpp index 71e697b1..60ba7a35 100644 --- a/src/utils/pinned_host_allocator.cpp +++ b/src/utils/pinned_host_allocator.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "pinned_host_allocator.h" +#include "src/utils/pinned_host_allocator.h" #include diff --git a/src/utils/pinned_host_allocator.h b/src/utils/pinned_host_allocator.h index cc50f711..1d93836c 100644 --- a/src/utils/pinned_host_allocator.h +++ b/src/utils/pinned_host_allocator.h @@ -21,7 +21,7 @@ #include #include -#include "host_vector.h" +#include "src/utils/host_vector.h" namespace nvMolKit { diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9a517158..011b7999 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -74,7 +74,6 @@ target_link_libraries( add_executable(smarts_filter smarts_filter.cpp) target_link_libraries(smarts_filter PRIVATE molecules molData ${RDKit_LIBS}) -target_include_directories(smarts_filter PRIVATE ${PROJECT_SOURCE_DIR}/src) add_executable(test_flattened_builder test_flattened_builder.cu) target_link_libraries( @@ -187,6 +186,7 @@ target_link_libraries( PRIVATE bfgs batched_forcefield mmff_batched_forcefield + rdkit_mmff_flattened device_vector ${RDKit_LIBS} test_utils diff --git a/tests/integration/test_fp_sim_workflow.cpp b/tests/integration/test_fp_sim_workflow.cpp index c47d83f7..398e863f 100644 --- a/tests/integration/test_fp_sim_workflow.cpp +++ b/tests/integration/test_fp_sim_workflow.cpp @@ -21,9 +21,9 @@ #include #include -#include "mol_data.h" -#include "morgan_fingerprint.h" -#include "similarity.h" +#include "src/testutils/mol_data.h" +#include "src/morgan_fingerprint.h" +#include "src/similarity.h" std::vector makeMolsView(const std::vector>& mols) { std::vector molsView; diff --git a/tests/smarts_filter.cpp b/tests/smarts_filter.cpp index 7b199c8c..1932b126 100644 --- a/tests/smarts_filter.cpp +++ b/tests/smarts_filter.cpp @@ -34,8 +34,8 @@ #include #include -#include "molecules.h" -#include "testutils/mol_data.h" +#include "src/substruct/molecules.h" +#include "src/testutils/mol_data.h" namespace { diff --git a/tests/test_bfgs_hessian.cpp b/tests/test_bfgs_hessian.cpp index a9c23a57..c79066fd 100644 --- a/tests/test_bfgs_hessian.cpp +++ b/tests/test_bfgs_hessian.cpp @@ -19,8 +19,8 @@ #include #include -#include "../src/minimizer/bfgs_hessian.h" -#include "device_vector.h" +#include "src/minimizer/bfgs_hessian.h" +#include "src/utils/device_vector.h" namespace nvMolKit { diff --git a/tests/test_bfgs_minimizer.cu b/tests/test_bfgs_minimizer.cu index ed7bf04e..ca04340e 100644 --- a/tests/test_bfgs_minimizer.cu +++ b/tests/test_bfgs_minimizer.cu @@ -29,14 +29,14 @@ #include -#include "../rdkit_extensions/mmff_flattened_builder.h" -#include "batched_forcefield.h" -#include "bfgs_minimize.h" -#include "device.h" -#include "forcefield_constraints.h" -#include "mmff.h" -#include "mmff_batched_forcefield.h" -#include "test_utils.h" +#include "rdkit_extensions/mmff_flattened_builder.h" +#include "src/forcefields/batched_forcefield.h" +#include "src/minimizer/bfgs_minimize.h" +#include "src/utils/device.h" +#include "src/forcefields/forcefield_constraints.h" +#include "src/forcefields/mmff.h" +#include "src/forcefields/mmff_batched_forcefield.h" +#include "tests/test_utils.h" using ::nvMolKit::MMFF::BatchedMolecularDeviceBuffers; using ::nvMolKit::MMFF::BatchedMolecularSystemHost; diff --git a/tests/test_boolean_tree.cu b/tests/test_boolean_tree.cu index b1246eb4..52870e20 100644 --- a/tests/test_boolean_tree.cu +++ b/tests/test_boolean_tree.cu @@ -17,10 +17,10 @@ #include -#include "boolean_tree.cuh" -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" +#include "src/substruct/boolean_tree.cuh" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" using nvMolKit::AsyncDeviceVector; using nvMolKit::AtomDataPacked; diff --git a/tests/test_butina.cpp b/tests/test_butina.cpp index 18871c05..d7bf3de4 100644 --- a/tests/test_butina.cpp +++ b/tests/test_butina.cpp @@ -24,9 +24,9 @@ #include #include -#include "butina.h" -#include "device.h" -#include "host_vector.h" +#include "src/butina.h" +#include "src/utils/device.h" +#include "src/utils/host_vector.h" using nvMolKit::AsyncDeviceVector; diff --git a/tests/test_conformer_checkers.cpp b/tests/test_conformer_checkers.cpp index 6663f792..fcab6ffe 100644 --- a/tests/test_conformer_checkers.cpp +++ b/tests/test_conformer_checkers.cpp @@ -18,7 +18,7 @@ #include -#include "conformer_checkers.h" +#include "src/testutils/conformer_checkers.h" #include "gtest/gtest.h" class ConformerCheckersTest : public ::testing::Test { diff --git a/tests/test_coordgen.cu b/tests/test_coordgen.cu index 932e9654..4177f730 100644 --- a/tests/test_coordgen.cu +++ b/tests/test_coordgen.cu @@ -25,11 +25,11 @@ #include -#include "bounds_matrix.h" -#include "coord_gen.h" -#include "device_vector.h" -#include "symmetric_eigensolver.h" -#include "test_utils.h" +#include "rdkit_extensions/bounds_matrix.h" +#include "src/forcefields/coord_gen.h" +#include "src/utils/device_vector.h" +#include "src/symmetric_eigensolver.h" +#include "tests/test_utils.h" using namespace nvMolKit; diff --git a/tests/test_cuda_error_check.cpp b/tests/test_cuda_error_check.cpp index 93a58330..1b903a4b 100644 --- a/tests/test_cuda_error_check.cpp +++ b/tests/test_cuda_error_check.cpp @@ -15,7 +15,7 @@ #include -#include "cuda_error_check.h" +#include "src/utils/cuda_error_check.h" using namespace nvMolKit; diff --git a/tests/test_device.cpp b/tests/test_device.cpp index c68e564c..fa01976a 100644 --- a/tests/test_device.cpp +++ b/tests/test_device.cpp @@ -16,8 +16,8 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" using namespace nvMolKit; diff --git a/tests/test_device_timings.cu b/tests/test_device_timings.cu index 9013b957..0bb43773 100644 --- a/tests/test_device_timings.cu +++ b/tests/test_device_timings.cu @@ -16,8 +16,8 @@ #include #include -#include "cuda_error_check.h" -#include "device_timings.cuh" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_timings.cuh" using namespace nvMolKit; diff --git a/tests/test_device_vector.cpp b/tests/test_device_vector.cpp index d7916050..94da8d02 100644 --- a/tests/test_device_vector.cpp +++ b/tests/test_device_vector.cpp @@ -16,8 +16,8 @@ #include #include -#include "cuda_error_check.h" -#include "device_vector.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" using namespace nvMolKit; diff --git a/tests/test_distgeom.cu b/tests/test_distgeom.cu index ed7a2837..b70dbcec 100644 --- a/tests/test_distgeom.cu +++ b/tests/test_distgeom.cu @@ -29,15 +29,15 @@ #include #include -#include "device_vector.h" -#include "dg_batched_forcefield.h" -#include "dist_geom.h" -#include "dist_geom_flattened_builder.h" -#include "dist_geom_kernels.h" -#include "embedder_utils.h" -#include "ff_utils.h" -#include "kernel_utils.cuh" -#include "test_utils.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/dg_batched_forcefield.h" +#include "src/forcefields/dist_geom.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/embedder_utils.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/kernel_utils.cuh" +#include "tests/test_utils.h" using namespace nvMolKit::DistGeom; using nvMolKit::AsyncDeviceVector; diff --git a/tests/test_distgeom_kernels.cu b/tests/test_distgeom_kernels.cu index 1d8e97b2..3becaac9 100644 --- a/tests/test_distgeom_kernels.cu +++ b/tests/test_distgeom_kernels.cu @@ -28,12 +28,12 @@ #include #include -#include "../rdkit_extensions/dist_geom_flattened_builder.h" -#include "bounds_matrix.h" -#include "dist_geom.h" -#include "dist_geom_kernels.h" -#include "embedder_utils.h" -#include "test_utils.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "rdkit_extensions/bounds_matrix.h" +#include "src/forcefields/dist_geom.h" +#include "src/forcefields/dist_geom_kernels.h" +#include "src/embedder_utils.h" +#include "tests/test_utils.h" namespace { diff --git a/tests/test_etkdg.cu b/tests/test_etkdg.cu index e307fb78..4cce26a7 100644 --- a/tests/test_etkdg.cu +++ b/tests/test_etkdg.cu @@ -22,17 +22,17 @@ #include #include -#include "conformer_pruning.h" -#include "device.h" -#include "dist_geom.h" -#include "embedder_utils.h" -#include "etkdg.h" -#include "etkdg_impl.h" -#include "etkdg_stage_coordgen.h" -#include "etkdg_stage_update_conformers.h" -#include "minimizer/bfgs_minimize.h" -#include "test_utils.h" -#include "utils/host_vector.h" +#include "rdkit_extensions/conformer_pruning.h" +#include "src/utils/device.h" +#include "src/forcefields/dist_geom.h" +#include "src/embedder_utils.h" +#include "src/etkdg.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_coordgen.h" +#include "src/etkdg_stage_update_conformers.h" +#include "src/minimizer/bfgs_minimize.h" +#include "tests/test_utils.h" +#include "src/utils/host_vector.h" using ::nvMolKit::detail::ETKDGContext; using ::nvMolKit::detail::ETKDGDriver; diff --git a/tests/test_etkdg_coordgen.cu b/tests/test_etkdg_coordgen.cu index 76d6322d..78b7726e 100644 --- a/tests/test_etkdg_coordgen.cu +++ b/tests/test_etkdg_coordgen.cu @@ -18,11 +18,11 @@ #include #include -#include "coord_gen.h" -#include "device_vector.h" -#include "etkdg_impl.h" -#include "etkdg_stage_coordgen.h" -#include "test_utils.h" +#include "src/forcefields/coord_gen.h" +#include "src/utils/device_vector.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_coordgen.h" +#include "tests/test_utils.h" using ::nvMolKit::detail::ETKDGContext; using ::nvMolKit::detail::ETKDGCoordGenStage; diff --git a/tests/test_etkdg_etk_minimize.cu b/tests/test_etkdg_etk_minimize.cu index 852ee7ed..58fd6442 100644 --- a/tests/test_etkdg_etk_minimize.cu +++ b/tests/test_etkdg_etk_minimize.cu @@ -19,12 +19,12 @@ #include #include -#include "etkdg_impl.h" -#include "etkdg_stage_etk_minimization.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_etk_minimization.h" #include "gmock/gmock.h" #include "gtest/gtest.h" -#include "minimizer/bfgs_minimize.h" -#include "test_utils.h" +#include "src/minimizer/bfgs_minimize.h" +#include "tests/test_utils.h" constexpr int DIM = 4; void initTestComponentsCommon(const std::vector& mols, ETKDGContext& context, diff --git a/tests/test_etkdg_minimize.cu b/tests/test_etkdg_minimize.cu index 59d8d912..7c2c5f43 100644 --- a/tests/test_etkdg_minimize.cu +++ b/tests/test_etkdg_minimize.cu @@ -23,13 +23,13 @@ #include -#include "dist_geom.h" -#include "embedder_utils.h" -#include "etkdg_impl.h" -#include "etkdg_stage_coordgen.h" -#include "etkdg_stage_distgeom_minimize.h" -#include "test_utils.h" -#include "utils/host_vector.h" +#include "src/forcefields/dist_geom.h" +#include "src/embedder_utils.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_coordgen.h" +#include "src/etkdg_stage_distgeom_minimize.h" +#include "tests/test_utils.h" +#include "src/utils/host_vector.h" using namespace ::nvMolKit::detail; diff --git a/tests/test_etkdg_result_tracker.cpp b/tests/test_etkdg_result_tracker.cpp index c7bc04e6..89b8c475 100644 --- a/tests/test_etkdg_result_tracker.cpp +++ b/tests/test_etkdg_result_tracker.cpp @@ -21,7 +21,7 @@ #include #include -#include "../src/etkdg_impl.h" +#include "src/etkdg_impl.h" using namespace nvMolKit::detail; diff --git a/tests/test_etkdg_stereochem_checks.cu b/tests/test_etkdg_stereochem_checks.cu index 416a394f..bfce17c8 100644 --- a/tests/test_etkdg_stereochem_checks.cu +++ b/tests/test_etkdg_stereochem_checks.cu @@ -25,11 +25,11 @@ #include #include -#include "dist_geom.h" -#include "embedder_utils.h" -#include "etkdg_impl.h" -#include "etkdg_stage_stereochem_checks.h" -#include "test_utils.h" +#include "src/forcefields/dist_geom.h" +#include "src/embedder_utils.h" +#include "src/etkdg_impl.h" +#include "src/etkdg_stage_stereochem_checks.h" +#include "tests/test_utils.h" using namespace ::nvMolKit::detail; diff --git a/tests/test_flat_bit_vect.cpp b/tests/test_flat_bit_vect.cpp index b23c95f5..997a50c0 100644 --- a/tests/test_flat_bit_vect.cpp +++ b/tests/test_flat_bit_vect.cpp @@ -19,7 +19,7 @@ #include #include -#include "flat_bit_vect.h" +#include "src/data_structures/flat_bit_vect.h" constexpr std::array nBitsTest = {3, 32, 33, 1024, 1025}; constexpr std::array wantSizes = {1, 1, 2, 32, 33}; diff --git a/tests/test_flat_bit_vect_device.cu b/tests/test_flat_bit_vect_device.cu index e70601a4..b263de97 100644 --- a/tests/test_flat_bit_vect_device.cu +++ b/tests/test_flat_bit_vect_device.cu @@ -15,10 +15,10 @@ #include -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" -#include "flat_bit_vect.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/data_structures/flat_bit_vect.h" using nvMolKit::AsyncDeviceVector; using nvMolKit::BitMatrix2DView; diff --git a/tests/test_flattened_builder.cu b/tests/test_flattened_builder.cu index 575682a1..49498876 100644 --- a/tests/test_flattened_builder.cu +++ b/tests/test_flattened_builder.cu @@ -21,10 +21,10 @@ #include -#include "dist_geom_flattened_builder.h" -#include "embedder_utils.h" -#include "mmff_flattened_builder.h" -#include "test_utils.h" +#include "rdkit_extensions/dist_geom_flattened_builder.h" +#include "src/embedder_utils.h" +#include "rdkit_extensions/mmff_flattened_builder.h" +#include "tests/test_utils.h" TEST(FlattenedBuilderTest, NullMolecule) { RDKit::ROMol mol; diff --git a/tests/test_graph_labeler.cu b/tests/test_graph_labeler.cu index 65890c07..e7538812 100644 --- a/tests/test_graph_labeler.cu +++ b/tests/test_graph_labeler.cu @@ -21,13 +21,13 @@ #include #include -#include "atom_data_packed.h" -#include "cuda_error_check.h" -#include "device.h" -#include "graph_labeler.cuh" -#include "molecules.h" -#include "molecules_device.cuh" -#include "testutils/substruct_validation.h" +#include "src/substruct/atom_data_packed.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/testutils/substruct_validation.h" using nvMolKit::addQueryToBatch; using nvMolKit::AtomQuery; diff --git a/tests/test_graph_labeler_recursive.cu b/tests/test_graph_labeler_recursive.cu index 0fdb9644..03ce937a 100644 --- a/tests/test_graph_labeler_recursive.cu +++ b/tests/test_graph_labeler_recursive.cu @@ -20,17 +20,17 @@ #include #include -#include "boolean_tree.cuh" -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" -#include "graph_labeler.cuh" -#include "molecules.h" -#include "molecules_device.cuh" -#include "substruct_search.h" -#include "substruct_search_internal.h" -#include "substruct_types.h" -#include "testutils/substruct_validation.h" +#include "src/substruct/boolean_tree.cuh" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/substruct_search.h" +#include "src/substruct/substruct_search_internal.h" +#include "src/substruct/substruct_types.h" +#include "src/testutils/substruct_validation.h" using nvMolKit::addQueryToBatch; using nvMolKit::addToBatch; diff --git a/tests/test_host_vector.cu b/tests/test_host_vector.cu index ffc7362e..530b6ee0 100644 --- a/tests/test_host_vector.cu +++ b/tests/test_host_vector.cu @@ -20,9 +20,9 @@ #include #include -#include "cuda_error_check.h" -#include "device_vector.h" -#include "host_vector.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device_vector.h" +#include "src/utils/host_vector.h" using namespace nvMolKit; diff --git a/tests/test_minibatch_planner.cpp b/tests/test_minibatch_planner.cpp index 29188c85..501f9576 100644 --- a/tests/test_minibatch_planner.cpp +++ b/tests/test_minibatch_planner.cpp @@ -23,11 +23,11 @@ #include #include -#include "minibatch_planner.h" -#include "molecules.h" -#include "pinned_buffer_pool.h" -#include "recursive_preprocessor.h" -#include "thread_worker_context.h" +#include "src/substruct/minibatch_planner.h" +#include "src/substruct/molecules.h" +#include "src/substruct/pinned_buffer_pool.h" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/thread_worker_context.h" using nvMolKit::kMaxSmartsNestingDepth; using nvMolKit::LeafSubpatterns; diff --git a/tests/test_mmff.cu b/tests/test_mmff.cu index 6fb3c30d..50fe669f 100644 --- a/tests/test_mmff.cu +++ b/tests/test_mmff.cu @@ -35,17 +35,17 @@ #include #include -#include "bfgs_mmff.h" -#include "device.h" -#include "ff_utils.h" -#include "forcefield_constraints.h" -#include "kernel_utils.cuh" -#include "mmff.h" -#include "mmff_batched_forcefield.h" -#include "mmff_flattened_builder.h" -#include "mmff_kernels.h" -#include "mmff_optimize.h" -#include "test_utils.h" +#include "src/minimizer/bfgs_mmff.h" +#include "src/utils/device.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/forcefield_constraints.h" +#include "src/forcefields/kernel_utils.cuh" +#include "src/forcefields/mmff.h" +#include "src/forcefields/mmff_batched_forcefield.h" +#include "rdkit_extensions/mmff_flattened_builder.h" +#include "src/forcefields/mmff_kernels.h" +#include "rdkit_extensions/mmff_optimize.h" +#include "tests/test_utils.h" using namespace nvMolKit::MMFF; constexpr double GRAD_TOL = 1.0e-4; diff --git a/tests/test_molecules.cu b/tests/test_molecules.cu index 2f23f6c1..16d1f453 100644 --- a/tests/test_molecules.cu +++ b/tests/test_molecules.cu @@ -23,11 +23,11 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "molecules_device.cuh" -#include "packed_bonds_device.cuh" -#include "rdkit_compat.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/packed_bonds_device.cuh" +#include "src/utils/rdkit_compat.h" using nvMolKit::AsyncDeviceVector; using nvMolKit::AtomDataPacked; diff --git a/tests/test_morgan_fingerprint.cpp b/tests/test_morgan_fingerprint.cpp index b221fae3..f3baaad8 100644 --- a/tests/test_morgan_fingerprint.cpp +++ b/tests/test_morgan_fingerprint.cpp @@ -21,9 +21,9 @@ #include #include -#include "mol_data.h" -#include "morgan_fingerprint.h" -#include "rdkit_ownership_wrap.h" +#include "src/testutils/mol_data.h" +#include "src/morgan_fingerprint.h" +#include "src/utils/rdkit_ownership_wrap.h" namespace { diff --git a/tests/test_openmp_helpers.cpp b/tests/test_openmp_helpers.cpp index 857efeb6..2e2cd961 100644 --- a/tests/test_openmp_helpers.cpp +++ b/tests/test_openmp_helpers.cpp @@ -21,7 +21,7 @@ #include #include -#include "openmp_helpers.h" +#include "src/utils/openmp_helpers.h" namespace { diff --git a/tests/test_pinned_host_allocator.cpp b/tests/test_pinned_host_allocator.cpp index dc3a041c..7f7db20d 100644 --- a/tests/test_pinned_host_allocator.cpp +++ b/tests/test_pinned_host_allocator.cpp @@ -20,7 +20,7 @@ #include #include -#include "pinned_host_allocator.h" +#include "src/utils/pinned_host_allocator.h" using namespace nvMolKit; diff --git a/tests/test_query.cu b/tests/test_query.cu index 33860d17..bf4dec76 100644 --- a/tests/test_query.cu +++ b/tests/test_query.cu @@ -24,9 +24,9 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "molecules_device.cuh" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/substruct/molecules_device.cuh" using nvMolKit::AsyncDeviceVector; using nvMolKit::checkReturnCode; diff --git a/tests/test_rdkit_bounds_matrix.cpp b/tests/test_rdkit_bounds_matrix.cpp index 591cb6d7..26e03cb2 100644 --- a/tests/test_rdkit_bounds_matrix.cpp +++ b/tests/test_rdkit_bounds_matrix.cpp @@ -19,7 +19,7 @@ #include #include -#include "bounds_matrix.h" +#include "rdkit_extensions/bounds_matrix.h" namespace nvMolKit { namespace test { diff --git a/tests/test_recursive_preprocessor.cu b/tests/test_recursive_preprocessor.cu index ffa38749..694c7b5e 100644 --- a/tests/test_recursive_preprocessor.cu +++ b/tests/test_recursive_preprocessor.cu @@ -23,14 +23,14 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" -#include "molecules.h" -#include "molecules_device.cuh" -#include "recursive_preprocessor.h" -#include "substruct_search_internal.h" -#include "substruct_types.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/recursive_preprocessor.h" +#include "src/substruct/substruct_search_internal.h" +#include "src/substruct/substruct_types.h" using nvMolKit::AsyncDeviceVector; using nvMolKit::BatchedPatternEntry; diff --git a/tests/test_similarity.cpp b/tests/test_similarity.cpp index c3f15881..6dea5518 100644 --- a/tests/test_similarity.cpp +++ b/tests/test_similarity.cpp @@ -24,7 +24,7 @@ #include #include -#include "similarity.h" +#include "src/similarity.h" using namespace RDKit; using namespace nvMolKit; diff --git a/tests/test_substruct_algos.cu b/tests/test_substruct_algos.cu index acd8cafa..a8dcaa4e 100644 --- a/tests/test_substruct_algos.cu +++ b/tests/test_substruct_algos.cu @@ -19,17 +19,17 @@ #include #include -#include "atom_data_packed.h" -#include "cuda_error_check.h" -#include "device.h" -#include "device_vector.h" -#include "flat_bit_vect.h" -#include "graph_labeler.cuh" -#include "molecules.h" -#include "molecules_device.cuh" -#include "packed_bonds.h" -#include "substruct_algos.cuh" -#include "substruct_types.h" +#include "src/substruct/atom_data_packed.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/utils/device_vector.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/packed_bonds.h" +#include "src/substruct/substruct_algos.cuh" +#include "src/substruct/substruct_types.h" using nvMolKit::AsyncDeviceVector; using nvMolKit::AtomDataPacked; diff --git a/tests/test_substruct_integration.cu b/tests/test_substruct_integration.cu index bac46dab..e56fab24 100644 --- a/tests/test_substruct_integration.cu +++ b/tests/test_substruct_integration.cu @@ -26,12 +26,12 @@ #include #include -#include "device.h" -#include "graph_labeler.cuh" -#include "substruct_search.h" -#include "test_utils.h" -#include "testutils/mol_data.h" -#include "testutils/substruct_validation.h" +#include "src/utils/device.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/substruct/substruct_search.h" +#include "tests/test_utils.h" +#include "src/testutils/mol_data.h" +#include "src/testutils/substruct_validation.h" using nvMolKit::countCudaDevices; diff --git a/tests/test_substruct_label_integration.cu b/tests/test_substruct_label_integration.cu index e827b1f5..dbfe89d3 100644 --- a/tests/test_substruct_label_integration.cu +++ b/tests/test_substruct_label_integration.cu @@ -27,15 +27,15 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "flat_bit_vect.h" -#include "graph_labeler.cuh" -#include "mol_data.h" -#include "molecules.h" -#include "molecules_device.cuh" -#include "substruct_search.h" -#include "test_utils.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/data_structures/flat_bit_vect.h" +#include "src/substruct/graph_labeler.cuh" +#include "src/testutils/mol_data.h" +#include "src/substruct/molecules.h" +#include "src/substruct/molecules_device.cuh" +#include "src/substruct/substruct_search.h" +#include "tests/test_utils.h" using nvMolKit::addQueryToBatch; using nvMolKit::addToBatch; diff --git a/tests/test_substruct_search.cu b/tests/test_substruct_search.cu index c0333bf7..9c038acd 100644 --- a/tests/test_substruct_search.cu +++ b/tests/test_substruct_search.cu @@ -22,10 +22,10 @@ #include #include -#include "cuda_error_check.h" -#include "device.h" -#include "substruct_search.h" -#include "testutils/substruct_validation.h" +#include "src/utils/cuda_error_check.h" +#include "src/utils/device.h" +#include "src/substruct/substruct_search.h" +#include "src/testutils/substruct_validation.h" using nvMolKit::algorithmName; using nvMolKit::checkReturnCode; diff --git a/tests/test_tfd.cpp b/tests/test_tfd.cpp index 14e69f99..d9947036 100644 --- a/tests/test_tfd.cpp +++ b/tests/test_tfd.cpp @@ -21,8 +21,8 @@ #include #include -#include "tfd_cpu.h" -#include "tfd_gpu.h" +#include "src/tfd/tfd_cpu.h" +#include "src/tfd/tfd_gpu.h" namespace { diff --git a/tests/test_tfd_cpu.cpp b/tests/test_tfd_cpu.cpp index 34dfaf27..dacabe82 100644 --- a/tests/test_tfd_cpu.cpp +++ b/tests/test_tfd_cpu.cpp @@ -23,8 +23,8 @@ #include #include -#include "tfd_common.h" -#include "tfd_cpu.h" +#include "src/tfd/tfd_common.h" +#include "src/tfd/tfd_cpu.h" namespace { diff --git a/tests/test_tfd_gpu.cpp b/tests/test_tfd_gpu.cpp index afa476af..e6413d6d 100644 --- a/tests/test_tfd_gpu.cpp +++ b/tests/test_tfd_gpu.cpp @@ -22,8 +22,8 @@ #include #include -#include "tfd_cpu.h" -#include "tfd_gpu.h" +#include "src/tfd/tfd_cpu.h" +#include "src/tfd/tfd_gpu.h" namespace { diff --git a/tests/test_tfd_kernels.cu b/tests/test_tfd_kernels.cu index 9e091e78..574f9ecb 100644 --- a/tests/test_tfd_kernels.cu +++ b/tests/test_tfd_kernels.cu @@ -22,9 +22,9 @@ #include #include -#include "tfd_common.h" -#include "tfd_cpu.h" -#include "tfd_kernels.h" +#include "src/tfd/tfd_common.h" +#include "src/tfd/tfd_cpu.h" +#include "src/tfd/tfd_kernels.h" namespace { diff --git a/tests/test_thread_safe_queue.cpp b/tests/test_thread_safe_queue.cpp index 09ebc1e7..e66c3d5e 100644 --- a/tests/test_thread_safe_queue.cpp +++ b/tests/test_thread_safe_queue.cpp @@ -21,7 +21,7 @@ #include #include -#include "thread_safe_queue.h" +#include "src/utils/thread_safe_queue.h" using nvMolKit::ThreadSafeQueue; diff --git a/tests/test_triangle_smooth.cu b/tests/test_triangle_smooth.cu index 7b6001f7..12759eac 100644 --- a/tests/test_triangle_smooth.cu +++ b/tests/test_triangle_smooth.cu @@ -29,8 +29,8 @@ #include #include -#include "test_utils.h" -#include "triangle_smooth.h" +#include "tests/test_utils.h" +#include "src/triangle_smooth.h" namespace { void initETKDG(const RDKit::ROMol* mol, diff --git a/tests/test_uff.cu b/tests/test_uff.cu index c74682a7..de02e930 100644 --- a/tests/test_uff.cu +++ b/tests/test_uff.cu @@ -33,14 +33,14 @@ #include #include -#include "device_vector.h" -#include "ff_utils.h" -#include "forcefield_constraints.h" -#include "minimizer/bfgs_minimize.h" -#include "test_utils.h" -#include "uff.h" -#include "uff_batched_forcefield.h" -#include "uff_flattened_builder.h" +#include "src/utils/device_vector.h" +#include "src/forcefields/ff_utils.h" +#include "src/forcefields/forcefield_constraints.h" +#include "src/minimizer/bfgs_minimize.h" +#include "tests/test_utils.h" +#include "src/forcefields/uff.h" +#include "src/forcefields/uff_batched_forcefield.h" +#include "rdkit_extensions/uff_flattened_builder.h" using namespace nvMolKit::UFF; using nvMolKit::AsyncDeviceVector; diff --git a/tests/test_utils.cpp b/tests/test_utils.cpp index 0beb6bd8..a3a01b4d 100644 --- a/tests/test_utils.cpp +++ b/tests/test_utils.cpp @@ -13,7 +13,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "test_utils.h" +#include "tests/test_utils.h" #include #include diff --git a/tests/test_work_splitting.cpp b/tests/test_work_splitting.cpp index ce8a51c0..d1159f74 100644 --- a/tests/test_work_splitting.cpp +++ b/tests/test_work_splitting.cpp @@ -14,7 +14,7 @@ // limitations under the License. #include "gtest/gtest.h" -#include "work_splitting.h" +#include "src/utils/work_splitting.h" TEST(WorkSplitting, SplitToThreads) { EXPECT_EQ(nvMolKit::computeElementsPerThread(10, 2), 5); From 5ae3b59de837188f0facd6b596b412dad453f58d Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Mon, 1 Jun 2026 11:13:36 -0400 Subject: [PATCH 2/4] Formatting --- admin/run_include_check.sh | 2 +- src/substruct/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/run_include_check.sh b/admin/run_include_check.sh index 63dcf4d1..e971b2c2 100755 --- a/admin/run_include_check.sh +++ b/admin/run_include_check.sh @@ -1,5 +1,5 @@ #!/bin/bash -# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/src/substruct/CMakeLists.txt b/src/substruct/CMakeLists.txt index 0d297a5d..a51f7152 100644 --- a/src/substruct/CMakeLists.txt +++ b/src/substruct/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. # All rights reserved. SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); you may not From 14ac4400c1bedea0f3fbc11a605d68e947080fa4 Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Mon, 1 Jun 2026 11:31:25 -0400 Subject: [PATCH 3/4] Fix missing include --- src/forcefields/dist_geom_kernels_device.cuh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/forcefields/dist_geom_kernels_device.cuh b/src/forcefields/dist_geom_kernels_device.cuh index 193dc07a..671a1ab6 100644 --- a/src/forcefields/dist_geom_kernels_device.cuh +++ b/src/forcefields/dist_geom_kernels_device.cuh @@ -18,6 +18,7 @@ #include +#include "src/forcefields/dist_geom_kernels.h" #include "src/forcefields/kernel_utils.cuh" #ifndef M_PI From f1a8f52f5098abcb1c2802e3493d7a1d1a9d7221 Mon Sep 17 00:00:00 2001 From: Kevin Boyd Date: Tue, 2 Jun 2026 12:27:06 -0400 Subject: [PATCH 4/4] Fix review suggestion --- admin/include_check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/include_check.py b/admin/include_check.py index 3f340f3b..fb4d9e29 100755 --- a/admin/include_check.py +++ b/admin/include_check.py @@ -188,7 +188,7 @@ def process_line( ) if rewritten is None: # Already-correct quoted form, system include, or third-party. - if close_char == ">" and rewritten is None and reason is None: + if close_char == ">" and reason is None: # Detect angle-bracket project headers that should be quoted. base = include_str.rsplit("/", 1)[-1] matches = header_index.get(base, [])