In [1]:
import mbuild as mb
from mbuild.lib.moieties import CH2, CH3
from mbuild.examples import Propane, Hexane
hexane_box = mb.fill_box(Hexane(), 50, box=[4, 4, 4])
print(hexane_box)
hexane_box.visualize()
Out[1]:
In [2]:
united_atom_particles = [CH2, CH3]
united_atom = mb.coarse_grain(hexane_box, particle_classes=united_atom_particles)
print(united_atom)
united_atom.visualize()
Out[2]:
In [3]:
three_to_one_particles = [Propane]
three_to_one = mb.coarse_grain(hexane_box, particle_classes=three_to_one_particles)
print(three_to_one)
three_to_one.visualize()
Out[3]: