From 6ece3e14f7620ea7d29f0eb29598692ceea469a8 Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Fri, 28 Jul 2023 14:40:38 +0800 Subject: [PATCH 1/8] added additional arguments to the md rattle methods --- hoomd/md/methods/rattle.py | 55 ++++++++++++++++++++++++++++----- hoomd/md/pytest/test_methods.py | 7 +++++ 2 files changed, 55 insertions(+), 7 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 09ccd3b7e0..aac4cd2210 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -206,6 +206,12 @@ class Langevin(MethodRATTLE): kT (hoomd.variant.variant_like): Temperature of the simulation :math:`[\mathrm{energy}]`. + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. @@ -235,8 +241,7 @@ class Langevin(MethodRATTLE): sphere = hoomd.md.manifold.Sphere(r=10) langevin_rattle = hoomd.md.methods.rattle.Langevin( - filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere, - seed=1) + filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere) Attributes: filter (hoomd.filter.filter_like): Subset of particles to apply this @@ -266,6 +271,8 @@ class Langevin(MethodRATTLE): def __init__(self, filter, kT, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0), manifold_constraint, tally_reservoir_energy=False, tolerance=0.000001): @@ -283,11 +290,13 @@ def __init__(self, gamma = TypeParameter('gamma', type_kind='particle_types', param_dict=TypeParameterDict(1., len_keys=1)) + gamma.default = default_gamma gamma_r = TypeParameter('gamma_r', type_kind='particle_types', param_dict=TypeParameterDict((1., 1., 1.), len_keys=1)) + gamma_r.default = default_gamma_r self._extend_typeparam([gamma, gamma_r]) @@ -324,6 +333,12 @@ class Brownian(MethodRATTLE): kT (hoomd.variant.variant_like): Temperature of the simulation :math:`[\mathrm{energy}]`. + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. @@ -344,8 +359,7 @@ class Brownian(MethodRATTLE): sphere = hoomd.md.manifold.Sphere(r=10) brownian_rattle = hoomd.md.methods.rattle.Brownian( - filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere, - seed=1) + filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere) integrator = hoomd.md.Integrator(dt=0.001, methods=[brownian_rattle], forces=[lj]) @@ -374,7 +388,15 @@ class Brownian(MethodRATTLE): :math:`[\mathrm{time}^{-1}]`. """ - def __init__(self, filter, kT, manifold_constraint, tolerance=1e-6): + def __init__( + self, + filter, + kT, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0), + manifold_constraint, + tolerance=1e-6 + ): # store metadata param_dict = ParameterDict( @@ -389,11 +411,14 @@ def __init__(self, filter, kT, manifold_constraint, tolerance=1e-6): gamma = TypeParameter('gamma', type_kind='particle_types', param_dict=TypeParameterDict(1., len_keys=1)) + gamma.default = default_gamma gamma_r = TypeParameter('gamma_r', type_kind='particle_types', param_dict=TypeParameterDict((1., 1., 1.), len_keys=1)) + gamma_r.default = default_gamma_r + self._extend_typeparam([gamma, gamma_r]) super().__init__(manifold_constraint, tolerance) @@ -426,6 +451,12 @@ class OverdampedViscous(MethodRATTLE): filter (hoomd.filter.filter_like): Subset of particles to apply this method to. + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. tolerance (float): Defines the tolerated error particles are allowed to @@ -445,7 +476,7 @@ class OverdampedViscous(MethodRATTLE): sphere = hoomd.md.manifold.Sphere(r=10) odv_rattle = hoomd.md.methods.rattle.OverdampedViscous( - filter=hoomd.filter.All(), manifold_constraint=sphere, seed=1) + filter=hoomd.filter.All(), manifold_constraint=sphere) integrator = hoomd.md.Integrator( dt=0.001, methods=[odv_rattle], forces=[lj]) @@ -472,7 +503,14 @@ class OverdampedViscous(MethodRATTLE): :math:`[\mathrm{time}^{-1}]`. """ - def __init__(self, filter, manifold_constraint, tolerance=1e-6): + def __init__( + self, + filter, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0), + manifold_constraint, + tolerance=1e-6 + ): # store metadata param_dict = ParameterDict(filter=ParticleFilter,) param_dict.update(dict(filter=filter)) @@ -483,11 +521,14 @@ def __init__(self, filter, manifold_constraint, tolerance=1e-6): gamma = TypeParameter('gamma', type_kind='particle_types', param_dict=TypeParameterDict(1., len_keys=1)) + gamma.default = default_gamma gamma_r = TypeParameter('gamma_r', type_kind='particle_types', param_dict=TypeParameterDict((1., 1., 1.), len_keys=1)) + gamma_r.default = default_gamma_r + self._extend_typeparam([gamma, gamma_r]) super().__init__(manifold_constraint, tolerance) diff --git a/hoomd/md/pytest/test_methods.py b/hoomd/md/pytest/test_methods.py index 662fc99182..165e758f1e 100644 --- a/hoomd/md/pytest/test_methods.py +++ b/hoomd/md/pytest/test_methods.py @@ -328,6 +328,13 @@ def test_constant_pressure_attributes_attached_2d( 'kT': 1.5 }), (hoomd.md.methods.OverdampedViscous, {}), + (hoomd.md.methods.rattle.Brownian, { + 'kT': 1.5, 'manifold_constraint'=sphere + }), + (hoomd.md.methods.rattle.Langevin, { + 'kT': 1.5, 'manifold_constraint'=sphere + }), + (hoomd.md.methods.rattle.OverdampedViscous, {}) ]) def test_default_gamma(self, cls, init_args): c = cls(filter=hoomd.filter.All(), **init_args) From cd50455e5f2f07d1f8df1c3e7de103b01e90b34f Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Fri, 28 Jul 2023 15:14:20 +0800 Subject: [PATCH 2/8] test- fix the syntax error, default vs non-default --- hoomd/md/methods/rattle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index aac4cd2210..7cb0765083 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -273,9 +273,9 @@ def __init__(self, kT, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0), - manifold_constraint, tally_reservoir_energy=False, - tolerance=0.000001): + tolerance=0.000001, + manifold_constraint): # store metadata param_dict = ParameterDict( From 7b841eb1d5e72d05bc4964a95d86ca8baef04ee4 Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Fri, 28 Jul 2023 15:24:10 +0800 Subject: [PATCH 3/8] fixed formatting issue & syntax errors --- hoomd/md/methods/rattle.py | 7 ++++--- hoomd/md/pytest/test_methods.py | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 7cb0765083..8f992fd359 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -271,11 +271,12 @@ class Langevin(MethodRATTLE): def __init__(self, filter, kT, + manifold_constraint, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0), tally_reservoir_energy=False, tolerance=0.000001, - manifold_constraint): + ): # store metadata param_dict = ParameterDict( @@ -392,9 +393,9 @@ def __init__( self, filter, kT, + manifold_constraint, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0), - manifold_constraint, tolerance=1e-6 ): @@ -506,9 +507,9 @@ class OverdampedViscous(MethodRATTLE): def __init__( self, filter, + manifold_constraint, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0), - manifold_constraint, tolerance=1e-6 ): # store metadata diff --git a/hoomd/md/pytest/test_methods.py b/hoomd/md/pytest/test_methods.py index 165e758f1e..e05a022f1b 100644 --- a/hoomd/md/pytest/test_methods.py +++ b/hoomd/md/pytest/test_methods.py @@ -329,10 +329,10 @@ def test_constant_pressure_attributes_attached_2d( }), (hoomd.md.methods.OverdampedViscous, {}), (hoomd.md.methods.rattle.Brownian, { - 'kT': 1.5, 'manifold_constraint'=sphere + 'kT': 1.5, 'manifold_constraint': sphere }), (hoomd.md.methods.rattle.Langevin, { - 'kT': 1.5, 'manifold_constraint'=sphere + 'kT': 1.5, 'manifold_constraint': sphere }), (hoomd.md.methods.rattle.OverdampedViscous, {}) ]) From 5594cd6cb3b747130ae824b9fed496cca01da8b1 Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Tue, 1 Aug 2023 23:39:39 +0800 Subject: [PATCH 4/8] added example code and fixed the error in the test file --- hoomd/md/methods/rattle.py | 127 +++++++++++++++++++------------- hoomd/md/pytest/test_methods.py | 10 ++- 2 files changed, 82 insertions(+), 55 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 8f992fd359..22588f525b 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -1,7 +1,18 @@ # Copyright (c) 2009-2023 The Regents of the University of Michigan. # Part of HOOMD-blue, released under the BSD 3-Clause License. -"""MD integration methods with manifold constraints.""" +"""MD integration methods with manifold constraints. + +.. invisible-code-block: python + + simulation = hoomd.util.make_example_simulation() + simulation.operations.integrator = hoomd.md.Integrator(dt=0.001) + logger = hoomd.logging.Logger() + + # Rename pytest's tmp_path fixture for clarity in the documentation. + path = tmp_path + +""" from hoomd.md import _md import hoomd @@ -206,19 +217,13 @@ class Langevin(MethodRATTLE): kT (hoomd.variant.variant_like): Temperature of the simulation :math:`[\mathrm{energy}]`. - default_gamma (float): Default drag coefficient for all particle types - :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. - - default_gamma_r ([`float`, `float`, `float`]): Default rotational drag - coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. - manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. tally_reservoir_energy (bool): If true, the energy exchange between the thermal reservoir and the particles is tracked. Total energy conservation can then be monitored by adding - ``langevin_reservoir_energy_groupname`` to the logged quantities. + ``langevin_reservoir_energy_groiupname`` to the logged quantities. Defaults to False :math:`[\mathrm{energy}]`. tolerance (float): Defines the tolerated error particles are allowed @@ -226,6 +231,12 @@ class Langevin(MethodRATTLE): The units of tolerance match that of the selected manifold's implicit function. Defaults to 1e-6 + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + .. rubric:: Translational degrees of freedom `Langevin` uses the same integrator as `hoomd.md.methods.Langevin`, which @@ -237,11 +248,18 @@ class Langevin(MethodRATTLE): Use `Brownian` if your system is not underdamped. - Example:: + .. rubric:: Example - sphere = hoomd.md.manifold.Sphere(r=10) + .. code-block:: python + + sphere = hoomd.md.manifold.Sphere(r=5) langevin_rattle = hoomd.md.methods.rattle.Langevin( - filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere) + filter=hoomd.filter.All(), + kT=1.5, + manifold_constraint=sphere, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0)) + simulation.operations.integrator.methods = [langevin_rattle] Attributes: filter (hoomd.filter.filter_like): Subset of particles to apply this @@ -275,8 +293,7 @@ def __init__(self, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0), tally_reservoir_energy=False, - tolerance=0.000001, - ): + tolerance=0.000001): # store metadata param_dict = ParameterDict( @@ -334,12 +351,6 @@ class Brownian(MethodRATTLE): kT (hoomd.variant.variant_like): Temperature of the simulation :math:`[\mathrm{energy}]`. - default_gamma (float): Default drag coefficient for all particle types - :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. - - default_gamma_r ([`float`, `float`, `float`]): Default rotational drag - coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. - manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. @@ -348,6 +359,12 @@ class Brownian(MethodRATTLE): The units of tolerance match that of the selected manifold's implicit function. Defaults to 1e-6 + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + `Brownian` uses the same integrator as `hoomd.md.methods.Brownian`, which follows the overdamped Langevin equations of motion with the additional force term :math:`- \lambda \vec{F}_\mathrm{M}`. The force @@ -356,13 +373,18 @@ class Brownian(MethodRATTLE): algorithm. For more details about Brownian dynamics see `hoomd.md.methods.Brownian`. - Examples of using ``manifold_constraint``:: + .. rubric:: Example - sphere = hoomd.md.manifold.Sphere(r=10) + .. code-block:: python + + sphere = hoomd.md.manifold.Sphere(r=5) brownian_rattle = hoomd.md.methods.rattle.Brownian( - filter=hoomd.filter.All(), kT=0.2, manifold_constraint=sphere) - integrator = hoomd.md.Integrator(dt=0.001, methods=[brownian_rattle], - forces=[lj]) + filter=hoomd.filter.All(), + kT=1.5, + manifold_constraint=sphere, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0)) + simulation.operations.integrator.methods = [brownian_rattle] Attributes: filter (hoomd.filter.filter_like): Subset of particles to apply this @@ -389,15 +411,13 @@ class Brownian(MethodRATTLE): :math:`[\mathrm{time}^{-1}]`. """ - def __init__( - self, - filter, - kT, - manifold_constraint, - default_gamma=1.0, - default_gamma_r=(1.0, 1.0, 1.0), - tolerance=1e-6 - ): + def __init__(self, + filter, + kT, + manifold_constraint, + tolerance=1e-6, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0)): # store metadata param_dict = ParameterDict( @@ -452,12 +472,6 @@ class OverdampedViscous(MethodRATTLE): filter (hoomd.filter.filter_like): Subset of particles to apply this method to. - default_gamma (float): Default drag coefficient for all particle types - :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. - - default_gamma_r ([`float`, `float`, `float`]): Default rotational drag - coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. - manifold_constraint (hoomd.md.manifold.Manifold): Manifold constraint. tolerance (float): Defines the tolerated error particles are allowed to @@ -465,6 +479,12 @@ class OverdampedViscous(MethodRATTLE): units of tolerance match that of the selected manifold's implicit function. Defaults to 1e-6 + default_gamma (float): Default drag coefficient for all particle types + :math:`[\mathrm{mass} \cdot \mathrm{time}^{-1}]`. + + default_gamma_r ([`float`, `float`, `float`]): Default rotational drag + coefficient tensor for all particles :math:`[\mathrm{time}^{-1}]`. + `OverdampedViscous` uses the same integrator as `hoomd.md.methods.OverdampedViscous`, with the additional force term :math:`- \lambda \vec{F}_\mathrm{M}`. The force :math:`\vec{F}_\mathrm{M}` @@ -473,14 +493,19 @@ class OverdampedViscous(MethodRATTLE): details about overdamped viscous dynamics see `hoomd.md.methods.OverdampedViscous`. - Examples of using ``manifold_constraint``:: + .. rubric:: Example - sphere = hoomd.md.manifold.Sphere(r=10) + .. code-block:: python + + sphere = hoomd.md.manifold.Sphere(r=5) odv_rattle = hoomd.md.methods.rattle.OverdampedViscous( - filter=hoomd.filter.All(), manifold_constraint=sphere) + filter=hoomd.filter.All(), + manifold_constraint=sphere, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0)) integrator = hoomd.md.Integrator( - dt=0.001, methods=[odv_rattle], forces=[lj]) - + dt=0.001, methods=[odv_rattle], forces=None) + simulation.operations.integrator.methods = [odv_rattle] Attributes: filter (hoomd.filter.filter_like): Subset of particles to apply this @@ -504,14 +529,12 @@ class OverdampedViscous(MethodRATTLE): :math:`[\mathrm{time}^{-1}]`. """ - def __init__( - self, - filter, - manifold_constraint, - default_gamma=1.0, - default_gamma_r=(1.0, 1.0, 1.0), - tolerance=1e-6 - ): + def __init__(self, + filter, + manifold_constraint, + tolerance=1e-6, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0)): # store metadata param_dict = ParameterDict(filter=ParticleFilter,) param_dict.update(dict(filter=filter)) diff --git a/hoomd/md/pytest/test_methods.py b/hoomd/md/pytest/test_methods.py index e05a022f1b..19be36d0dd 100644 --- a/hoomd/md/pytest/test_methods.py +++ b/hoomd/md/pytest/test_methods.py @@ -329,12 +329,16 @@ def test_constant_pressure_attributes_attached_2d( }), (hoomd.md.methods.OverdampedViscous, {}), (hoomd.md.methods.rattle.Brownian, { - 'kT': 1.5, 'manifold_constraint': sphere + 'kT': 1.5, + 'manifold_constraint': hoomd.md.manifold.Sphere(r=10) }), (hoomd.md.methods.rattle.Langevin, { - 'kT': 1.5, 'manifold_constraint': sphere + 'kT': 1.5, + 'manifold_constraint': hoomd.md.manifold.Sphere(r=10) + }), + (hoomd.md.methods.rattle.OverdampedViscous, { + 'manifold_constraint': hoomd.md.manifold.Sphere(r=10) }), - (hoomd.md.methods.rattle.OverdampedViscous, {}) ]) def test_default_gamma(self, cls, init_args): c = cls(filter=hoomd.filter.All(), **init_args) From 73b9c8097ac7bcac017e0a30b3a751018bb8a181 Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Tue, 1 Aug 2023 23:42:14 +0800 Subject: [PATCH 5/8] fixed typo --- hoomd/md/methods/rattle.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 22588f525b..1bec91a500 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -223,7 +223,7 @@ class Langevin(MethodRATTLE): tally_reservoir_energy (bool): If true, the energy exchange between the thermal reservoir and the particles is tracked. Total energy conservation can then be monitored by adding - ``langevin_reservoir_energy_groiupname`` to the logged quantities. + ``langevin_reservoir_energy_groupname`` to the logged quantities. Defaults to False :math:`[\mathrm{energy}]`. tolerance (float): Defines the tolerated error particles are allowed From 16a440c45226f6f04b3d2170de55fc4b041d17dd Mon Sep 17 00:00:00 2001 From: Yiyuan Melody Zhang Date: Wed, 2 Aug 2023 00:09:35 +0800 Subject: [PATCH 6/8] fixed odv example code --- hoomd/md/methods/rattle.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 1bec91a500..7b5c8d117f 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -503,8 +503,6 @@ class OverdampedViscous(MethodRATTLE): manifold_constraint=sphere, default_gamma=1.0, default_gamma_r=(1.0, 1.0, 1.0)) - integrator = hoomd.md.Integrator( - dt=0.001, methods=[odv_rattle], forces=None) simulation.operations.integrator.methods = [odv_rattle] Attributes: From 9d42461a10031ac024185f0ca38fd02cb3934e4e Mon Sep 17 00:00:00 2001 From: "Joshua A. Anderson" Date: Thu, 3 Aug 2023 11:32:22 -0400 Subject: [PATCH 7/8] Preserver 4.0 API. --- hoomd/md/methods/rattle.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 7b5c8d117f..88c6d4d5a3 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -290,10 +290,10 @@ def __init__(self, filter, kT, manifold_constraint, - default_gamma=1.0, - default_gamma_r=(1.0, 1.0, 1.0), tally_reservoir_energy=False, - tolerance=0.000001): + tolerance=0.000001, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0),): # store metadata param_dict = ParameterDict( From e2174172e3ce1badff500f4bd4c666e80a524616 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 3 Aug 2023 21:04:14 +0000 Subject: [PATCH 8/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- hoomd/md/methods/rattle.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/hoomd/md/methods/rattle.py b/hoomd/md/methods/rattle.py index 88c6d4d5a3..93d5a2359c 100644 --- a/hoomd/md/methods/rattle.py +++ b/hoomd/md/methods/rattle.py @@ -286,14 +286,16 @@ class Langevin(MethodRATTLE): :math:`[\mathrm{time}^{-1}]`. """ - def __init__(self, - filter, - kT, - manifold_constraint, - tally_reservoir_energy=False, - tolerance=0.000001, - default_gamma=1.0, - default_gamma_r=(1.0, 1.0, 1.0),): + def __init__( + self, + filter, + kT, + manifold_constraint, + tally_reservoir_energy=False, + tolerance=0.000001, + default_gamma=1.0, + default_gamma_r=(1.0, 1.0, 1.0), + ): # store metadata param_dict = ParameterDict(