openmm / openmm-cookbook

The OpenMM Cookbook and Tutorials
35 stars 10 forks source link

CG polymer tutorial #31

Closed sef43 closed 1 year ago

sef43 commented 1 year ago

This PR adds in a new tutorial showing how to create a custom coarse-grained polymer model in OpenMM. It was made with help from @k2o0r

It demonstrates some key features not covered in existing tutorials:

The hope is that this tutorial is beneficial to the coarse-grained modelling community. OpenMM is a good choice for CG models but currently most (or all) resources on the main OpenMM pages are focused on Atomistic MD.

sef43 commented 1 year ago

The rendered version can be viewed here: https://sef43.github.io/openmm-cookbook/PR5/notebooks/tutorials/coarse_grained_polymer.html

k2o0r commented 1 year ago

Looks good!

Just two quick things, first I noticed a minor typo in line 239 "You should consult the literature and chose an appropriate CG force-field or systematically create your own parameter set!" should read choose rather than chose.

Also, looking at this reminded me of something a bit strange, System.setPeriodicBoxVectors takes 3 arguments a,b,c but Topology.setPeriodicBoxVectors takes 1, [a,b,c]. Is there a reason for this difference?

peastman commented 1 year ago

It's because System is a C++ class while Topology is a Python class. That leads to certain differences.

peastman commented 1 year ago

Feel free to merge this once it's ready.