Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mbuild/conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,7 +1042,7 @@ def save(
output_sdf.write(pybel_molecule)
output_sdf.close()
else: # ParmEd supported saver.
structure = compound.to_parmed(include_ports=include_ports)
structure = compound.to_parmed(residues=residues, include_ports=include_ports)
structure.save(filename, overwrite=overwrite, **kwargs)


Expand Down
3 changes: 3 additions & 0 deletions mbuild/tests/test_compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -2265,6 +2265,9 @@ def test_from_parmed(self):
struc = pmd.load_file(get_fn("spc.pdb"))
comp.from_parmed(struc)
assert comp.children[0].name == "SPC"
comp.save("test.pdb", residues=["SPC"])
struc2 = pmd.load_file("test.pdb")
assert struc2.residues[0].name == struc.residues[0].name

@pytest.mark.skipif(not has_mdtraj, reason="MDTraj not installed")
def test_complex_from_trajectory(self):
Expand Down
Loading