Skip to content

Commit 853aeaa

Browse files
author
chrisjonesBSU
committed
use smaller sidemax values in test
1 parent 627631b commit 853aeaa

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

mbuild/tests/test_packing.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -575,34 +575,33 @@ def test_sidemax(self):
575575

576576
ch4 = Methane()
577577
# With default sidemax
578-
box_of_methane = mb.fill_box(ch4, box=[500, 500, 500], n_compounds=500)
579-
sphere_of_methane = mb.fill_sphere(
580-
ch4, sphere=[500, 500, 500, 500], n_compounds=500
578+
box_of_methane = mb.fill_box(
579+
ch4, box=[20, 20, 20], n_compounds=500, sidemax=10.0
581580
)
582-
assert all(
583-
np.asarray(box_of_methane.get_boundingbox().lengths) < [110, 110, 110]
581+
sphere_of_methane = mb.fill_sphere(
582+
ch4, sphere=[20, 20, 20, 20], n_compounds=500, sidemax=10.0
584583
)
584+
assert all(np.asarray(box_of_methane.get_boundingbox().lengths) < [11, 11, 11])
585585
assert all(
586-
np.asarray(sphere_of_methane.get_boundingbox().lengths) < [210, 210, 210]
586+
np.asarray(sphere_of_methane.get_boundingbox().lengths) < [21, 21, 21]
587587
)
588588

589589
# With adjusted sidemax
590590
big_box_of_methane = mb.fill_box(
591-
ch4, box=[100, 100, 100], n_compounds=500, sidemax=200.0
591+
ch4, box=[120, 120, 120], n_compounds=500, sidemax=20.0
592592
)
593593
big_sphere_of_methane = mb.fill_sphere(
594594
ch4,
595-
sphere=[100, 100, 100, 100],
595+
sphere=[120, 120, 120, 120],
596596
n_compounds=500,
597-
sidemax=200.0,
597+
sidemax=20.0,
598598
)
599599

600600
assert all(
601-
np.asarray(big_box_of_methane.get_boundingbox().lengths) > [90, 90, 90]
601+
np.asarray(big_box_of_methane.get_boundingbox().lengths) > [10, 10, 10]
602602
)
603603
assert all(
604-
np.asarray(big_sphere_of_methane.get_boundingbox().lengths)
605-
> [180, 180, 180]
604+
np.asarray(big_sphere_of_methane.get_boundingbox().lengths) > [14, 14, 14]
606605
)
607606

608607
def test_box_edge(self, h2o, methane):

0 commit comments

Comments
 (0)