Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Julia function being called as a pari potential #23

Open
vchuravy opened this issue Feb 8, 2022 · 1 comment
Open

Support Julia function being called as a pari potential #23

vchuravy opened this issue Feb 8, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vchuravy
Copy link
Member

vchuravy commented Feb 8, 2022

@dallasfoster asked for this on Slack.

Two avenues that I see immediatly

  1. Mimic pair_python
  • Benefits:
    • Usable outside LAMMPS.jl
  • Downsides:
    • Requires linking LAMMPS against libjulia
  1. Enhance the LAMMPS API to make it possible to register a custom pair after loading the libraries
  • Benefits:
    • pair_python seems to only support one Python potential at a time? We could potential support many Julia potentials
    • Potential for better integration with LAMMPS.jl
    • Maybe lower overheads
  • Downsides:
    • Users need to use LAMMPS.jl
    • Unproven path

From a cursory research for #2 it seems that we would need to expose a custom Pair class that takes raw function pointers and forwards the method implementations and then register that with PairCreatorMap which is a map from string to PairCreator which is a typedef Pair *(*PairCreator)(LAMMPS *).

cc: @rohskopf

@vchuravy vchuravy added enhancement New feature or request help wanted Extra attention is needed labels Feb 8, 2022
@vchuravy
Copy link
Member Author

vchuravy commented Jul 1, 2024

#28 makes quite a bit of progress on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant