Skip to content

Commit cea141e

Browse files
authored
Turn off the infer_residues in compound.py (#1135)
* turn off the infer_residues in compound.py * update unit test * fix other unit test
1 parent 54a6241 commit cea141e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

mbuild/compound.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3234,7 +3234,7 @@ def to_parmed(
32343234
title="",
32353235
residues=None,
32363236
show_ports=False,
3237-
infer_residues=True,
3237+
infer_residues=False,
32383238
infer_residues_kwargs={},
32393239
):
32403240
"""Create a ParmEd Structure from a Compound.

mbuild/tests/test_compound.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,6 +1373,7 @@ def test_resnames_parmed(self, h2o, ethane):
13731373
system = Compound([h2o, mb.clone(h2o), ethane])
13741374
struct = system.to_parmed(
13751375
residues=["Ethane", "H2O"],
1376+
infer_residues=True,
13761377
)
13771378
assert len(struct.residues) == 3
13781379
assert struct.residues[0].name == "H2O"
@@ -1382,7 +1383,7 @@ def test_resnames_parmed(self, h2o, ethane):
13821383
struct.atoms
13831384
)
13841385

1385-
struct = system.to_parmed(residues="Ethane")
1386+
struct = system.to_parmed(residues="Ethane", infer_residues=True)
13861387
assert len(struct.residues) == 2
13871388
assert struct.residues[0].name == "RES"
13881389
assert struct.residues[1].name == "Ethane"
@@ -1458,7 +1459,7 @@ def test_resnames_parmed_cg(self, benzene, hexane, propyl):
14581459

14591460
# test multiple cg molecules
14601461
system = mb.Compound([mb.clone(cg), mb.clone(cg)])
1461-
struct = system.to_parmed()
1462+
struct = system.to_parmed(infer_residues=True)
14621463
assert len(struct.residues) == 2
14631464

14641465
# test hierarchical cg molecules to depth 1
@@ -1542,7 +1543,6 @@ def test_resnames_parmed_cg(self, benzene, hexane, propyl):
15421543
"include_base_level": True,
15431544
},
15441545
)
1545-
print(struct.residues)
15461546
# two_bonded beads should generate 8 residues (gets down to particle level) (16 total)
15471547
# benzene gets down to particle levels (24 total)
15481548
# hexane is goes from polymer down to monomer level. Made from two propyl groups which gives two monomers (4 total)

0 commit comments

Comments
 (0)