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

Add CG_System class #19

Merged
merged 41 commits into from
Oct 18, 2021
Merged

Conversation

jennyfothergill
Copy link
Member

@jennyfothergill jennyfothergill commented May 20, 2021

Fixes: #16

OK, so I've been going round and round for how to fix this. Chris mentioned the CG_Compound class would still be useful to him for building up systems, so it makes sense to keep it because it works pretty well with a small system and mbuild has useful functions for initializing systems. In addition to this class, maybe we create a separate class for if a user just wants to use this package for msibi--a workflow something like:
(atomistic gsd) ->
(freud clustering - get the molecules) ->
(openbabel molecule - SMARTS matching) ->
(scale out that mapping to other molecules) ->
(coarse gsd)
In which case there's no reason to get mbuild involved. Maybe we want to keep this simple and not specific to gsd; any system of points, types, bonds, and box should work.

Maybe additionally we can get some speedup by not forcing any optimization steps when placing fine-grain structures... instead these can be optional.

TODO:

  • a function to write coarse structures to gsd.
  • a way to visualize that this new method is correct? Use OVITO 😅
  • Add unit tests including testing a multicompound gsd as I'm not sure how that'll work
  • Document the assumptions of the CG_System namely:
    • molecules (clusters determined using bonds) of the same length are assumed to have the same structure
    • structures which are the same are expected to be added to the system in a chunk and follow the same pattern (this is the way planckton builds up systems) for example if a system contains 200 of each water and hexane it is expect to be 200 water then 200 hexane e.g. O, H, H, O, H, H, ..., C, C C, ...
  • Add particle images

@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #19 (5403c4b) into master (f3ae375) will increase coverage by 0.57%.
The diff coverage is 97.88%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #19      +/-   ##
==========================================
+ Coverage   96.33%   96.91%   +0.57%     
==========================================
  Files           4        4              
  Lines         218      356     +138     
==========================================
+ Hits          210      345     +135     
- Misses          8       11       +3     
Impacted Files Coverage Δ
grits/utils.py 96.73% <93.33%> (-3.27%) ⬇️
grits/__init__.py 100.00% <100.00%> (ø)
grits/coarsegrain.py 97.96% <100.00%> (+1.81%) ⬆️

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

speed up and scale up!
1 participant