From e2119782c168d308ae4135be2004adc531e7be6a Mon Sep 17 00:00:00 2001 From: "Matthew W. Thompson" Date: Mon, 4 Nov 2024 09:07:34 -0600 Subject: [PATCH] Set box vectors for GROMACS example --- .../BRD4_inhibitor_benchmark.ipynb | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb b/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb index 3d3d247d3..a15bb1387 100644 --- a/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb +++ b/examples/using_smirnoff_with_amber_protein_forcefield/BRD4_inhibitor_benchmark.ipynb @@ -40,7 +40,7 @@ "metadata": {}, "outputs": [], "source": [ - "from openff.toolkit import ForceField, Molecule, Topology" + "from openff.toolkit import ForceField, Molecule, Quantity, Topology" ] }, { @@ -74,10 +74,22 @@ "tags": [] }, "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Support for writing out LAMMPS data files will be removed\n", + "in mbuild 1.0.\n", + "See GMSO (https://github.com/mosdef-hub/gmso/tree/main/gmso/formats/lammpsdata) for\n", + "continued support for LAMMPS.\n", + "\n" + ] + }, { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "2f3b86c392c24705b86721395cf43ea4", + "model_id": "3ead8bf62c2d49f1b6776a59e34a7a1d", "version_major": 2, "version_minor": 0 }, @@ -90,8 +102,8 @@ "name": "stderr", "output_type": "stream", "text": [ - "/Users/jeffreywagner/projects/OpenForceField/openff-interchange/openff/interchange/_experimental.py:35: UserWarning: Interchange object combination is experimental and likely to produce strange results. Any workflow using this method is not guaranteed to be suitable for production. Use with extreme caution and thoroughly validate results!\n", - " return func(*args, **kwargs)\n" + "/Users/mattthompson/software/openff-interchange/openff/interchange/operations/_combine.py:52: InterchangeCombinationWarning: Interchange object combination is complex and likely to produce strange results outside of a limited set of use cases it has been tested in. Any workflow using this method is not guaranteed to be suitable for production or stable between versions. Use with extreme caution and thoroughly validate results!\n", + " warnings.warn(\n" ] } ], @@ -109,9 +121,8 @@ "\n", "complex_system = receptor.combine(ligand)\n", "\n", - "# TODO\n", - "# complex.box = pdbfile box vectors ...\n", - "# complex.positions = np.vstack([receptor.positions, ligand.positions])" + "# Pseudo-vacuum\n", + "complex_system.box = Quantity([5, 5, 5], \"nanometer\")" ] }, { @@ -129,7 +140,7 @@ { "data": { "text/plain": [ - " >" + " >" ] }, "execution_count": 5, @@ -175,16 +186,7 @@ "metadata": { "tags": [] }, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "/Users/jeffreywagner/projects/OpenForceField/openff-interchange/openff/interchange/interop/gromacs/export/_export.py:48: UserWarning: WARNING: System defined with no box vectors, which GROMACS does not offically support in versions 2020 or newer (see https://gitlab.com/gromacs/gromacs/-/issues/3526). Setting box vectors to a 5 nm cube.\n", - " self._write_gro(gro, decimal)\n" - ] - } - ], + "outputs": [], "source": [ "complex_system.to_gro(\"complex.gro\")\n", "complex_system.to_top(\"complex.top\")" @@ -194,7 +196,7 @@ "metadata": { "category": "force_field_interop", "kernelspec": { - "display_name": "Python 3 (ipykernel)", + "display_name": "Python 3", "language": "python", "name": "python3" }, @@ -208,7 +210,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.10" + "version": "3.10.15" } }, "nbformat": 4,