Closed tcmoore3 closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
pre-commit.ci autofix
@tommy-waltmann The base case of isotropic interactions is covered in the reference documentation, which is the first hit which searching for "hpmc pair" in the documentation. Let me know If you have suggestions for how to make this more findable or think there should be a quick start guide.
The main goal of this tutorial is to teach how to implement patchy particle interactions, which is a more complex and often asked for topic. The title should be: "Modelling patchy particles". While this PR includes only HPMC, we plan to add MD after #1412 is merged.
@tommy-waltmann The base case of isotropic interactions is covered in the reference documentation, which is the first hit which searching for "hpmc pair" in the documentation. Let me know If you have suggestions for how to make this more findable or think there should be a quick start guide.
The main goal of this tutorial is to teach how to implement patchy particle interactions, which is a more complex and often asked for topic. The title should be: "Modelling patchy particles". While this PR includes only HPMC, we plan to add MD after #1412 is merged.
That all sounds good, let's move forward with Josh's title suggestion.
The base case of isotropic interactions is covered in the reference documentation, which is the first hit which searching for "hpmc pair" in the documentation. Let me know If you have suggestions for how to make this more findable or think there should be a quick start guide.
I think the title now is fine. To me the title summarizes exactly the tutorial, and personally I would appreciate a quick start guide for adding isotropic interactions
I think the title now is fine. To me the title summarizes exactly the tutorial, and personally I would appreciate a quick start guide for adding isotropic interactions
OK, feel free to open an issue and/or pull request to add e.g. an isotropic square well to the how-to guides.
I think the title now is fine. To me the title summarizes exactly the tutorial, and personally I would appreciate a quick start guide for adding isotropic interactions
OK, feel free to open an issue and/or pull request to add e.g. an isotropic square well to the how-to guides.
Just did. Unfortunately I won't be able to write this guide as I have no experience with this. I would be happy to help review it though.
I think the title now is fine. To me the title summarizes exactly the tutorial, and personally I would appreciate a quick start guide for adding isotropic interactions
OK, feel free to open an issue and/or pull request to add e.g. an isotropic square well to the how-to guides.
Just did. Unfortunately I won't be able to write this guide as I have no experience with this. I would be happy to help review it though.
Thanks. I moved the issue to the hoomd-blue
repository as that is where howto guides are hosted. The howto would copy code from CPPPotential
example block and add a Sphere integrator before it. To be complete, it should also create a simulation with a trivial state (not shown here):
mc = hoomd.hpmc.integrate.Sphere()
mc.shape['A'] = dict(diameter=1.0)
sq_well = '''float rsq = dot(r_ij, r_ij);
if (rsq < 1.21f)
return -1.0f;
else
return 0.0f;
'''
patch = hoomd.hpmc.pair.user.CPPPotential(r_cut=1.1, code=sq_well,
param_array=[])
mc.pair_potential = patch
sim.run(10)
Note that the 1.21f
has confused many users. In the final howto, we should set r_interaction = 1.1
and then use a f-string to compute r_interaction * r_interaction
in the check. The howto should also link to the patchy particle tutorial/
See https://github.com/glotzerlab/hoomd-blue/pull/1508 for the isotropic howto guide. @Charlottez112, I requested your review as requested.
pre-commit.ci autofix
Description
Adds a tutorial showing how to model patchy particles in HPMC. It uses the Kern–Frenkel model as an example.
Resolves: #47
Checklist: