From e6299a718c21b347ded7063721dc1380fcb65fcf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Aug 2024 19:32:31 +0000 Subject: [PATCH 01/24] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.6 → v0.5.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.6...v0.5.7) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3efbaccd..fdcf53c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.6 # Ruff version + rev: v0.5.7 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 46323ea59e37daf24871cda4a7da1480c4e0c634 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 14:24:49 -0600 Subject: [PATCH 02/24] [pre-commit.ci] pre-commit autoupdate (#158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix indent --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: chrisjonesBSU --- .pre-commit-config.yaml | 2 +- tutorials/1-flowerMD-basics.ipynb | 34 ++++++---- tutorials/2-flowerMD-advanced.ipynb | 42 ++++++++---- tutorials/3-flowerMD-coarse-graining.ipynb | 13 +++- tutorials/4-flowerMD-welding.ipynb | 75 ++++++++++++++-------- tutorials/5-flowerMD-surface-wetting.ipynb | 64 +++++++++--------- 6 files changed, 146 insertions(+), 84 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fdcf53c7..44af9a1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.5.7 # Ruff version + rev: v0.6.1 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] diff --git a/tutorials/1-flowerMD-basics.ipynb b/tutorials/1-flowerMD-basics.ipynb index d6ad4cd2..2d83458d 100644 --- a/tutorials/1-flowerMD-basics.ipynb +++ b/tutorials/1-flowerMD-basics.ipynb @@ -55,7 +55,8 @@ "outputs": [], "source": [ "import warnings\n", - "warnings.filterwarnings('ignore')" + "\n", + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -78,9 +79,7 @@ ] } ], - "source": [ - "import flowermd" - ] + "source": [] }, { "cell_type": "markdown", @@ -149,6 +148,7 @@ "outputs": [], "source": [ "from flowermd.base import Pack\n", + "\n", "system = Pack(molecules=molecules, density=0.5, packing_expand_factor=5)" ] }, @@ -199,7 +199,9 @@ "source": [ "from flowermd.library import OPLS_AA_PPS\n", "\n", - "system.apply_forcefield(r_cut=2.5, force_field=OPLS_AA_PPS(), auto_scale=True, scale_charges=True)" + "system.apply_forcefield(\n", + " r_cut=2.5, force_field=OPLS_AA_PPS(), auto_scale=True, scale_charges=True\n", + ")" ] }, { @@ -358,7 +360,9 @@ "source": [ "from flowermd.base import Simulation\n", "\n", - "sim = Simulation.from_system(system=system, gsd_write_freq=100, log_write_freq=100)" + "sim = Simulation.from_system(\n", + " system=system, gsd_write_freq=100, log_write_freq=100\n", + ")" ] }, { @@ -390,7 +394,9 @@ "source": [ "from flowermd.utils import get_target_box_mass_density\n", "\n", - "target_box = get_target_box_mass_density(density=system.density, mass=system.mass.to(\"g\"))\n", + "target_box = get_target_box_mass_density(\n", + " density=system.density, mass=system.mass.to(\"g\")\n", + ")\n", "print(target_box)" ] }, @@ -446,7 +452,9 @@ } ], "source": [ - "sim.run_update_volume(n_steps=1000, period=1, kT=1, tau_kt=1, final_box_lengths=target_box)" + "sim.run_update_volume(\n", + " n_steps=1000, period=1, kT=1, tau_kt=1, final_box_lengths=target_box\n", + ")" ] }, { @@ -483,6 +491,7 @@ "outputs": [], "source": [ "import hoomd\n", + "\n", "for writer in sim.operations.writers:\n", " if isinstance(writer, hoomd.write.GSD):\n", " writer.flush()" @@ -508,9 +517,10 @@ "source": [ "from cmeutils.visualize import FresnelGSD\n", "\n", - "sim_visualizer = FresnelGSD(gsd_file=\"trajectory.gsd\", frame=0, view_axis=(1, 1, 1))\n", - "sim_visualizer.view()\n", - " " + "sim_visualizer = FresnelGSD(\n", + " gsd_file=\"trajectory.gsd\", frame=0, view_axis=(1, 1, 1)\n", + ")\n", + "sim_visualizer.view()" ] }, { @@ -614,7 +624,7 @@ } ], "source": [ - "sim_visualizer.frame=-1\n", + "sim_visualizer.frame = -1\n", "sim_visualizer.view()" ] }, diff --git a/tutorials/2-flowerMD-advanced.ipynb b/tutorials/2-flowerMD-advanced.ipynb index de0fbd46..fc3d2135 100644 --- a/tutorials/2-flowerMD-advanced.ipynb +++ b/tutorials/2-flowerMD-advanced.ipynb @@ -89,7 +89,8 @@ "outputs": [], "source": [ "import warnings\n", - "warnings.filterwarnings('ignore')" + "\n", + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -247,7 +248,9 @@ }, "outputs": [], "source": [ - "phenol_mol = Molecule(num_mols=20, file=\"../flowermd/assets/molecule_files/IPH.mol2\")" + "phenol_mol = Molecule(\n", + " num_mols=20, file=\"../flowermd/assets/molecule_files/IPH.mol2\"\n", + ")" ] }, { @@ -361,7 +364,7 @@ "gmso_top = mb_compound.to_gmso()\n", "\n", "benzene_mol = Molecule(num_mols=20, compound=mb_compound)\n", - "benzene_mol = Molecule(num_mols=20, compound=gmso_top)\n" + "benzene_mol = Molecule(num_mols=20, compound=gmso_top)" ] }, { @@ -445,7 +448,9 @@ "source": [ "from flowermd.library import FF_from_file\n", "\n", - "benzene_ff = FF_from_file(forcefield_files=\"../flowermd/assets/forcefields/benzene_opls.xml\")" + "benzene_ff = FF_from_file(\n", + " forcefield_files=\"../flowermd/assets/forcefields/benzene_opls.xml\"\n", + ")" ] }, { @@ -484,8 +489,18 @@ "outputs": [], "source": [ "from flowermd.base import BaseHOOMDForcefield\n", + "\n", + "\n", "class BeadSpring(BaseHOOMDForcefield):\n", - " def __init__(self, r_cut, beads, bonds=None, angles=None, dihedrals=None,exclusions=[\"bond\", \"1-3\"]):\n", + " def __init__(\n", + " self,\n", + " r_cut,\n", + " beads,\n", + " bonds=None,\n", + " angles=None,\n", + " dihedrals=None,\n", + " exclusions=[\"bond\", \"1-3\"],\n", + " ):\n", " # ...\n", " hoomd_forces = self._create_forcefield()\n", " super(BeadSpring, self).__init__(hoomd_forces)\n", @@ -494,8 +509,7 @@ " hoomd_forces = []\n", " # generate hoomd forces for pair interactions, bonds, angles, dihedrals, etc.\n", " # ...\n", - " return hoomd_forces\n", - "\n" + " return hoomd_forces" ] }, { @@ -716,8 +730,12 @@ "\n", "dimethylether_mol = Molecule(num_mols=20, smiles=\"COC\")\n", "pps_mol = PPS(num_mols=10, lengths=4)\n", - "multi_type_system = Pack( molecules=[dimethylether_mol, pps_mol], density=0.8)\n", - "multi_type_system.apply_forcefield(r_cut=2.5, force_field=[OPLS_AA_DIMETHYLETHER(), OPLS_AA_PPS()], auto_scale=True)" + "multi_type_system = Pack(molecules=[dimethylether_mol, pps_mol], density=0.8)\n", + "multi_type_system.apply_forcefield(\n", + " r_cut=2.5,\n", + " force_field=[OPLS_AA_DIMETHYLETHER(), OPLS_AA_PPS()],\n", + " auto_scale=True,\n", + ")" ] }, { @@ -899,10 +917,12 @@ "\n", "molecule = Molecule(num_mols=30, smiles=\"c1ccccc1\")\n", "\n", - "system = Pack(molecules=molecule, density=0.5 * unyt.g/unyt.cm**3)\n", + "system = Pack(molecules=molecule, density=0.5 * unyt.g / unyt.cm**3)\n", "system.apply_forcefield(r_cut=2.5, force_field=OPLS_AA(), auto_scale=True)\n", "\n", - "sim = Simulation(initial_state=system.hoomd_snapshot, forcefield=system.hoomd_forcefield)\n", + "sim = Simulation(\n", + " initial_state=system.hoomd_snapshot, forcefield=system.hoomd_forcefield\n", + ")\n", "\n", "sim.run_NVE(n_steps=1e3)" ] diff --git a/tutorials/3-flowerMD-coarse-graining.ipynb b/tutorials/3-flowerMD-coarse-graining.ipynb index 476a31a6..7d1d70f0 100644 --- a/tutorials/3-flowerMD-coarse-graining.ipynb +++ b/tutorials/3-flowerMD-coarse-graining.ipynb @@ -36,7 +36,8 @@ "outputs": [], "source": [ "import warnings\n", - "warnings.filterwarnings('ignore')" + "\n", + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -571,7 +572,11 @@ } ], "source": [ - "cg_sim = Simulation(initial_state=cg_system.hoomd_snapshot, forcefield=ff.hoomd_forces, gsd_write_freq=int(2e5/10))" + "cg_sim = Simulation(\n", + " initial_state=cg_system.hoomd_snapshot,\n", + " forcefield=ff.hoomd_forces,\n", + " gsd_write_freq=int(2e5 / 10),\n", + ")" ] }, { @@ -650,7 +655,9 @@ "source": [ "from cmeutils.visualize import FresnelGSD\n", "\n", - "sim_visualizer = FresnelGSD(gsd_file=\"trajectory.gsd\", frame=-1, view_axis=(1, 1, 1))\n", + "sim_visualizer = FresnelGSD(\n", + " gsd_file=\"trajectory.gsd\", frame=-1, view_axis=(1, 1, 1)\n", + ")\n", "sim_visualizer.view()" ] }, diff --git a/tutorials/4-flowerMD-welding.ipynb b/tutorials/4-flowerMD-welding.ipynb index 7fb9d4d6..c4b71feb 100644 --- a/tutorials/4-flowerMD-welding.ipynb +++ b/tutorials/4-flowerMD-welding.ipynb @@ -33,8 +33,9 @@ "metadata": {}, "outputs": [], "source": [ - " import warnings\n", - "warnings.filterwarnings('ignore')" + "import warnings\n", + "\n", + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -97,9 +98,15 @@ "\n", "system = Pack(\n", " molecules=molecule,\n", - " density=1.1 * u.g/u.cm**3,\n", + " density=1.1 * u.g / u.cm**3,\n", ")\n", - "system.apply_forcefield(r_cut=2.5, force_field=OPLS_AA(), auto_scale=True,remove_charges=True, remove_hydrogens=True)" + "system.apply_forcefield(\n", + " r_cut=2.5,\n", + " force_field=OPLS_AA(),\n", + " auto_scale=True,\n", + " remove_charges=True,\n", + " remove_hydrogens=True,\n", + ")" ] }, { @@ -134,7 +141,7 @@ "source": [ "sim = SlabSimulation.from_system(\n", " system=system,\n", - " interface_axis=(1,0,0),\n", + " interface_axis=(1, 0, 0),\n", " gsd_file_name=\"slab_x_interface.gsd\",\n", ")" ] @@ -232,9 +239,13 @@ } ], "source": [ - "target_box = flowermd.utils.get_target_box_mass_density(density=1.2*u.g/u.cm**3, mass=sim.mass.to(\"g\"))\n", + "target_box = flowermd.utils.get_target_box_mass_density(\n", + " density=1.2 * u.g / u.cm**3, mass=sim.mass.to(\"g\")\n", + ")\n", "\n", - "sim.run_update_volume(final_box_lengths=target_box, n_steps=5e4, kT=5.0, period=100, tau_kt=0.001)" + "sim.run_update_volume(\n", + " final_box_lengths=target_box, n_steps=5e4, kT=5.0, period=100, tau_kt=0.001\n", + ")" ] }, { @@ -294,7 +305,7 @@ } ], "source": [ - "sim.remove_walls(wall_axis=(1,0,0))\n", + "sim.remove_walls(wall_axis=(1, 0, 0))\n", "sim.pickle_forcefield()\n", "sim.flush_writers()" ] @@ -328,7 +339,9 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"slab_x_interface.gsd\", view_axis=(0, 1, 0), frame=-1)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"slab_x_interface.gsd\", view_axis=(0, 1, 0), frame=-1\n", + ")\n", "sim_viewer.view()" ] }, @@ -392,7 +405,7 @@ } ], "source": [ - "sim_viewer.view_axis = (1,0,0)\n", + "sim_viewer.view_axis = (1, 0, 0)\n", "sim_viewer.view()" ] }, @@ -428,7 +441,9 @@ } ], "source": [ - "interface = Interface(gsd_files=[\"slab_x_interface.gsd\"], interface_axis=(1, 0, 0), gap=0.05)\n", + "interface = Interface(\n", + " gsd_files=[\"slab_x_interface.gsd\"], interface_axis=(1, 0, 0), gap=0.05\n", + ")\n", "\n", "print(type(interface.hoomd_snapshot))\n", "print(\"Slab number of particles:\", system.n_particles)\n", @@ -512,7 +527,7 @@ " gsd_file_name=\"weld.gsd\",\n", " log_file_name=\"weld_log.txt\",\n", " log_write_freq=500,\n", - " dt=0.0003\n", + " dt=0.0003,\n", ")" ] }, @@ -616,7 +631,9 @@ ], "source": [ "weld_sim.run_NVT(kT=10.0, n_steps=7e4, tau_kt=0.001)\n", - "cooling_ramp = weld_sim.temperature_ramp(n_steps=2e4, kT_start=10.0, kT_final=2.0)\n", + "cooling_ramp = weld_sim.temperature_ramp(\n", + " n_steps=2e4, kT_start=10.0, kT_final=2.0\n", + ")\n", "weld_sim.run_NVT(kT=cooling_ramp, n_steps=2e4, tau_kt=0.001)\n", "weld_sim.save_restart_gsd(\"weld_restart.gsd\")\n", "weld_sim.flush_writers()" @@ -651,10 +668,12 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"weld.gsd\", view_axis=(0, 1, 0), frame=0, height=12)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"weld.gsd\", view_axis=(0, 1, 0), frame=0, height=12\n", + ")\n", "weld_colors = np.zeros_like(sim_viewer.positions)\n", - "weld_colors[:weld_colors.shape[0]//2 + 1] = np.array([0.5, 0.25, 0.5])\n", - "weld_colors[weld_colors.shape[0]//2 + 1:] = np.array([0.5, 0.1, 0.1])\n", + "weld_colors[: weld_colors.shape[0] // 2 + 1] = np.array([0.5, 0.25, 0.5])\n", + "weld_colors[weld_colors.shape[0] // 2 + 1 :] = np.array([0.5, 0.1, 0.1])\n", "sim_viewer.colors = weld_colors\n", "sim_viewer.view(width=500, height=500)" ] @@ -737,7 +756,9 @@ "sim_data = np.genfromtxt(\"weld_log.txt\", names=True)\n", "lj_energy = sim_data[\"mdpairLJenergy\"]\n", "time_step = sim_data[\"flowermdmodulesweldingWeldSimulationtimestep\"]\n", - "plt.plot(time_step, lj_energy/interface.hoomd_snapshot.particles.N, linewidth=3)\n", + "plt.plot(\n", + " time_step, lj_energy / interface.hoomd_snapshot.particles.N, linewidth=3\n", + ")\n", "plt.ylabel(\"$\\dfrac{\\epsilon}{N}$\", fontsize=15)\n", "plt.xlabel(\"Time step\", fontsize=15)" ] @@ -775,16 +796,16 @@ "# Open and load the forcefield picke file\n", "with open(\"forcefield.pickle\", \"rb\") as f:\n", " hoomd_forces = pickle.load(f)\n", - " \n", + "\n", "tensile_sim = Tensile(\n", " initial_state=\"weld_restart.gsd\",\n", " forcefield=hoomd_forces,\n", - " tensile_axis=(1,0,0),\n", + " tensile_axis=(1, 0, 0),\n", " gsd_file_name=\"tensile.gsd\",\n", " gsd_write_freq=1000,\n", " log_file_name=\"tensile_log.txt\",\n", " log_write_freq=500,\n", - " fix_ratio=0.30\n", + " fix_ratio=0.30,\n", ")" ] }, @@ -945,7 +966,9 @@ } ], "source": [ - "tensile_sim.run_tensile(n_steps=1e5, strain=0.30, period=500, kT=2.0, tau_kt=0.001)\n", + "tensile_sim.run_tensile(\n", + " n_steps=1e5, strain=0.30, period=500, kT=2.0, tau_kt=0.001\n", + ")\n", "tensile_sim.flush_writers()" ] }, @@ -975,10 +998,12 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"tensile.gsd\", view_axis=(0, 1, 0), frame=0, height=12)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"tensile.gsd\", view_axis=(0, 1, 0), frame=0, height=12\n", + ")\n", "weld_colors = np.zeros_like(sim_viewer.positions)\n", - "weld_colors[:weld_colors.shape[0]//2 + 1] = np.array([0.5, 0.25, 0.5])\n", - "weld_colors[weld_colors.shape[0]//2 + 1:] = np.array([0.5, 0.1, 0.1])\n", + "weld_colors[: weld_colors.shape[0] // 2 + 1] = np.array([0.5, 0.25, 0.5])\n", + "weld_colors[weld_colors.shape[0] // 2 + 1 :] = np.array([0.5, 0.1, 0.1])\n", "sim_viewer.colors = weld_colors\n", "sim_viewer.view(width=500, height=500)" ] @@ -1059,7 +1084,7 @@ " new_x = snap.configuration.box[0]\n", " strain = (new_x - initial_x_len) / initial_x_len\n", " energy = snap.log[\"md/pair/LJ/energy\"]\n", - " plt.plot(strain, energy/snap.particles.N, \"ro\")\n", + " plt.plot(strain, energy / snap.particles.N, \"ro\")\n", "\n", "plt.show()" ] diff --git a/tutorials/5-flowerMD-surface-wetting.ipynb b/tutorials/5-flowerMD-surface-wetting.ipynb index 46254ec7..2817a1b2 100644 --- a/tutorials/5-flowerMD-surface-wetting.ipynb +++ b/tutorials/5-flowerMD-surface-wetting.ipynb @@ -65,9 +65,8 @@ "from cmeutils.visualize import FresnelGSD\n", "import unyt\n", "import warnings\n", - "import os\n", "\n", - "warnings.filterwarnings('ignore')" + "warnings.filterwarnings(\"ignore\")" ] }, { @@ -111,13 +110,13 @@ ], "source": [ "polyethylene = PolyEthylene(num_mols=70, lengths=25)\n", - "droplet_system = Pack(molecules=polyethylene, density=1.0 * unyt.g/unyt.cm**3)\n", + "droplet_system = Pack(molecules=polyethylene, density=1.0 * unyt.g / unyt.cm**3)\n", "droplet_system.apply_forcefield(\n", - " force_field=OPLS_AA(), \n", - " remove_charges=True, \n", - " remove_hydrogens=True, \n", + " force_field=OPLS_AA(),\n", + " remove_charges=True,\n", + " remove_hydrogens=True,\n", " auto_scale=True,\n", - " r_cut=2.5\n", + " r_cut=2.5,\n", ")" ] }, @@ -141,7 +140,7 @@ "droplet_sim = DropletSimulation.from_system(\n", " droplet_system,\n", " gsd_file_name=\"droplet_trajectory.gsd\",\n", - " log_file_name=\"droplet_sim_data.txt\"\n", + " log_file_name=\"droplet_sim_data.txt\",\n", ")" ] }, @@ -798,9 +797,8 @@ "outputs": [], "source": [ "import gsd.hoomd\n", - "import pickle\n", "\n", - "droplet_snapshot = gsd.hoomd.open('data/polyethylene_droplet.gsd')[0]" + "droplet_snapshot = gsd.hoomd.open(\"data/polyethylene_droplet.gsd\")[0]" ] }, { @@ -840,7 +838,9 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"data/polyethylene_droplet.gsd\", view_axis=(0, 1, 0), frame=-1)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"data/polyethylene_droplet.gsd\", view_axis=(0, 1, 0), frame=-1\n", + ")\n", "sim_viewer.view()" ] }, @@ -870,11 +870,11 @@ "polyethylene_small = PolyEthylene(num_mols=10, lengths=5)\n", "droplet_system_small = Pack(molecules=polyethylene_small, density=1.0)\n", "droplet_system_small.apply_forcefield(\n", - " force_field=OPLS_AA(), \n", - " remove_charges=True, \n", - " remove_hydrogens=True, \n", + " force_field=OPLS_AA(),\n", + " remove_charges=True,\n", + " remove_hydrogens=True,\n", " auto_scale=True,\n", - " r_cut=2.5\n", + " r_cut=2.5,\n", ")" ] }, @@ -938,16 +938,10 @@ "from flowermd.library.surfaces import Graphene\n", "\n", "graphene = Graphene(\n", - " x_repeat=30,\n", - " y_repeat=30,\n", - " n_layers=2,\n", - " base_units=droplet_ref_values\n", + " x_repeat=30, y_repeat=30, n_layers=2, base_units=droplet_ref_values\n", ")\n", "graphene.apply_forcefield(\n", - " force_field=OPLS_AA(),\n", - " remove_charges=True,\n", - " auto_scale=False,\n", - " r_cut=2.5\n", + " force_field=OPLS_AA(), remove_charges=True, auto_scale=False, r_cut=2.5\n", ")" ] }, @@ -985,7 +979,7 @@ " drop_ff=droplet_ff,\n", " drop_ref_values=droplet_ref_values,\n", " box_height=12 * u.nm,\n", - " gap=0.4 * u.nm\n", + " gap=0.4 * u.nm,\n", ")" ] }, @@ -1062,7 +1056,9 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"surface_wetting_init.gsd\", view_axis=(0, 1.5, 0), frame=-1)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"surface_wetting_init.gsd\", view_axis=(0, 1.5, 0), frame=-1\n", + ")\n", "sim_viewer.view()" ] }, @@ -1111,7 +1107,7 @@ " forcefield=wetting_forcefield,\n", " fix_surface=True,\n", " gsd_file_name=\"wetting_trajectory.gsd\",\n", - " log_file_name=\"wetting_sim_data.txt\"\n", + " log_file_name=\"wetting_sim_data.txt\",\n", ")" ] }, @@ -1211,8 +1207,8 @@ "source": [ "# Uncomment to run surface wetting simulation\n", "\n", - "#wetting_sim.run_NVT(kT=3.0, n_steps=3e5, tau_kt=wetting_sim.dt*100)\n", - "#wetting_sim.flush_writers()" + "# wetting_sim.run_NVT(kT=3.0, n_steps=3e5, tau_kt=wetting_sim.dt*100)\n", + "# wetting_sim.flush_writers()" ] }, { @@ -1239,7 +1235,9 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"wetting_trajectory.gsd\", view_axis=(0, 1.5, 0), frame=-1)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"wetting_trajectory.gsd\", view_axis=(0, 1.5, 0), frame=-1\n", + ")\n", "sim_viewer.view()" ] }, @@ -1295,8 +1293,8 @@ "source": [ "# Uncomment to run the surface wetting simulation longer:\n", "\n", - "#wetting_sim.run_NVT(kT=3.0, n_steps=2e5, tau_kt=wetting_sim.dt*100)\n", - "#wetting_sim.flush_writers()" + "# wetting_sim.run_NVT(kT=3.0, n_steps=2e5, tau_kt=wetting_sim.dt*100)\n", + "# wetting_sim.flush_writers()" ] }, { @@ -1318,7 +1316,9 @@ } ], "source": [ - "sim_viewer = FresnelGSD(gsd_file=\"wetting_trajectory.gsd\", view_axis=(0, 1.5, 0), frame=-1)\n", + "sim_viewer = FresnelGSD(\n", + " gsd_file=\"wetting_trajectory.gsd\", view_axis=(0, 1.5, 0), frame=-1\n", + ")\n", "sim_viewer.view()" ] }, From dceb6313d5e6fadcce4b9196b529550590f6beca Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 13:47:21 -0600 Subject: [PATCH 03/24] [pre-commit.ci] pre-commit autoupdate (#159) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.1 → v0.6.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.1...v0.6.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 44af9a1d..09884528 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.1 # Ruff version + rev: v0.6.2 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 2cab21517ec240a6ef79dd77ab3851a302ee7c83 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 15:53:43 -0600 Subject: [PATCH 04/24] [pre-commit.ci] pre-commit autoupdate (#162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.2 → v0.6.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.2...v0.6.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09884528..be9feeeb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.2 # Ruff version + rev: v0.6.3 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 6e96d91d1747f0a2ed559985d516c9da118e454a Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 13:52:17 -0600 Subject: [PATCH 05/24] [pre-commit.ci] pre-commit autoupdate (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.3 → v0.6.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.3...v0.6.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index be9feeeb..e244b53c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.3 # Ruff version + rev: v0.6.4 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From e9205c3f411e90293288cc0abcf2f07a37663346 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:18:52 -0600 Subject: [PATCH 06/24] [pre-commit.ci] pre-commit autoupdate (#164) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.4 → v0.6.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.4...v0.6.5) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e244b53c..dfdf0233 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.4 # Ruff version + rev: v0.6.5 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From de5b32483aa968ec8b61dcece18de6f83582339b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 13:58:44 -0600 Subject: [PATCH 07/24] [pre-commit.ci] pre-commit autoupdate (#165) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.5 → v0.6.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.5...v0.6.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dfdf0233..c7b19fa0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.5 # Ruff version + rev: v0.6.7 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 74fc05f1b2591c4be4065b07e05cff4fbbbe39e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 15:18:13 -0600 Subject: [PATCH 08/24] [pre-commit.ci] pre-commit autoupdate (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.7 → v0.6.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.7...v0.6.8) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c7b19fa0..db323289 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.7 # Ruff version + rev: v0.6.8 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From c5255d770411ef975be3ef21adc21aafdcdfb236 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:35:09 +0000 Subject: [PATCH 09/24] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.8 → v0.6.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.8...v0.6.9) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db323289..0100a38c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,14 +9,14 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.8 # Ruff version + rev: v0.6.9 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] - id: ruff-format args: [ --line-length=80 ] - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer From 362adbb4f6de9c03ba90a328bdac33c0b652c379 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:54:06 -0600 Subject: [PATCH 10/24] [pre-commit.ci] pre-commit autoupdate (#168) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.6.9 → v0.7.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.6.9...v0.7.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0100a38c..e2eba3b2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 # Ruff version + rev: v0.7.0 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 2d89be9813f105e30f2442c3ffca175c7c294e27 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 14:05:26 -0600 Subject: [PATCH 11/24] [pre-commit.ci] pre-commit autoupdate (#169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.0 → v0.7.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.0...v0.7.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e2eba3b2..e7883227 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.0 # Ruff version + rev: v0.7.1 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 87cb6c44a65862cf8f9d975474f15e079f1ce962 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 12:59:16 -0700 Subject: [PATCH 12/24] [pre-commit.ci] pre-commit autoupdate (#170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.1 → v0.7.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.1...v0.7.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e7883227..82f7fe42 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.1 # Ruff version + rev: v0.7.2 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 99b4b2c9f6c6936d73d25bf5e6dd5c11cf5ce3cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:26:14 -0700 Subject: [PATCH 13/24] [pre-commit.ci] pre-commit autoupdate (#171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.7.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.7.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 82f7fe42..a07a279e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.2 # Ruff version + rev: v0.7.3 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 5ae979aad56a07dd015deffe1d649ebd8f31a836 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:50:09 -0700 Subject: [PATCH 14/24] [pre-commit.ci] pre-commit autoupdate (#172) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.3 → v0.7.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.3...v0.7.4) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a07a279e..3fa374c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.3 # Ruff version + rev: v0.7.4 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 579332a36d1afe27de20718fcf29f372a6801ead Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 19:44:56 +0000 Subject: [PATCH 15/24] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.4...v0.8.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3fa374c6..9126b87c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.7.4 # Ruff version + rev: v0.8.0 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 5a8406981833e6d51c26af47250cd04d3d53601b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 09:29:56 -0700 Subject: [PATCH 16/24] [pre-commit.ci] pre-commit autoupdate (#174) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.0 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.0...v0.8.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9126b87c..a5a1f4e4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.0 # Ruff version + rev: v0.8.1 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 867c085c7ba6d070c8eec3414da61c858da36cea Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 06:20:46 -0700 Subject: [PATCH 17/24] [pre-commit.ci] pre-commit autoupdate (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.1 → v0.8.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.1...v0.8.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5a1f4e4..cd638105 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.1 # Ruff version + rev: v0.8.2 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From ce26407395f6e1cd42a76a01b64e5c88e25ad90d Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 13:05:34 -0700 Subject: [PATCH 18/24] [pre-commit.ci] pre-commit autoupdate (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.2 → v0.8.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.2...v0.8.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd638105..30b2f1f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.2 # Ruff version + rev: v0.8.3 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 956eb148bf9cf283df7b479b91f97f112a186ecb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 19:53:22 +0000 Subject: [PATCH 19/24] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.3 → v0.8.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.3...v0.8.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 30b2f1f6..4c8fd163 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.3 # Ruff version + rev: v0.8.4 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From f6da360bf8edd7bcc39d778664c5faa88a519302 Mon Sep 17 00:00:00 2001 From: Chris Jones <50423140+chrisjonesBSU@users.noreply.github.com> Date: Sat, 18 Jan 2025 14:27:39 -0700 Subject: [PATCH 20/24] Update CI file and environments (#180) * update ci workflows and env file * uncomment mambaforge version * replace Mambaforge with Miniforge * Fix Miniforge name * fix version * update unit tests * fix variable name * add python 3.12 to test matrix --- .github/workflows/pytest.yml | 18 +++++++++--------- environment-dev.yml | 4 ++-- environment.yml | 4 ++-- flowermd/tests/base/test_molecule.py | 10 +++++----- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 9e46e8b0..93275870 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -29,8 +29,8 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest, macOS-13, ubuntu-latest] - python-version: ['3.10', '3.11'] + os: [macos-14, ubuntu-24.04] + python-version: ['3.10', '3.11', '3.12'] runs-on: ${{ matrix.os }} @@ -43,8 +43,8 @@ jobs: with: environment-file: environment-dev.yml python-version: ${{ matrix.python-version }} - miniforge-variant: Mambaforge - miniforge-version: 4.9.2-4 + miniforge-variant: Miniforge3 + miniforge-version: 24.11.0-0 use-mamba: true - name: Install package @@ -63,7 +63,7 @@ jobs: test-tutorials: if: ${{ github.event.issue.pull_request && github.event.comment.body== '/testtutorials'}} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Put a reaction to the comment run: gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}" @@ -96,14 +96,14 @@ jobs: PR_NUMBER: ${{ github.event.issue.number }} - name: Check out repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build environment - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment-dev.yml - miniforge-variant: Mambaforge - miniforge-version: 4.9.2-4 + miniforge-variant: Miniforge3 + miniforge-version: 24.11.0-0 use-mamba: true - name: Install package diff --git a/environment-dev.yml b/environment-dev.yml index 3285b1f1..0f881fa2 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -8,7 +8,7 @@ dependencies: - gmso >=0.12.0 - gsd >=3.0 - grits >=0.5.0 - - hoomd >=4.5 + - hoomd >=4.5, <5.0 - mbuild >=0.17.0 - numpy <2.0 - openbabel >=3 @@ -18,6 +18,6 @@ dependencies: - pytest - pytest-cov - nbmake - - python >=3.10, <3.12 + - python >=3.10, <3.13 - fresnel >=0.13.5 - cmeutils >=1.3 diff --git a/environment.yml b/environment.yml index 4caf1ddc..3305ba5d 100644 --- a/environment.yml +++ b/environment.yml @@ -8,12 +8,12 @@ dependencies: - gmso >=0.12.0 - gsd >=3.0 - grits >=0.5.0 - - hoomd >=4.5 + - hoomd >=4.5, <5.0 - mbuild >=0.17.0 - numpy <2.0 - openbabel >=3 - pip - py3Dmol - - python >=3.10, <3.12 + - python >=3.10, <3.13 - fresnel >=0.13.5 - cmeutils >=1.3 diff --git a/flowermd/tests/base/test_molecule.py b/flowermd/tests/base/test_molecule.py index b6ad615c..351f722e 100644 --- a/flowermd/tests/base/test_molecule.py +++ b/flowermd/tests/base/test_molecule.py @@ -207,8 +207,8 @@ def test_polymer_different_chain_lengths(self, dimethylether_smiles): bond_orientation=[None, None], ) assert polymer.n_particles == 53 - assert len(polymer.molecules[0].labels["Compound"]) == 3 - assert len(polymer.molecules[1].labels["Compound"]) == 4 + assert len(polymer.molecules[0].children) == 3 + assert len(polymer.molecules[1].children) == 4 def test_polymer_different_num_mol(self, dimethylether_smiles): polymer = Polymer( @@ -220,9 +220,9 @@ def test_polymer_different_num_mol(self, dimethylether_smiles): bond_orientation=[None, None], ) assert polymer.n_particles == 55 - assert len(polymer.molecules[0].labels["Compound"]) == 3 - assert len(polymer.molecules[1].labels["Compound"]) == 2 - assert len(polymer.molecules[2].labels["Compound"]) == 2 + assert len(polymer.molecules[0].children) == 3 + assert len(polymer.molecules[1].children) == 2 + assert len(polymer.molecules[2].children) == 2 def test_polymer_unequal_num_mol_length(self, dimethylether_smiles): with pytest.raises(ValueError): From 7d8d8c15ac23b2f4b92e504078f39b44340f9be9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 19 Jan 2025 10:53:43 -0700 Subject: [PATCH 21/24] [pre-commit.ci] pre-commit autoupdate (#179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.5.7 → v0.6.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.5.7...v0.6.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix indent * [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.9.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: chrisjonesBSU --- .pre-commit-config.yaml | 2 +- flowermd/base/molecule.py | 3 +-- flowermd/base/simulation.py | 3 +-- flowermd/base/system.py | 3 +-- flowermd/modules/surface_wetting/surface_wetting.py | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c8fd163..915bf97f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.4 # Ruff version + rev: v0.9.1 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] diff --git a/flowermd/base/molecule.py b/flowermd/base/molecule.py index c517f57b..aa33e603 100644 --- a/flowermd/base/molecule.py +++ b/flowermd/base/molecule.py @@ -525,8 +525,7 @@ def _build(self, length): self.periodic_bond_axis, str ) or self.periodic_bond_axis.lower() not in ["x", "y", "z"]: raise ValueError( - "Valid choices for a `periodic_bond_axis` are " - "'x', 'y', 'z'" + "Valid choices for a `periodic_bond_axis` are 'x', 'y', 'z'" ) add_hydrogens = False else: diff --git a/flowermd/base/simulation.py b/flowermd/base/simulation.py index 4e62b832..db6fe52b 100644 --- a/flowermd/base/simulation.py +++ b/flowermd/base/simulation.py @@ -73,8 +73,7 @@ def __init__( ): if not isinstance(forcefield, Iterable) or isinstance(forcefield, str): raise ValueError( - "forcefield must be a sequence of " - "hoomd.md.force.Force objects." + "forcefield must be a sequence of hoomd.md.force.Force objects." ) else: for obj in forcefield: diff --git a/flowermd/base/system.py b/flowermd/base/system.py index dc2b0107..820f0bd6 100644 --- a/flowermd/base/system.py +++ b/flowermd/base/system.py @@ -660,8 +660,7 @@ def __init__( if not isinstance(density, u.array.unyt_quantity): self.density = density * u.Unit("g") / u.Unit("cm**3") warnings.warn( - "Units for density were not given, assuming " - "units of g/cm**3." + "Units for density were not given, assuming units of g/cm**3." ) else: self.density = density diff --git a/flowermd/modules/surface_wetting/surface_wetting.py b/flowermd/modules/surface_wetting/surface_wetting.py index 3f35383e..ea2e86aa 100644 --- a/flowermd/modules/surface_wetting/surface_wetting.py +++ b/flowermd/modules/surface_wetting/surface_wetting.py @@ -102,8 +102,7 @@ def run_droplet( shrink_density, u.array.unyt_quantity ) and not isinstance(final_density, u.array.unyt_quantity): warnings.warn( - "Units for density were not given, assuming " - "units of g/cm**3." + "Units for density were not given, assuming units of g/cm**3." ) target_box_shrink = get_target_box_mass_density( density=shrink_density * (u.g / (u.cm**3)), From c2ad06897a9b951627278cdb6659a52559568f64 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 13:34:17 -0700 Subject: [PATCH 22/24] [pre-commit.ci] pre-commit autoupdate (#181) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.1 → v0.9.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.1...v0.9.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 915bf97f..8b3006cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.1 # Ruff version + rev: v0.9.2 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203] From 0376b0535834f07fe14b29451b6623bd1d81b11a Mon Sep 17 00:00:00 2001 From: Chris Jones <50423140+chrisjonesBSU@users.noreply.github.com> Date: Fri, 24 Jan 2025 11:54:35 -0700 Subject: [PATCH 23/24] Replace `setup.py` with `pyproject.toml`, update CI (#182) * update ci workflows and env file * uncomment mambaforge version * replace Mambaforge with Miniforge * Fix Miniforge name * fix version * update unit tests * fix variable name * add python 3.12 to test matrix * Replace setup.py with pyproject.toml file * update version in pyproject.toml, use mamba runner instead of miniconda * add comma * put version in __init__.py --- .github/workflows/pytest.yml | 17 +++--- flowermd/__init__.py | 2 + flowermd/__version__.py | 3 - pyproject.toml | 43 +++++++++++++ setup.py | 114 ----------------------------------- 5 files changed, 52 insertions(+), 127 deletions(-) delete mode 100644 flowermd/__version__.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 93275870..f9e5c973 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -39,13 +39,11 @@ jobs: uses: actions/checkout@v4 - name: Build environment - uses: conda-incubator/setup-miniconda@v3 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml - python-version: ${{ matrix.python-version }} - miniforge-variant: Miniforge3 - miniforge-version: 24.11.0-0 - use-mamba: true + create-args: >- + python=${{ matrix.python-version }} - name: Install package shell: bash -l {0} @@ -56,7 +54,7 @@ jobs: run: python -m pytest -rs -v --cov=./ --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml @@ -99,12 +97,11 @@ jobs: uses: actions/checkout@v4 - name: Build environment - uses: conda-incubator/setup-miniconda@v3 + uses: mamba-org/setup-micromamba@v2 with: environment-file: environment-dev.yml - miniforge-variant: Miniforge3 - miniforge-version: 24.11.0-0 - use-mamba: true + create-args: >- + python=3.12 - name: Install package shell: bash -l {0} diff --git a/flowermd/__init__.py b/flowermd/__init__.py index f8c66533..f88ad9cf 100644 --- a/flowermd/__init__.py +++ b/flowermd/__init__.py @@ -10,3 +10,5 @@ Simulation, System, ) + +__version__ = "1.3.1" diff --git a/flowermd/__version__.py b/flowermd/__version__.py deleted file mode 100644 index d00a693c..00000000 --- a/flowermd/__version__.py +++ /dev/null @@ -1,3 +0,0 @@ -VERSION = (1, 3, 1) - -__version__ = ".".join(map(str, VERSION)) diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..e8437a17 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools>=61.2", "versioningit"] +build-backend = "setuptools.build_meta" + +[project] +name = "flowermd" +description = "Framework for building and running coplex simulaiton workflows with MosDeF and HOOMD-Blue." +readme = "README.md" +authors = [ + {name = "Chris Jones", email = "chrisjones4@u.boisestate.edu"}, + {name = "Marjan Albooyeh", email = "marjanalbooyeh@u.boisestate.edu"}, + {name = "Eric Jankowski", email = "ericjankowski@boisestate.edu"} +] +license= {text = "GPLv3"} +classifiers=[ + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: Python", + "Programming Language :: Python :: 3", +] +urls = {Homepage = "https://github.com/cmelab/flowermd"} +requires-python = ">=3.10" +dynamic = ["version"] + +[tool.setuptools] +zip-safe = false +include-package-data = true +license-files = ["LICENSE"] + +[tool.setuptools.packages] +find = {namespaces = false} + +[tool.setuptools.package-data] +flowermd = [ + '"modules/**"', + '"library/**"', + '"assets/forcefields/**"', + '"assets/molecule_files/**"', + '"utils/**"', + '"internal/**"', +] + +[tool.setuptools.dynamic] +version = {attr = "flowermd.__version__"} diff --git a/setup.py b/setup.py deleted file mode 100644 index 7369f8ab..00000000 --- a/setup.py +++ /dev/null @@ -1,114 +0,0 @@ -import os -import sys -from shutil import rmtree - -from setuptools import Command, find_packages, setup - -# Package meta-data. -NAME = "flowermd" -DESCRIPTION = ( - "Package making it easier to build and simulate polymers in Hoomd-Blue." -) -URL = "https://github.com/cmelab/flowerMD" -EMAIL = "chrisjones4@u.boisestate.edu" -AUTHOR = "CME Lab" -REQUIRES_PYTHON = ">=3.10.0" -VERSION = None - -# What packages are required for this module to be executed? -REQUIRED = [] - -# Follow the README and use the environment.yml file to install -# the needed packages. -# ------------------------------------------------ - -here = os.path.abspath(os.path.dirname(__file__)) - -# Load the package's __version__.py module as a dictionary. -about = {} -if not VERSION: - with open(os.path.join(here, NAME, "__version__.py")) as f: - exec(f.read(), about) -else: - about["__version__"] = VERSION - - -class UploadCommand(Command): - """Support setup.py upload.""" - - description = "Build and publish the package." - user_options = [] - - @staticmethod - def status(s): - """Prints things in bold.""" - print("\033[1m{0}\033[0m".format(s)) - - def initialize_options(self): - pass - - def finalize_options(self): - pass - - def run(self): - try: - self.status("Removing previous builds…") - rmtree(os.path.join(here, "dist")) - except OSError: - pass - - self.status("Building Source and Wheel (universal) distribution…") - os.system( - "{0} setup.py sdist bdist_wheel --universal".format(sys.executable) - ) - - self.status("Uploading the package to PyPi via Twine…") - os.system("twine upload dist/*") - - self.status("Pushing git tags…") - os.system("git tag v{0}".format(about["__version__"])) - os.system("git push --tags") - - sys.exit() - - -setup( - name=NAME, - version=about["__version__"], - description=DESCRIPTION, - author=AUTHOR, - author_email=EMAIL, - python_requires=REQUIRES_PYTHON, - url=URL, - packages=find_packages( - exclude=( - "tests", - "docs", - ) - ), - package_data={ - "flowermd": [ - "modules/**", - "library/**", - "assets/forcefields/**", - "assets/molecule_files/**", - "utils/**", - "internal/**", - ], - }, - install_requires=REQUIRED, - include_package_data=True, - license="GPLv3", - classifiers=[ - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - ], - # $ setup.py publish support. - cmdclass={ - "upload": UploadCommand, - }, -) From 95198060bd07b19270e40d0ce7eb59ea32a5183b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 13:51:44 -0700 Subject: [PATCH 24/24] [pre-commit.ci] pre-commit autoupdate (#185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.9.2 → v0.9.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.9.2...v0.9.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b3006cc..6cd72352 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ ci: submodules: false repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.9.2 # Ruff version + rev: v0.9.3 # Ruff version hooks: - id: ruff args: [--fix, --extend-ignore=E203]