Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions recipes/cuik-molmaker/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo off
REM Get Python version from conda-build environment (e.g., 3.11, 3.12, 3.13)
set PYTHON_VERSION=%PY_VER%

set CUIKMOLMAKER_CXX11_ABI=ON

REM Validate RDKit version format (year.minor.patch)
echo RDKIT_VERSION=%RDKIT_VERSION%
echo PYTHON_VERSION=%PYTHON_VERSION%

echo CONDA_PREFIX:
echo %CONDA_PREFIX%
echo BUILD_PREFIX:
echo %BUILD_PREFIX%

REM Build C++ extension
%PYTHON% setup.py build_ext --inplace
if errorlevel 1 exit 1

REM Set the wheel directory
set WHL_DIR=cm_py%PYTHON_VERSION%_rdkit-%RDKIT_VERSION%_dist

REM Build wheel
%PYTHON% setup.py bdist_wheel --dist-dir %WHL_DIR%

for %%f in ("%WHL_DIR%\*.whl") do (
set "WHL_FILE=%%f"
goto found_whl
)

:found_whl
%PYTHON% -m pip install --no-deps --no-build-isolation --prefix=%PREFIX% "%WHL_FILE%"
if errorlevel 1 exit 1


echo PREFIX:
echo %PREFIX%

43 changes: 43 additions & 0 deletions recipes/cuik-molmaker/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Get Python version from conda-build environment (e.g., 3.11, 3.12, 3.13)
export PYTHON_VERSION=${PY_VER}

CXX11_ABI="ON"

# Validate RDKit version format (year.minor.patch)
if [[ ! $RDKIT_VERSION =~ ^[0-9]{4}\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: RDKit version must be in the format: year.minor.patch (e.g., 2023.3.4)"
exit 1
fi

# Validate Python version
if [[ ! $PYTHON_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
echo "Error: Python version must be in the format: year.minor (e.g., 3.11)"
exit 1
fi

echo "CONDA_PREFIX:"
echo "${CONDA_PREFIX}"
echo "BUILD_PREFIX:"
echo "${BUILD_PREFIX}"
set -x

# Hack for RDkit expecting things in python3.9 folder
# ln -s $CONDA_PREFIX/lib/python$PYTHON_VERSION $CONDA_PREFIX/lib/python3.9
# ln -s $CONDA_PREFIX/include/python$PYTHON_VERSION $CONDA_PREFIX/include/python3.9

# Build C++ extension
RDKIT_VERSION=${RDKIT_VERSION} PYTHON_VERSION=${PYTHON_VERSION} CUIKMOLMAKER_CXX11_ABI=${CXX11_ABI} $PYTHON setup.py build_ext --inplace

# Set the wheel directory
export WHL_DIR=cm_py${PYTHON_VERSION}_rdkit-${RDKIT_VERSION}_dist

# Build wheel
RDKIT_VERSION=${RDKIT_VERSION} PYTHON_VERSION=${PYTHON_VERSION} CUIKMOLMAKER_CXX11_ABI=${CXX11_ABI} $PYTHON setup.py bdist_wheel --dist-dir ${WHL_DIR}

# Install the package from the dist directory
$PYTHON -m pip install --no-deps --no-build-isolation --prefix=$PREFIX ${WHL_DIR}/*.whl

echo "PREFIX:"
echo "${PREFIX}"
# $PYTHON -c "import cuik_molmaker; print(cuik_molmaker.__file__)"
set +x
4 changes: 4 additions & 0 deletions recipes/cuik-molmaker/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
rdkit:
- 2025.03.5
- 2025.03.6
- 2025.09.1
79 changes: 79 additions & 0 deletions recipes/cuik-molmaker/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{% set name = "cuik_molmaker" %}
{% set version = "0.2" %}
{% set rdkit_version = rdkit %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://github.com/NVIDIA-Digital-Bio/cuik-molmaker/archive/refs/tags/v0.2.tar.gz
sha256: c137442f06af5f195efe7a916aefae065c8c52b40ae8e028a5bcd672b75c5fe8

build:
script_env:
- RDKIT_VERSION={{ rdkit_version }}
number: 0
missing_dso_whitelist: # [win]
- $RPATH/cuik_molmaker_core.dll # [win]

requirements:
build:
- {{ stdlib("c") }}
- {{ compiler('cxx') }}
- cmake # using CMake
- make # [unix]
- ninja # [win]
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python
host:
- cross-python_{{ target_platform }} # [build_platform != target_platform]
- python
- numpy >=1.23
- setuptools >=80.0.0
- pip
- eigen
- librdkit-dev {{ rdkit_version }}
- rdkit {{ rdkit_version }}
- pybind11 >=2.13
- libboost-devel
- libboost-python-devel
run:
- python
- setuptools >=80.0.0
- librdkit {{ rdkit_version }}
- rdkit {{ rdkit_version }}

test:
imports:
- cuik_molmaker
requires:
- pip
- pytest
- scipy
- numpy
source_files:
- tests/python/
- tests/data/
commands:
- pip check
- python -c "import cuik_molmaker; print('Listing all atom onehot features:'); print(cuik_molmaker.list_all_atom_onehot_features())"
- pytest -s tests/python/

about:
home: https://github.com/NVIDIA-Digital-Bio/cuik-molmaker
summary: 'C++/python module for featurizing molecules'
description: |
cuik-molmaker is a specialized package designed for molecular featurization,
converting chemical structures into formats that can be effectively used as
inputs for deep learning models, particularly graph neural networks (GNNs).
license: Apache-2.0
license_family: Apache
license_file: LICENSE/License.txt
license_url: https://github.com/NVIDIA-Digital-Bio/cuik-molmaker/blob/main/LICENSE/License.txt
doc_url: https://github.com/NVIDIA-Digital-Bio/cuik-molmaker/blob/main/README.md
dev_url: https://github.com/NVIDIA-Digital-Bio/cuik-molmaker

extra:
recipe-maintainers:
- sveccham