Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 27, 2025
1 parent 2eeb836 commit 9140282
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions flowermd/base/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def __init__(
overlap=0.2,
seed=12345,
fix_orientation=False,
**kwargs
**kwargs,
):
if not isinstance(density, u.array.unyt_quantity):
self.density = density * u.Unit("g") / u.Unit("cm**3")
Expand All @@ -674,7 +674,9 @@ def __init__(
self.overlap = overlap
self.seed = seed
self.fix_orientation = fix_orientation
super(Pack, self).__init__(molecules=molecules, base_units=base_units,**kwargs)
super(Pack, self).__init__(
molecules=molecules, base_units=base_units, **kwargs
)

def _build_system(self):
mass_density = u.Unit("kg") / u.Unit("m**3")
Expand Down Expand Up @@ -702,7 +704,7 @@ def _build_system(self):
overlap=self.overlap,
seed=self.seed,
edge=self.edge,
fix_orientation=self.fix_orientation
fix_orientation=self.fix_orientation,
)
return system

Expand Down
4 changes: 2 additions & 2 deletions flowermd/tests/base/test_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_pack_seed(self, benzene_molecule):
default_seed = Pack(molecules=[benzene_mol], density=0.1)
change_seed = Pack(molecules=[benzene_mol], density=0.1, seed=12340)
assert not np.array_equal(default_seed.xyz,change_seed.xyz)

#adding test for kwargs argument in system.py Pack class
def test_pack_kwargs_attr(self, polyethylene):
polyethylene = polyethylene(lengths=5, num_mols=1)
Expand All @@ -221,7 +221,7 @@ def test_pack_kwargs_attr(self, polyethylene):
seed=12345,
sidemax=100.0, edge=0.2, compound_ratio=None, aspect_ratio=None, fix_orientation=False, temp_file=None, update_port_locations=False, packmol_args=None
)
assert
assert

def test_mass(self, pps_molecule):
pps_mol = pps_molecule(n_mols=20)
Expand Down

0 comments on commit 9140282

Please sign in to comment.