Skip to content
Discussion options

You must be logged in to vote

pair_list stores pairs of tags. You are using cpu_local_force_arrays and cpu_local_snapshot which are accessed by index. To get the current indices, use snap.particles.rtag[tag] instead of the tags directly on these lines:

        idx_a = pair_list[i, 0]
        idx_b = pair_list[i, 1]

It doesn't help you right now, but I have designed hoomd-rs to avoid all of this needless complexity. In hoomd-rs, you only need to write your custom pair force routine as a function of two site's properties --- all the index, tag, ghost, and spatial data structure complexities are already implemented elsewhere. Your custom potential is also compiled to machine code and will therefore run 100's to 1000's o…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@joaander
Comment options

@mgaimann
Comment options

@mgaimann
Comment options

@joaander
Comment options

Answer selected by mgaimann
@mgaimann
Comment options

@joaander
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
3 participants