NWChemEx / NWChemEx/PluginPlay

make_lambda

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
13
Forks
1
Avg merge
43m
Merged PRs (30d)
4

Description

Does anyone know if we can use pluginplay::make_lambda from Python?

I tried:

from simde import simde, chemist, pluginplay

def my_fxn(mol):
   ao_bs = chemist.AOBasisSetD()
   for atom in mol:
       # apply basis
   return chemist.AOSpaceD(ao_bs)

pt = simde.AtomicOrbitals
mod = pluginplay.make_lambda[pt](my_fxn)

and get:

  Failed to instantiate "make_lambda<simde::AtomicOrbitals>(function)"

As a workaround one can wrap the call to my_fxn in a full-fledged module.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the pluginplay::make_lambda entry point and the Python call shown in the issue, focusing on why instantiation of make_lambdasimde::AtomicOrbitals(function) fails. Confirm whether Python support is intended and identify the relevant binding path; done means the call works from Python or the supported limitation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python
Domain
api, developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.