def test_to_mbuild_name_none(self): top = Top() top.add_site(Site()) top.name = None compound = to_mbuild(top) assert compound.name == 'Compound'
def test_full_conversion(self, ethane): top = from_mbuild(ethane) new = to_mbuild(top) assert new.n_particles == 8 assert new.n_bonds == 7
def test_to_mbuild_name_none(self): top = Top() top.add_site(Atom(position=[0.0, 0.0, 0.0])) top.name = None compound = to_mbuild(top) assert compound.name == "Compound"
def test_3_layer_top(self): top_top = Top() mid_top = SubTop() site = Site() top_top.add_subtopology(mid_top) mid_top.add_site(site) compound = to_mbuild(top_top) assert len(compound.children) == 1 assert compound.children[0].n_particles == 1 assert compound.n_particles == 1