diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_1.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_1.ipynb deleted file mode 100644 index c16083c6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_1.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#plotting rmsd of both simulations\n", - "from IPython.display import Image\n", - "rmsd1ID = 'rmsd_1MBN'\n", - "rmsd2ID = '' # not saved\n", - "path1 = registry.get_mapped_path(rmsd1ID)\n", - "path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "Image(filename=path1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_10.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_10.ipynb deleted file mode 100644 index d105aae9..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_10.ipynb +++ /dev/null @@ -1,175 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-3.5-turbo-0125\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "892fe48c", - "metadata": {}, - "outputs": [], - "source": [ - "all_paths" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps \n", - "3. Logic make sense ✅\n", - "4. Correct Answer " - ] - }, - { - "cell_type": "markdown", - "id": "bff27c19", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_11.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_11.ipynb deleted file mode 100644 index 55be9ffa..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_073719')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_12.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_12.ipynb deleted file mode 100644 index 2319061c..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_12.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "markdown", - "id": "2070dda7", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b8d2c7d2", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_13.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_13.ipynb deleted file mode 100644 index af751c27..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_13.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense \n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_15.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_15.ipynb deleted file mode 100644 index 43e85b72..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_15.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_124309\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_124307\")\n", - "\n", - "traj_path_2 = registry.get_mapped_path(\"rec0_124850\")\n", - "top_path_2 = registry.get_mapped_path(\"top_sim0_124850\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(traj_path_2)\n", - "assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj1 = md.load(traj_path_1, top=top_path_1)\n", - "traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "#number of framees, adn total residues simulated\n", - "print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_16.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_16.ipynb deleted file mode 100644 index e37d7b29..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_16.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_165119\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_165108\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"fig0_233807\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "from IPython.display import display, Image\n", - "#print number of frames adn residues:\n", - "traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "print(\"Number of frames: \", traj.n_frames)\n", - "Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_17.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_17.ipynb deleted file mode 100644 index a091c522..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_17.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_173932\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_173924\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_231922\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_232021\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_18.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_18.ipynb deleted file mode 100644 index 42ce510c..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_18.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_19.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_19.ipynb deleted file mode 100644 index 6ef313e6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_19.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt18 = \"Download the PDB for 2YXF. Tell me about its stability, as found in literature. Then, simulate it for 1ns and plot its RMSD over time.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt18)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_172050\")\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌ \n", - "### Logic make sense ❌ \n", - "### Correct Answer ❌ " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_2.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_2.ipynb deleted file mode 100644 index e92a2515..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_2.ipynb +++ /dev/null @@ -1,111 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_20.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_20.ipynb deleted file mode 100644 index f68f16e6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_20.ipynb +++ /dev/null @@ -1,106 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucinations ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_21.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_21.ipynb deleted file mode 100644 index 39b09d79..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_21.ipynb +++ /dev/null @@ -1,96 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_22.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_22.ipynb deleted file mode 100644 index c6fca7e3..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_before = registry.get_mapped_path(\"1A3N_214800\")\n", - "# path_after = registry.get_mapped_path(\"1A3N_214817\")\n", - "# assert os.path.exists(path_before)\n", - "# assert os.path.exists(path_after)\n", - "# assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# raw_file = md.load(path_before)\n", - "# clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #residues before\n", - "# residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "# residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "# print(\"Residues before:\",residues_before)\n", - "# print(\"Residues after:\",residues_after)\n", - "# print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_23.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_23.ipynb deleted file mode 100644 index 7ccf4b0b..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_23.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(300)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "trajectory_path = registry.get_mapped_path(\"rec0_140705\")\n", - "topology_path = registry.get_mapped_path(\"top_sim0_140703\")\n", - "assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "import mdtraj as md\n", - "traj = md.load(trajectory_path, top=topology_path)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌\n", - "### No hallucinatino ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_24.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_24.ipynb deleted file mode 100644 index 49dfea8a..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_24.ipynb +++ /dev/null @@ -1,146 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time \n", - "time.sleep(300)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_traj = registry.get_mapped_path(\"rec0_155251\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_155247\")\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "from IPython.display import Image\n", - "Image(filename=rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucinations ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_25.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_25.ipynb deleted file mode 100644 index a72ebe8e..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_25.ipynb +++ /dev/null @@ -1,139 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(350)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_144350\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_144351\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=path_oxygenated)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_deoxygenated)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucinations ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_3.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_3.ipynb deleted file mode 100644 index 2de2d6c2..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_3.ipynb +++ /dev/null @@ -1,116 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# path = registry.get_mapped_path(\"\")\n", - "# traj = md.load(path)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "# print(\"Number of chains: \",number_of_chains)\n", - "# print(\"Number of sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "# print(\"Number of helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "# print(\"Number of coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌\n" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_4.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_4.ipynb deleted file mode 100644 index b278c044..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_4.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Hallucinates tools and information" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_5.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_5.ipynb deleted file mode 100644 index e5a003e8..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_5.ipynb +++ /dev/null @@ -1,137 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj_path = registry.get_mapped_path(\"rec0_220342\")\n", - "top_path = registry.get_mapped_path(\"top_sim0_220341\")\n", - "traj = md.load(traj_path, top=top_path)\n", - "\n", - "# Compute the secondary structure of the trajectory\n", - "dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps \n", - "- hallucinated secondary structure instead of measuring \n", - "\n", - "### Logic make sense ✅\n", - "- plan was correct, just hallucinated, as seen above\n", - "\n", - "### Correct Answer \n", - "- would have been correct if it had not hallucinated" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_6.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_6.ipynb deleted file mode 100644 index 2ec8a913..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_6.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_7.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_7.ipynb deleted file mode 100644 index 5882cb40..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_7.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_8.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_8.ipynb deleted file mode 100644 index 402730fa..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_8.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")\n", - "path_3 = registry.get_mapped_path(\"\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_9.ipynb b/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_9.ipynb deleted file mode 100644 index bc522759..00000000 --- a/notebooks/experiments/experiment_k2/gpt-3.5-turbo-0125/exp_9.ipynb +++ /dev/null @@ -1,96 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_1.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_1.ipynb deleted file mode 100644 index d2bd2ec2..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_1.ipynb +++ /dev/null @@ -1,149 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #plotting rmsd of both simulations\n", - "# from IPython.display import Image\n", - "# rmsd1ID = 'fig0_192900'\n", - "# rmsd2ID = 'fig0_192903'\n", - "# path1 = registry.get_mapped_path(rmsd1ID)\n", - "# path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "\n", - "# Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_10.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_10.ipynb deleted file mode 100644 index 567f9630..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_10.ipynb +++ /dev/null @@ -1,188 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-4-1106-preview\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9b8924a9", - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "end_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"end time:\",end_time)" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the check counts" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ac6db7f4-0d84-4716-a04d-0ccdab56a36f", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(all_paths[0])\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ✅\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_11.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_11.ipynb deleted file mode 100644 index 90c04902..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_073719')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_12.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_12.ipynb deleted file mode 100644 index fd30fd5e..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_12.ipynb +++ /dev/null @@ -1,181 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "match1 = pattern1.search(all_names)\n", - "match2 = pattern2.search(all_names)\n", - "assert match1\n", - "assert match2\n", - "print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "path1 = registry.get_mapped_path(match1.group(0))\n", - "path2 = registry.get_mapped_path(match2.group(0))\n", - "assert os.path.exists(path1)\n", - "assert os.path.exists(path2)\n", - "print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5c9a6ace-69e8-4042-9d35-ca598f4d00c2", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('protein 8PFK')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)\n", - "traj = md.load(path2)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('\\nprotein 8PFQ')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "cef131f3", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "508cd9be", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_13.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_13.ipynb deleted file mode 100644 index b25c7a21..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_13.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_16.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_16.ipynb deleted file mode 100644 index 80ef56b6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_16.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"\") \n", - "top_path_1 = registry.get_mapped_path(\"\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "from IPython.display import display, Image\n", - "#print number of frames adn residues:\n", - "traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "print(\"Number of frames: \", traj.n_frames)\n", - "Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucinations ❌\n", - "### Logic make sense ❌ \n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_17.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_17.ipynb deleted file mode 100644 index eb132817..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_17.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_173932\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_173924\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_231922\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_232021\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_18.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_18.ipynb deleted file mode 100644 index d4d8d7fb..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_18.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_19.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_19.ipynb deleted file mode 100644 index e13eb109..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_19.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt18 = \"Download the PDB for 2YXF. Tell me about its stability, as found in literature. Then, simulate it for 1ns and plot its RMSD over time.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt18)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_125631\")\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ✅ \n", - "### No hallucination ✅\n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅ " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_2.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_2.ipynb deleted file mode 100644 index d42148be..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_2.ipynb +++ /dev/null @@ -1,133 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#show the image from the path of the registry and the ID \n", - "import nglview as nv\n", - "path = registry.get_mapped_path(\"1LYZ_190832\")\n", - "view = nv.show_file(path)\n", - "view" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_20.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_20.ipynb deleted file mode 100644 index 0e0ff1f4..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_20.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_21.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_21.ipynb deleted file mode 100644 index 6926f7fb..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_21.ipynb +++ /dev/null @@ -1,106 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214714\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_22.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_22.ipynb deleted file mode 100644 index 313528a2..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_before = registry.get_mapped_path(\"1A3N_215309\")\n", - "path_after = registry.get_mapped_path(\"1A3N_215325\")\n", - "assert os.path.exists(path_before)\n", - "assert os.path.exists(path_after)\n", - "assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "raw_file = md.load(path_before)\n", - "clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#residues before\n", - "residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "print(\"Residues before:\",residues_before)\n", - "print(\"Residues after:\",residues_after)\n", - "print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_23.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_23.ipynb deleted file mode 100644 index a072ad4c..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_23.ipynb +++ /dev/null @@ -1,113 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "trajectory_path = registry.get_mapped_path(\"\")\n", - "topology_path = registry.get_mapped_path(\"\")\n", - "assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "import mdtraj as md\n", - "traj = md.load(trajectory_path, top=topology_path)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_24.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_24.ipynb deleted file mode 100644 index e768b709..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_24.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_traj = registry.get_mapped_path(\"\")\n", - "path_top = registry.get_mapped_path(\"\")\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_155838\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "from IPython.display import Image\n", - "Image(filename=rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_25.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_25.ipynb deleted file mode 100644 index 4c5642b5..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_25.ipynb +++ /dev/null @@ -1,153 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent = MDAgent(agent_type=\"Structured\", ckpt_dir=\"ckpt_279\")\n", - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions().replace(\",\",\"\\n\"))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_121707\")\n", - "#path_deoxygenated = registry.get_mapped_path(\"fig0_144351\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "#assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "#assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Bug saving the paths from the rdf function. Below the plots are shown, but the experiments counts as incorrect answer\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=path_oxygenated)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_deoxygenated)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_3.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_3.ipynb deleted file mode 100644 index 38dd7bc3..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_3.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "path = registry.get_mapped_path(\"1GZX_202129\")\n", - "traj = md.load(path)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_4.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_4.ipynb deleted file mode 100644 index b833c7fe..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_4.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_5.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_5.ipynb deleted file mode 100644 index b5089ca4..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_5.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj_path = registry.get_mapped_path(\"rec2_164856\")\n", - "# top_path = registry.get_mapped_path(\"top_sim0_164856\")\n", - "# traj = md.load(traj_path, top=top_path)\n", - "\n", - "# # Compute the secondary structure of the trajectory\n", - "# dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "# dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "# print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "# print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "# print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "# print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "# print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "# print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ❌\n", - "\n", - "### Logic make sense ❌\n", - "- the agent didn't mention downloading or cleaning the pdb file\n", - "- the agent didn't describe doing SS analysis twice\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_6.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_6.ipynb deleted file mode 100644 index d3956926..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_6.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense \n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_7.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_7.ipynb deleted file mode 100644 index 07da81a3..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_7.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_8.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_8.ipynb deleted file mode 100644 index 0779a3da..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_8.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")\n", - "path_3 = registry.get_mapped_path(\"\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_9.ipynb b/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_9.ipynb deleted file mode 100644 index 252681dd..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-1106-preview/exp_9.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_1.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_1.ipynb deleted file mode 100644 index 87b1b424..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_1.ipynb +++ /dev/null @@ -1,149 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #plotting rmsd of both simulations\n", - "# from IPython.display import Image\n", - "# rmsd1ID = 'fig0_192900'\n", - "# rmsd2ID = 'fig0_192903'\n", - "# path1 = registry.get_mapped_path(rmsd1ID)\n", - "# path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "\n", - "# Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_10.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_10.ipynb deleted file mode 100644 index 52620c58..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_10.ipynb +++ /dev/null @@ -1,159 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.'''\n", - "model='gpt-4-turbo-2024-04-09'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()\n", - "print(all_paths)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0, \"Nothing is downloaded\"\n", - "assert pattern.search(all_paths[0]), \"IAEE is not in path registry\"\n", - "assert os.path.exists(all_paths[0]), \"This 1AEE pdb file doesn't physically exist\"\n", - "print('It is asserted that 1AEE pdb is in path_registry and this file exists.')" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "790b786b-95e1-4359-a76b-55c20b4cb261", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ❌\n", - "4. Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "id": "f3c2e3a5", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_11.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_11.ipynb deleted file mode 100644 index eeb47b4d..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_073719')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_12.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_12.ipynb deleted file mode 100644 index 90ea2463..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_12.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "# import re\n", - "# import os\n", - "# pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "# pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "# match1 = pattern1.search(all_names)\n", - "# match2 = pattern2.search(all_names)\n", - "# assert match1\n", - "# assert match2\n", - "# print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "# path1 = registry.get_mapped_path(match1.group(0))\n", - "# path2 = registry.get_mapped_path(match2.group(0))\n", - "# assert os.path.exists(path1)\n", - "# assert os.path.exists(path2)\n", - "# print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "aeedf6a8-8773-4402-81c9-81dea40844d6", - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# traj = md.load(path1)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# number_of_atoms = top.n_atoms\n", - "# print('protein 8PFK')\n", - "# print('Number of chains: ', number_of_chains)\n", - "# print('Number of atoms: ', number_of_atoms)\n", - "# traj = md.load(path2)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# number_of_atoms = top.n_atoms\n", - "# print('\\nprotein 8PFQ')\n", - "# print('Number of chains: ', number_of_chains)\n", - "# print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "a8bcb320-b57c-4f53-8d77-f6bc500b55a5", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ❌\n", - "4. Correct Answer ❌\n", - "5. Number of steps completed: 0️⃣\n", - "6. % steps completed: 0️⃣%" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_13.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_13.ipynb deleted file mode 100644 index a69e3bd2..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_13.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-turbo-2024-04-09\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_14.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_14.ipynb deleted file mode 100644 index e19e28c0..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_14.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "\n", - "path_1 = registry.get_mapped_path(\"fig0_145833\")\n", - "path_2 = registry.get_mapped_path(\"fig0_145836\")\n", - "\n", - "assert os.path.exists(path_1), \"Path does not exist\"\n", - "assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_15.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_15.ipynb deleted file mode 100644 index ec6316bb..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_15.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_134326\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_134325\")\n", - "\n", - "traj_path_2 = registry.get_mapped_path(\"rec0_134813\")\n", - "top_path_2 = registry.get_mapped_path(\"top_sim0_134813\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(traj_path_2)\n", - "assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj1 = md.load(traj_path_1, top=top_path_1)\n", - "# traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "# #number of framees, adn total residues simulated\n", - "# print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "# print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "# print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "# print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_16.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_16.ipynb deleted file mode 100644 index b82c294b..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_16.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_134326\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_134322\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"fig0_202601\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "# from IPython.display import display, Image\n", - "# #print number of frames adn residues:\n", - "# traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "# print(\"Number of frames: \", traj.n_frames)\n", - "# Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### No hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_17.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_17.ipynb deleted file mode 100644 index 8af5fe9d..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_17.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_141200\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_141156\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_195709\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_195802\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "# Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary step ❌\n", - "### No Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_18.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_18.ipynb deleted file mode 100644 index d898da10..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_18.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB file for 1XQ8. Then, save the visualization for it.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm the files were downloaded/made and check the visualization" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "790b786b-95e1-4359-a76b-55c20b4cb261", - "metadata": { - "jp-MarkdownHeadingCollapsed": true - }, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ❌\n", - "5. Number of steps completed: 0️⃣\n", - "6. % steps completed: 0️⃣%" - ] - }, - { - "cell_type": "markdown", - "id": "4e33c8b2", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_19.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_19.ipynb deleted file mode 100644 index 5166a184..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_19.ipynb +++ /dev/null @@ -1,104 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB for 2YXF. Tell me about its stability, as found in literature. Then, simulate it for 1ns and plot its RMSD over time.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_122034\")\n", - "assert os.path.exists(path_rmsd), \"This path doesn't exist\"\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌ \n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ✅ \n", - "### Correct Answer ❌ " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_2.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_2.ipynb deleted file mode 100644 index b8ac5710..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_2.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#show the image from the path of the registry and the ID \n", - "import nglview as nv\n", - "path = registry.get_mapped_path(\"1LYZ_201631\")\n", - "view = nv.show_file(path)\n", - "view" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅\n", - "### Number of steps completed: 1️⃣\n", - "### % steps completed: 1️⃣0️⃣0️⃣%" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_20.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_20.ipynb deleted file mode 100644 index bceb987a..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_20.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_21.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_21.ipynb deleted file mode 100644 index 1f20b19c..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_21.ipynb +++ /dev/null @@ -1,106 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214726\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_22.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_22.ipynb deleted file mode 100644 index 639daa75..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_before = registry.get_mapped_path(\"1A3N_165131\")\n", - "# path_after = registry.get_mapped_path(\"1A3N_165149\")\n", - "# assert os.path.exists(path_before)\n", - "# assert os.path.exists(path_after)\n", - "# assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# raw_file = md.load(path_before)\n", - "# clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #residues before\n", - "# residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "# residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "# print(\"Residues before:\",residues_before)\n", - "# print(\"Residues after:\",residues_after)\n", - "# print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_23.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_23.ipynb deleted file mode 100644 index 775a18cb..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_23.ipynb +++ /dev/null @@ -1,107 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "trajectory_path = registry.get_mapped_path(\"rec0_161551\")\n", - "topology_path = registry.get_mapped_path(\"top_sim0_161549\")\n", - "assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "import mdtraj as md\n", - "traj = md.load(trajectory_path, top=topology_path)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌ \n", - "### Completed without Hallucination ❌ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ❌ " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_24.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_24.ipynb deleted file mode 100644 index f36a4bf9..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_24.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_traj = registry.get_mapped_path(\"rec0_161529\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_161523\")\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# traj = md.load(path_traj, top=path_top)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# rdf_path = registry.get_mapped_path(\"fig0_161952\")\n", - "# assert os.path.exists(rdf_path), \"Path either is incorrect or doesn't exist\"\n", - "# #Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "# from IPython.display import Image\n", - "# Image(filename=rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_25.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_25.ipynb deleted file mode 100644 index 74bc9d14..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_25.ipynb +++ /dev/null @@ -1,112 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "\n", - "path_oxygenated = registry.get_mapped_path(\"fig0_145031\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_145035\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_3.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_3.ipynb deleted file mode 100644 index fce22924..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_3.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# path = registry.get_mapped_path(\"1GZX_161339\")\n", - "# traj = md.load(path)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "# print(\"Number of residues in chains: \",number_of_chains)\n", - "# print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "# print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "# print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_4.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_4.ipynb deleted file mode 100644 index cb67a940..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_4.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_5.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_5.ipynb deleted file mode 100644 index 8468a888..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_5.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj_path = registry.get_mapped_path(\"rec2_164856\")\n", - "# top_path = registry.get_mapped_path(\"top_sim0_164856\")\n", - "# traj = md.load(traj_path, top=top_path)\n", - "\n", - "# # Compute the secondary structure of the trajectory\n", - "# dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "# dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "# print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "# print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "# print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "# print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "# print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "# print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ❌\n", - "\n", - "### Logic make sense ❌\n", - "- the agent didn't mention downloading or cleaning the pdb file\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_6.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_6.ipynb deleted file mode 100644 index 699f7faa..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_6.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense \n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_7.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_7.ipynb deleted file mode 100644 index b991efb1..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_7.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_8.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_8.ipynb deleted file mode 100644 index 7aa958a6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_8.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")\n", - "path_3 = registry.get_mapped_path(\"\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_9.ipynb b/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_9.ipynb deleted file mode 100644 index e9297ba6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4-turbo-2024-04-09/exp_9.ipynb +++ /dev/null @@ -1,91 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_1.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_1.ipynb deleted file mode 100644 index 758dc0f1..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_1.ipynb +++ /dev/null @@ -1,186 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#plotting rmsd of both simulations\n", - "from IPython.display import Image\n", - "rmsd1ID = 'FIG_rmsd_082254_20240718_110456'\n", - "rmsd2ID = 'FIG_rmsd_095917_20240718_110459'\n", - "path1 = registry.get_mapped_path(rmsd1ID)\n", - "path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "import mdtraj as md\n", - "\n", - "traj1 = \"/Users/samanthacox/Desktop/md-agent/ckpt/ckpt_116/records/TOP_sim0_082254_1MBN_082248_20240718_082255.pdb\"\n", - "traj = md.load(traj1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj2=\"/Users/samanthacox/Desktop/md-agent/ckpt/ckpt_116/records/TOP_sim0_095917_1MBN_082248_20240718_095918.pdb\"\n", - "traj = md.load(traj1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_10.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_10.ipynb deleted file mode 100644 index e9bd5b50..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_10.ipynb +++ /dev/null @@ -1,180 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-4o-2024-05-13\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "end_time = now.strftime(\"%H:%M:%S\")\n", - "end_time" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ac6db7f4-0d84-4716-a04d-0ccdab56a36f", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(all_paths[0])\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ✅\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "id": "bff27c19", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_11.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_11.ipynb deleted file mode 100644 index 3a379ddc..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4o-2024-05-13\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_215252')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_12.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_12.ipynb deleted file mode 100644 index 7ea01095..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_12.ipynb +++ /dev/null @@ -1,161 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4o-2024-05-13'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "match1 = pattern1.search(all_names)\n", - "match2 = pattern2.search(all_names)\n", - "assert match1\n", - "assert match2\n", - "print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "path1 = registry.get_mapped_path(match1.group(0))\n", - "path2 = registry.get_mapped_path(match2.group(0))\n", - "assert os.path.exists(path1)\n", - "assert os.path.exists(path2)\n", - "print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5c9a6ace-69e8-4042-9d35-ca598f4d00c2", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('protein 8PFK')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)\n", - "traj = md.load(path2)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('\\nprotein 8PFQ')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_13.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_13.ipynb deleted file mode 100644 index 786a2dae..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_13.ipynb +++ /dev/null @@ -1,138 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "02c5c1ac-426e-44fa-90d2-8dd1a1eefe9c", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4o-2024-05-13'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a31fd85f-9466-41da-ada4-0b9f86427723", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "55572852-a00c-498a-a60a-b366dc6a7db5", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e5233722-daa3-457c-9e94-9f3905025270", - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "markdown", - "id": "59c9a2d8", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌ \n", - "LitSearch failed due to paperscraper timeout/service error" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6f8c7c13", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_14.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_14.ipynb deleted file mode 100644 index 5d7315a5..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_14.ipynb +++ /dev/null @@ -1,125 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "\n", - "path_1 = registry.get_mapped_path(\"fig0_145833\")\n", - "path_2 = registry.get_mapped_path(\"fig0_145836\")\n", - "\n", - "assert os.path.exists(path_1), \"Path does not exist\"\n", - "assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_15.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_15.ipynb deleted file mode 100644 index b723a3e8..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_15.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_134326\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_134325\")\n", - "\n", - "traj_path_2 = registry.get_mapped_path(\"rec0_134813\")\n", - "top_path_2 = registry.get_mapped_path(\"top_sim0_134813\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(traj_path_2)\n", - "assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj1 = md.load(traj_path_1, top=top_path_1)\n", - "traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "#number of framees, adn total residues simulated\n", - "print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### No Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_16.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_16.ipynb deleted file mode 100644 index e9fca2c5..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_16.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_134326\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_134322\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"fig0_202601\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "from IPython.display import display, Image\n", - "#print number of frames adn residues:\n", - "traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "print(\"Number of frames: \", traj.n_frames)\n", - "Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### No hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_17.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_17.ipynb deleted file mode 100644 index a7545bb8..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_17.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_141200\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_141156\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_195709\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_195802\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### No Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_18.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_18.ipynb deleted file mode 100644 index fa9d5fcb..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_18.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_19.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_19.ipynb deleted file mode 100644 index 31f4ef45..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_19.ipynb +++ /dev/null @@ -1,103 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB for 2YXF. Tell me about its stability, as found in literature. Then, simulate it for 1ns and plot its RMSD over time.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_122034\")\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ✅ \n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅ " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_2.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_2.ipynb deleted file mode 100644 index 31ad93e7..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_2.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#show the image from the path of the registry and the ID \n", - "import nglview as nv\n", - "path = registry.get_mapped_path(\"1LYZ_190300\")\n", - "view = nv.show_file(path)\n", - "view" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_20.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_20.ipynb deleted file mode 100644 index 6edf18a4..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_20.ipynb +++ /dev/null @@ -1,99 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_21.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_21.ipynb deleted file mode 100644 index 22a65312..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_21.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214729\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_22.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_22.ipynb deleted file mode 100644 index d2723d80..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_22.ipynb +++ /dev/null @@ -1,129 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_before = registry.get_mapped_path(\"1A3N_215315\")\n", - "path_after = registry.get_mapped_path(\"1A3N_215326\")\n", - "assert os.path.exists(path_before)\n", - "assert os.path.exists(path_after)\n", - "assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "raw_file = md.load(path_before)\n", - "clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#residues before\n", - "residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "print(\"Residues before:\",residues_before)\n", - "print(\"Residues after:\",residues_after)\n", - "print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_23.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_23.ipynb deleted file mode 100644 index 6c27c2a6..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_23.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "trajectory_path = registry.get_mapped_path(\"rec0_161551\")\n", - "topology_path = registry.get_mapped_path(\"top_sim0_161549\")\n", - "assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "import mdtraj as md\n", - "traj = md.load(trajectory_path, top=topology_path)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ✅ \n", - "### Completed without Hallucination ✅ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅ " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_24.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_24.ipynb deleted file mode 100644 index c2550b85..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_24.ipynb +++ /dev/null @@ -1,146 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_traj = registry.get_mapped_path(\"rec0_161529\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_161523\")\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_161952\")\n", - "assert os.path.exists(rdf_path), \"Path either is incorrect or doesn't exist\"\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "from IPython.display import Image\n", - "Image(filename=rdf_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trying to show image from the correct path\n", - "correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + \"rec0_161529\" + \".png\"\n", - "assert os.path.exists(correct_rdf_path)\n", - "\n", - "from IPython.display import Image\n", - "Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_25.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_25.ipynb deleted file mode 100644 index 224729db..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_25.ipynb +++ /dev/null @@ -1,154 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "\n", - "path_oxygenated = registry.get_mapped_path(\"fig0_145031\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_145035\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Bug saving the paths from the rdf function. Below the plots are shown, but the experiments counts as incorrect answer\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trying to show image from the correct path\n", - "correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + '1HBI_145025' + \".png\"\n", - "assert os.path.exists(correct_rdf_path)\n", - "\n", - "from IPython.display import Image\n", - "Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trying to show image from the correct path\n", - "correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + '3LHB_145028' + \".png\"\n", - "assert os.path.exists(correct_rdf_path)\n", - "\n", - "from IPython.display import Image\n", - "Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent", - "language": "python", - "name": "mdagent" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_3.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_3.ipynb deleted file mode 100644 index 98a14236..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_3.ipynb +++ /dev/null @@ -1,116 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "path = registry.get_mapped_path(\"1GZX_200039\")\n", - "traj = md.load(path)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_4.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_4.ipynb deleted file mode 100644 index 791119fd..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_4.ipynb +++ /dev/null @@ -1,102 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Cancelled because it ignored user instruction and made a simulation instead of looking for the literature" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_5.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_5.ipynb deleted file mode 100644 index ab2a8fbd..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_5.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj_path = registry.get_mapped_path(\"rec2_232436\")\n", - "top_path = registry.get_mapped_path(\"top_sim0_232435\")\n", - "traj = md.load(traj_path, top=top_path)\n", - "\n", - "# Compute the secondary structure of the trajectory\n", - "dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ❌\n", - "- computed DSSP for pre-sim but not post-sim (also...was wrong)\n", - "\n", - "### Logic make sense ✅\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_6.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_6.ipynb deleted file mode 100644 index 950e3b00..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_6.ipynb +++ /dev/null @@ -1,141 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"fig0_203010\")\n", - "path_2 = registry.get_mapped_path(\"fig0_203020\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌ (skipped lit search)\n", - "### Logic make sense \n", - "### Correct Answer " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_7.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_7.ipynb deleted file mode 100644 index fd9a9885..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_7.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_8.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_8.ipynb deleted file mode 100644 index eb7b9429..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_8.ipynb +++ /dev/null @@ -1,239 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"fig0_205855\")\n", - "path_2 = registry.get_mapped_path(\"fig0_205913\")\n", - "path_3 = registry.get_mapped_path(\"fig0_205930\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "import mdtraj as md\n", - "\n", - "traj1 = \"rec0_204206\"\n", - "top1 = \"top_sim0_204204\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj1), top=registry.get_mapped_path(top1))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "traj2 = \"rec0_204658\"\n", - "top2 = \"top_sim0_204655\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj2), top=registry.get_mapped_path(top2))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "traj3 = \"rec0_205318\"\n", - "top3 = \"top_sim0_205316\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj3), top=registry.get_mapped_path(top3))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent.tools.base_tools.analysis_tools.secondary_structure import ComputeDSSP" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "dssp_tool = ComputeDSSP(path_registry=registry, simplified=True)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "dssp1 = dssp_tool._run(traj_file=\"rec0_204658\", top_file=\"top_sim0_204204\")\n", - "dssp2 = dssp_tool._run(traj_file=\"rec0_204658\", top_file=\"top_sim0_204655\")\n", - "dssp3 = dssp_tool._run(traj_file=\"rec0_205318\", top_file=\"top_sim0_205316\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(dssp1)\n", - "print (dssp2)\n", - "print (dssp3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps \n", - "### Logic make sense \n", - "### Correct Answer " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_9.ipynb b/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_9.ipynb deleted file mode 100644 index 65ede36a..00000000 --- a/notebooks/experiments/experiment_k2/gpt-4o-2024-05-13/exp_9.ipynb +++ /dev/null @@ -1,91 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/.DS_Store b/notebooks/experiments/experiment_k3/.DS_Store deleted file mode 100644 index 283c3598..00000000 Binary files a/notebooks/experiments/experiment_k3/.DS_Store and /dev/null differ diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_1.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_1.ipynb deleted file mode 100644 index a7de5069..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_1.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#plotting rmsd of both simulations\n", - "from IPython.display import Image\n", - "rmsd1ID = 'fig0_222348'\n", - "rmsd2ID = 'fig0_222353' # not saved\n", - "path1 = registry.get_mapped_path(rmsd1ID)\n", - "path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "Image(filename=path1)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_10.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_10.ipynb deleted file mode 100644 index 5a62fe6d..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_10.ipynb +++ /dev/null @@ -1,175 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-3.5-turbo-0125\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "892fe48c", - "metadata": {}, - "outputs": [], - "source": [ - "all_paths" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps \n", - "3. Logic make sense ✅\n", - "4. Correct Answer " - ] - }, - { - "cell_type": "markdown", - "id": "bff27c19", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_11.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_11.ipynb deleted file mode 100644 index f569fa4a..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_11.ipynb +++ /dev/null @@ -1,162 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(1500)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_073719')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_12.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_12.ipynb deleted file mode 100644 index c6313372..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_12.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "markdown", - "id": "2070dda7", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "b8d2c7d2", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_13.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_13.ipynb deleted file mode 100644 index 665a45df..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_13.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-3.5-turbo-0125\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense \n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_14.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_14.ipynb deleted file mode 100644 index 78e4be21..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_14.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "\n", - "# path_1 = registry.get_mapped_path(\"fig0_034637\")\n", - "# path_2 = registry.get_mapped_path(\"fig0_034641\")\n", - "\n", - "# assert os.path.exists(path_1), \"Path does not exist\"\n", - "# assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "# Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_15.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_15.ipynb deleted file mode 100644 index 0ef5c269..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_15.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_010703\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_010702\")\n", - "\n", - "# traj_path_2 = registry.get_mapped_path(\"rec0_011308\")\n", - "# top_path_2 = registry.get_mapped_path(\"top_sim0_011307\")\n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(traj_path_2)\n", - "# assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj1 = md.load(traj_path_1, top=top_path_1)\n", - "# traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "# #number of framees, adn total residues simulated\n", - "# print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "# print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "# print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "# print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_16.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_16.ipynb deleted file mode 100644 index af5d2d4b..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_16.ipynb +++ /dev/null @@ -1,124 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_015653\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_015645\")\n", - "\n", - "# fig_path = registry.get_mapped_path(\"fig0_102741\")\n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "# from IPython.display import display, Image\n", - "# #print number of frames adn residues:\n", - "# traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "# print(\"Number of frames: \", traj.n_frames)\n", - "# Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_17.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_17.ipynb deleted file mode 100644 index 9e23c8d8..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_17.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_203056\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_203045\")\n", - "\n", - "# fig_path_1 = registry.get_mapped_path(\"fig0_013820\")\n", - "# fig_path_2 = registry.get_mapped_path(\"fig0_013935\") \n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(fig_path_1)\n", - "# assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "# Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_18.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_18.ipynb deleted file mode 100644 index 42ce510c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_18.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_19.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_19.ipynb deleted file mode 100644 index b42b95bf..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_19.ipynb +++ /dev/null @@ -1,103 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = '''Download the PDB for 2YXF. Tell me about its stability, as found in literature. \n", - "Then, simulate it for 1ns and plot its RMSD over time.'''\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, tools_model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_rmsd = registry.get_mapped_path(\"fig0_233322\")\n", - "# from IPython.display import Image\n", - "# Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_2.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_2.ipynb deleted file mode 100644 index 4fc3a26f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_2.ipynb +++ /dev/null @@ -1,112 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_20.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_20.ipynb deleted file mode 100644 index 071fa777..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_20.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_21.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_21.ipynb deleted file mode 100644 index 39b09d79..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_21.ipynb +++ /dev/null @@ -1,96 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_22.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_22.ipynb deleted file mode 100644 index c6fca7e3..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_before = registry.get_mapped_path(\"1A3N_214800\")\n", - "# path_after = registry.get_mapped_path(\"1A3N_214817\")\n", - "# assert os.path.exists(path_before)\n", - "# assert os.path.exists(path_after)\n", - "# assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# raw_file = md.load(path_before)\n", - "# clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #residues before\n", - "# residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "# residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "# print(\"Residues before:\",residues_before)\n", - "# print(\"Residues after:\",residues_after)\n", - "# print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_23.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_23.ipynb deleted file mode 100644 index 2b8d1715..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_23.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trajectory_path = registry.get_mapped_path(\"rec0_224123\")\n", - "# topology_path = registry.get_mapped_path(\"top_sim0_224121\")\n", - "# assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "# assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "# import mdtraj as md\n", - "# traj = md.load(trajectory_path, top=topology_path)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌ \n", - "### Completed without Hallucination ❌ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_24.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_24.ipynb deleted file mode 100644 index 34671760..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_24.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_fileid = \"rec0_131742\"\n", - "top_fileid = \"top_sim0_131736\"\n", - "\n", - "path_traj = registry.get_mapped_path(traj_fileid)\n", - "path_top = registry.get_mapped_path(top_fileid)\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# traj = md.load(path_traj, top=path_top)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "\n", - "# from IPython.display import Image\n", - "# Image(filename=rdf_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# assert os.path.exists(rdf_path), \"The path for this figure either doesn't exist or is incorrect\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "# correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + traj_fileid + \".png\"\n", - "# assert os.path.exists(correct_rdf_path)\n", - "\n", - "# from IPython.display import Image\n", - "# Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed with Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_25.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_25.ipynb deleted file mode 100644 index a5b34362..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_25.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_231854\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_231857\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_1HBI_231848.png')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_3LHB_231850.png')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_3.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_3.ipynb deleted file mode 100644 index 431cfa1a..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_3.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(300)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# path = registry.get_mapped_path(\"\")\n", - "# traj = md.load(path)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "# print(\"Number of chains: \",number_of_chains)\n", - "# print(\"Number of sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "# print(\"Number of helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "# print(\"Number of coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌ \n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_4.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_4.ipynb deleted file mode 100644 index 8af65bdb..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_4.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(200)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Hallucinates tools and information" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without hallucinations ❌ \n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_5.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_5.ipynb deleted file mode 100644 index 09465440..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_5.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(500)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj_path = registry.get_mapped_path(\"rec0_220342\")\n", - "top_path = registry.get_mapped_path(\"top_sim0_220341\")\n", - "traj = md.load(traj_path, top=top_path)\n", - "\n", - "# Compute the secondary structure of the trajectory\n", - "dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps \n", - "- hallucinated secondary structure instead of measuring \n", - "\n", - "### Logic make sense ✅\n", - "- plan was correct, just hallucinated, as seen above\n", - "\n", - "### Correct Answer \n", - "- would have been correct if it had not hallucinated" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_6.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_6.ipynb deleted file mode 100644 index 5d1381c8..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_6.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_7.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_7.ipynb deleted file mode 100644 index a0ce63ac..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_7.ipynb +++ /dev/null @@ -1,124 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(800)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Complete without hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_8.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_8.ipynb deleted file mode 100644 index 189941f5..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_8.ipynb +++ /dev/null @@ -1,157 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import time\n", - "time.sleep(900)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")\n", - "path_3 = registry.get_mapped_path(\"\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_9.ipynb b/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_9.ipynb deleted file mode 100644 index 54db6d44..00000000 --- a/notebooks/experiments/experiment_k3/gpt-3.5-turbo-0125/exp_9.ipynb +++ /dev/null @@ -1,96 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?\"\n", - "llm_var = \"gpt-3.5-turbo-0125\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/LOG_sim0_120542_1ZNI_120531_20240721_120546.txt b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/LOG_sim0_120542_1ZNI_120531_20240721_120546.txt deleted file mode 100644 index 0834828d..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/LOG_sim0_120542_1ZNI_120531_20240721_120546.txt +++ /dev/null @@ -1,21 +0,0 @@ -#"Step" "Potential Energy (kJ/mole)" "Temperature (K)" -5000 -252341.6783598245 301.25121906031166 -10000 -252164.2641728794 298.628579931944 -15000 -252742.87845404245 296.98242343922453 -20000 -253330.6028027527 300.63421797754444 -25000 -252370.92230718117 303.04074625357606 -30000 -253320.8424929318 301.6862358442161 -35000 -252975.05122152227 300.02005221574984 -40000 -252470.57225637423 298.84508542543284 -45000 -252870.21451980824 298.27525045029864 -50000 -253413.8391587148 300.6062155449776 -55000 -253384.0497691281 300.8178384896702 -60000 -252960.58474863635 303.7882688199937 -65000 -252289.70218964363 297.41978156693165 -70000 -252404.68576674422 298.54951773302673 -75000 -251939.15516542172 296.6216527463565 -80000 -252582.17247932858 299.29278786452164 -85000 -252643.81583578876 301.4623225328123 -90000 -253096.04689215156 305.8928139360918 -95000 -252160.14394074434 298.0785057651068 -100000 -252697.07757414118 303.87954990042493 diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/TRAJ_sim0_120542_1ZNI_120531_20240721_120546.dcd b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/TRAJ_sim0_120542_1ZNI_120531_20240721_120546.dcd deleted file mode 100644 index 9ba8a289..00000000 Binary files a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/TRAJ_sim0_120542_1ZNI_120531_20240721_120546.dcd and /dev/null differ diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_1.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_1.ipynb deleted file mode 100644 index dde60c6d..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_1.ipynb +++ /dev/null @@ -1,149 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #plotting rmsd of both simulations\n", - "# from IPython.display import Image\n", - "# rmsd1ID = 'fig0_192900'\n", - "# rmsd2ID = 'fig0_192903'\n", - "# path1 = registry.get_mapped_path(rmsd1ID)\n", - "# path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "\n", - "# Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_10.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_10.ipynb deleted file mode 100644 index 8c7c52b1..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_10.ipynb +++ /dev/null @@ -1,188 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-4-1106-preview\"\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "9b8924a9", - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "end_time = now.strftime(\"%H:%M:%S\")\n", - "print(\"end time:\",end_time)" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the check counts" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ac6db7f4-0d84-4716-a04d-0ccdab56a36f", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(all_paths[0])\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ✅\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_11.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_11.ipynb deleted file mode 100644 index ce25ff3f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_153540')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_12.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_12.ipynb deleted file mode 100644 index e1863775..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_12.ipynb +++ /dev/null @@ -1,181 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "match1 = pattern1.search(all_names)\n", - "match2 = pattern2.search(all_names)\n", - "assert match1\n", - "assert match2\n", - "print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "path1 = registry.get_mapped_path(match1.group(0))\n", - "path2 = registry.get_mapped_path(match2.group(0))\n", - "assert os.path.exists(path1)\n", - "assert os.path.exists(path2)\n", - "print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5c9a6ace-69e8-4042-9d35-ca598f4d00c2", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('protein 8PFK')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)\n", - "traj = md.load(path2)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('\\nprotein 8PFQ')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "cef131f3", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "508cd9be", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_13.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_13.ipynb deleted file mode 100644 index b0aab39f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_13.ipynb +++ /dev/null @@ -1,144 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-1106-preview\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_14.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_14.ipynb deleted file mode 100644 index 7ed8f542..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_14.ipynb +++ /dev/null @@ -1,118 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "\n", - "path_1 = registry.get_mapped_path(\"fig0_034637\")\n", - "path_2 = registry.get_mapped_path(\"fig0_034641\")\n", - "\n", - "assert os.path.exists(path_1), \"Path does not exist\"\n", - "assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_15.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_15.ipynb deleted file mode 100644 index 177ecac0..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_15.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_010703\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_010702\")\n", - "\n", - "traj_path_2 = registry.get_mapped_path(\"rec0_011308\")\n", - "top_path_2 = registry.get_mapped_path(\"top_sim0_011307\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(traj_path_2)\n", - "assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj1 = md.load(traj_path_1, top=top_path_1)\n", - "# traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "# #number of framees, adn total residues simulated\n", - "# print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "# print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "# print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "# print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_16.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_16.ipynb deleted file mode 100644 index b9614a70..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_16.ipynb +++ /dev/null @@ -1,132 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_015653\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_015645\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"fig0_102741\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "# from IPython.display import display, Image\n", - "# #print number of frames adn residues:\n", - "# traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "# print(\"Number of frames: \", traj.n_frames)\n", - "# Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_17.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_17.ipynb deleted file mode 100644 index b65ca9c2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_17.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_203056\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_203045\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_013820\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_013935\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "# Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_18.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_18.ipynb deleted file mode 100644 index d4d8d7fb..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_18.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_19.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_19.ipynb deleted file mode 100644 index 264bece9..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_19.ipynb +++ /dev/null @@ -1,114 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = '''Download the PDB for 2YXF. Tell me about its stability, as found in literature. \n", - "Then, simulate it for 1ns and plot its RMSD over time.'''\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, tools_model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"Agent answer on Stabiltiy:\")\n", - "print(\"Literature on the stability of 2YXF suggests that insights into its stability can be inferred through comparative analysis with EZH2, particularly regarding the effects of O-GlcNAcylation at homologous sites. Additionally, thermal shift assay protocols can be used to assess the impact of ligands on the thermal stability of proteins like 2YXF.\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_203457\")\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed without Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_2.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_2.ipynb deleted file mode 100644 index fb925cc0..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_2.ipynb +++ /dev/null @@ -1,133 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#show the image from the path of the registry and the ID \n", - "import nglview as nv\n", - "path = registry.get_mapped_path(\"1LYZ_190832\")\n", - "view = nv.show_file(path)\n", - "view" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_20.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_20.ipynb deleted file mode 100644 index b1266679..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_20.ipynb +++ /dev/null @@ -1,99 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_21.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_21.ipynb deleted file mode 100644 index 6926f7fb..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_21.ipynb +++ /dev/null @@ -1,106 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214714\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_22.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_22.ipynb deleted file mode 100644 index 313528a2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_before = registry.get_mapped_path(\"1A3N_215309\")\n", - "path_after = registry.get_mapped_path(\"1A3N_215325\")\n", - "assert os.path.exists(path_before)\n", - "assert os.path.exists(path_after)\n", - "assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "raw_file = md.load(path_before)\n", - "clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#residues before\n", - "residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "print(\"Residues before:\",residues_before)\n", - "print(\"Residues after:\",residues_after)\n", - "print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_23.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_23.ipynb deleted file mode 100644 index 62ba1a9a..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_23.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trajectory_path = registry.get_mapped_path(\"rec0_224123\")\n", - "# topology_path = registry.get_mapped_path(\"top_sim0_224121\")\n", - "# assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "# assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "# import mdtraj as md\n", - "# traj = md.load(trajectory_path, top=topology_path)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌ \n", - "### Completed without Hallucination ❌ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_24.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_24.ipynb deleted file mode 100644 index eb39fc2f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_24.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_fileid = \"rec0_131742\"\n", - "top_fileid = \"top_sim0_131736\"\n", - "\n", - "path_traj = registry.get_mapped_path(traj_fileid)\n", - "path_top = registry.get_mapped_path(top_fileid)\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "\n", - "# from IPython.display import Image\n", - "# Image(filename=rdf_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "assert os.path.exists(rdf_path), \"The path for this figure either doesn't exist or is incorrect\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + traj_fileid + \".png\"\n", - "assert os.path.exists(correct_rdf_path)\n", - "\n", - "from IPython.display import Image\n", - "Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Completed with Hallucination ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_25.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_25.ipynb deleted file mode 100644 index 2ec099f3..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_25.ipynb +++ /dev/null @@ -1,124 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_231854\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_231857\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_1HBI_231848.png')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_3LHB_231850.png')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_3.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_3.ipynb deleted file mode 100644 index 7328834f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_3.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent\n", - "tools = \"all\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools, ckpt_dir = \"ckpt_223\")\n", - "registry = agent.path_registry\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "path = registry.get_mapped_path(\"1GZX_104544\")\n", - "traj = md.load(path)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_4.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_4.ipynb deleted file mode 100644 index 198c5fd9..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_4.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_5.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_5.ipynb deleted file mode 100644 index bd4de72e..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_5.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj_path = registry.get_mapped_path(\"rec2_164856\")\n", - "# top_path = registry.get_mapped_path(\"top_sim0_164856\")\n", - "# traj = md.load(traj_path, top=top_path)\n", - "\n", - "# # Compute the secondary structure of the trajectory\n", - "# dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "# dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "# print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "# print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "# print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "# print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "# print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "# print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ❌\n", - "\n", - "### Logic make sense ❌\n", - "- the agent didn't mention downloading or cleaning the pdb file\n", - "- the agent didn't describe doing SS analysis twice\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_6.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_6.ipynb deleted file mode 100644 index 2d8c05b0..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_6.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense \n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_7.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_7.ipynb deleted file mode 100644 index 7e6f21ae..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_7.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_8.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_8.ipynb deleted file mode 100644 index 81bb0d1c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_8.ipynb +++ /dev/null @@ -1,161 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent \n", - "\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools, ckpt_dir = \"ckpt_229\")\n", - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"fig0_115824\")\n", - "path_2 = registry.get_mapped_path(\"fig0_115848\")\n", - "path_3 = registry.get_mapped_path(\"fig0_115924\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_9.ipynb b/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_9.ipynb deleted file mode 100644 index a7c1e681..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-1106-preview/exp_9.ipynb +++ /dev/null @@ -1,105 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4-1106-preview\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_1.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_1.ipynb deleted file mode 100644 index e892453f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_1.ipynb +++ /dev/null @@ -1,149 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #plotting rmsd of both simulations\n", - "# from IPython.display import Image\n", - "# rmsd1ID = 'fig0_192900'\n", - "# rmsd2ID = 'fig0_192903'\n", - "# path1 = registry.get_mapped_path(rmsd1ID)\n", - "# path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "\n", - "# Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_10.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_10.ipynb deleted file mode 100644 index c2ee17cc..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_10.ipynb +++ /dev/null @@ -1,159 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.'''\n", - "model='gpt-4-turbo-2024-04-09'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()\n", - "print(all_paths)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0, \"Nothing is downloaded\"\n", - "assert pattern.search(all_paths[0]), \"IAEE is not in path registry\"\n", - "assert os.path.exists(all_paths[0]), \"This 1AEE pdb file doesn't physically exist\"\n", - "print('It is asserted that 1AEE pdb is in path_registry and this file exists.')" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "790b786b-95e1-4359-a76b-55c20b4cb261", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ❌\n", - "4. Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "id": "f3c2e3a5", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_11.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_11.ipynb deleted file mode 100644 index e399f3c8..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_11.ipynb +++ /dev/null @@ -1,152 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_073719')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_12.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_12.ipynb deleted file mode 100644 index c503143f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_12.ipynb +++ /dev/null @@ -1,176 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "# import re\n", - "# import os\n", - "# pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "# pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "# match1 = pattern1.search(all_names)\n", - "# match2 = pattern2.search(all_names)\n", - "# assert match1\n", - "# assert match2\n", - "# print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "# path1 = registry.get_mapped_path(match1.group(0))\n", - "# path2 = registry.get_mapped_path(match2.group(0))\n", - "# assert os.path.exists(path1)\n", - "# assert os.path.exists(path2)\n", - "# print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "aeedf6a8-8773-4402-81c9-81dea40844d6", - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# traj = md.load(path1)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# number_of_atoms = top.n_atoms\n", - "# print('protein 8PFK')\n", - "# print('Number of chains: ', number_of_chains)\n", - "# print('Number of atoms: ', number_of_atoms)\n", - "# traj = md.load(path2)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# number_of_atoms = top.n_atoms\n", - "# print('\\nprotein 8PFQ')\n", - "# print('Number of chains: ', number_of_chains)\n", - "# print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "a8bcb320-b57c-4f53-8d77-f6bc500b55a5", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ❌\n", - "4. Correct Answer ❌\n", - "5. Number of steps completed: 0️⃣\n", - "6. % steps completed: 0️⃣%" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_13.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_13.ipynb deleted file mode 100644 index a69e3bd2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_13.ipynb +++ /dev/null @@ -1,143 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4-turbo-2024-04-09\"\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import os\n", - "path_traj = registry.get_mapped_path(\"rec0_111311\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_111311\")\n", - "\n", - "assert os.path.exists(path_traj), f\"Trajectory file not found: {path_traj}\"\n", - "assert os.path.exists(path_top), f\"Topology file not found: {path_top}\"\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"number of frames: {traj.n_frames}\")\n", - "print(f\"number of residues: {traj.n_residues}\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_14.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_14.ipynb deleted file mode 100644 index a8b6b7c2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_14.ipynb +++ /dev/null @@ -1,117 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "\n", - "# path_1 = registry.get_mapped_path(\"fig0_034637\")\n", - "# path_2 = registry.get_mapped_path(\"fig0_034641\")\n", - "\n", - "# assert os.path.exists(path_1), \"Path does not exist\"\n", - "# assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "# Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_15.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_15.ipynb deleted file mode 100644 index 54bb476d..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_15.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_010703\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_010702\")\n", - "\n", - "# traj_path_2 = registry.get_mapped_path(\"rec0_011308\")\n", - "# top_path_2 = registry.get_mapped_path(\"top_sim0_011307\")\n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(traj_path_2)\n", - "# assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj1 = md.load(traj_path_1, top=top_path_1)\n", - "# traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "# #number of framees, adn total residues simulated\n", - "# print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "# print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "# print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "# print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_16.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_16.ipynb deleted file mode 100644 index f0a5704b..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_16.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_015653\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_015645\")\n", - "\n", - "# fig_path = registry.get_mapped_path(\"fig0_102741\")\n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "# from IPython.display import display, Image\n", - "# #print number of frames adn residues:\n", - "# traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "# print(\"Number of frames: \", traj.n_frames)\n", - "# Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_17.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_17.ipynb deleted file mode 100644 index 7036f784..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_17.ipynb +++ /dev/null @@ -1,128 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# traj_path_1 = registry.get_mapped_path(\"rec0_203056\") \n", - "# top_path_1 = registry.get_mapped_path(\"top_sim0_203045\")\n", - "\n", - "# fig_path_1 = registry.get_mapped_path(\"fig0_013820\")\n", - "# fig_path_2 = registry.get_mapped_path(\"fig0_013935\") \n", - "\n", - "# assert os.path.exists(traj_path_1)\n", - "# assert os.path.exists(top_path_1)\n", - "# assert os.path.exists(fig_path_1)\n", - "# assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# from IPython.display import Image\n", - "# Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_18.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_18.ipynb deleted file mode 100644 index d898da10..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_18.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4-turbo-2024-04-09'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB file for 1XQ8. Then, save the visualization for it.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm the files were downloaded/made and check the visualization" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "attachments": {}, - "cell_type": "markdown", - "id": "790b786b-95e1-4359-a76b-55c20b4cb261", - "metadata": { - "jp-MarkdownHeadingCollapsed": true - }, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ❌\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ❌\n", - "5. Number of steps completed: 0️⃣\n", - "6. % steps completed: 0️⃣%" - ] - }, - { - "cell_type": "markdown", - "id": "4e33c8b2", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_19.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_19.ipynb deleted file mode 100644 index da548bb2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_19.ipynb +++ /dev/null @@ -1,103 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = '''Download the PDB for 2YXF. Tell me about its stability, as found in literature. \n", - "Then, simulate it for 1ns and plot its RMSD over time.'''\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, tools_model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_rmsd = registry.get_mapped_path(\"fig0_233322\")\n", - "# from IPython.display import Image\n", - "# Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_2.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_2.ipynb deleted file mode 100644 index 68b5870a..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_2.ipynb +++ /dev/null @@ -1,126 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#show the image from the path of the registry and the ID \n", - "import nglview as nv\n", - "path = registry.get_mapped_path(\"1LYZ_201631\")\n", - "view = nv.show_file(path)\n", - "view" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅\n", - "### Number of steps completed: 1️⃣\n", - "### % steps completed: 1️⃣0️⃣0️⃣%" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_20.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_20.ipynb deleted file mode 100644 index 62d53941..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_20.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_21.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_21.ipynb deleted file mode 100644 index 1f20b19c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_21.ipynb +++ /dev/null @@ -1,106 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214726\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_22.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_22.ipynb deleted file mode 100644 index 639daa75..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_22.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# path_before = registry.get_mapped_path(\"1A3N_165131\")\n", - "# path_after = registry.get_mapped_path(\"1A3N_165149\")\n", - "# assert os.path.exists(path_before)\n", - "# assert os.path.exists(path_after)\n", - "# assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# raw_file = md.load(path_before)\n", - "# clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# #residues before\n", - "# residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "# residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "# print(\"Residues before:\",residues_before)\n", - "# print(\"Residues after:\",residues_after)\n", - "# print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps \n", - "### Logic make sense ✅\n", - "### Correct Answer " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.12.4" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_23.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_23.ipynb deleted file mode 100644 index 2b7bc04c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_23.ipynb +++ /dev/null @@ -1,108 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# trajectory_path = registry.get_mapped_path(\"rec0_224123\")\n", - "# topology_path = registry.get_mapped_path(\"top_sim0_224121\")\n", - "# assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "# assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "# import mdtraj as md\n", - "# traj = md.load(trajectory_path, top=topology_path)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ❌ \n", - "### Completed without Hallucination ❌ \n", - "### Logic make sense ❌ \n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_24.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_24.ipynb deleted file mode 100644 index ef3d939e..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_24.ipynb +++ /dev/null @@ -1,158 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_fileid = \"rec0_131742\"\n", - "top_fileid = \"top_sim0_131736\"\n", - "\n", - "path_traj = registry.get_mapped_path(traj_fileid)\n", - "path_top = registry.get_mapped_path(top_fileid)\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# traj = md.load(path_traj, top=path_top)\n", - "# print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "\n", - "# from IPython.display import Image\n", - "# Image(filename=rdf_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# assert os.path.exists(rdf_path), \"The path for this figure either doesn't exist or is incorrect\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# rdf_path = registry.get_mapped_path(\"fig0_132739\")\n", - "# correct_rdf_path = agent.path_registry.ckpt_figures + \"/rdf_\" + traj_fileid + \".png\"\n", - "# assert os.path.exists(correct_rdf_path)\n", - "\n", - "# from IPython.display import Image\n", - "# Image(filename=correct_rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed with Hallucination ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_25.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_25.ipynb deleted file mode 100644 index e3f5ec0e..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_25.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_231854\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_231857\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_1HBI_231848.png')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename='/Users/jorgemedina/Desktop/md-agent/ckpt/ckpt_108/figures/rdf_3LHB_231850.png')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Completed without Hallucination ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.8" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_3.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_3.ipynb deleted file mode 100644 index ceaa1263..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_3.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# path = registry.get_mapped_path(\"1GZX_161339\")\n", - "# traj = md.load(path)\n", - "# top = traj.topology\n", - "# number_of_chains = top.n_chains\n", - "# secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "# print(\"Number of residues in chains: \",number_of_chains)\n", - "# print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "# print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "# print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_4.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_4.ipynb deleted file mode 100644 index 079e6e5c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_4.ipynb +++ /dev/null @@ -1,95 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_5.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_5.ipynb deleted file mode 100644 index c0a0b237..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_5.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperate 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj_path = registry.get_mapped_path(\"rec2_164856\")\n", - "# top_path = registry.get_mapped_path(\"top_sim0_164856\")\n", - "# traj = md.load(traj_path, top=top_path)\n", - "\n", - "# # Compute the secondary structure of the trajectory\n", - "# dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "# dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "# print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "# print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "# print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "# print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "# print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "# print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ❌\n", - "\n", - "### Logic make sense ❌\n", - "- the agent didn't mention downloading or cleaning the pdb file\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_6.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_6.ipynb deleted file mode 100644 index adf34a36..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_6.ipynb +++ /dev/null @@ -1,123 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense \n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_7.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_7.ipynb deleted file mode 100644 index aece51d7..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_7.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_8.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_8.ipynb deleted file mode 100644 index 2ca5c64e..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_8.ipynb +++ /dev/null @@ -1,147 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"\")\n", - "path_2 = registry.get_mapped_path(\"\")\n", - "path_3 = registry.get_mapped_path(\"\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ❌\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_9.ipynb b/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_9.ipynb deleted file mode 100644 index 7ce7a59d..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4-turbo-2024-04-09/exp_9.ipynb +++ /dev/null @@ -1,91 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interactions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4-turbo-2024-04-09\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_1.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_1.ipynb deleted file mode 100644 index fd9adc38..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_1.ipynb +++ /dev/null @@ -1,186 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt1 = \"Simulate pdb 1MBN at two different temperatures: 300K, 400K for 1ns seconds each. Plot RMSD of both over time, and compare the final secondary structures at the end of the simulations.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#plotting rmsd of both simulations\n", - "from IPython.display import Image\n", - "rmsd1ID = 'fig0_001223'\n", - "rmsd2ID = 'fig0_001221'\n", - "path1 = registry.get_mapped_path(rmsd1ID)\n", - "path2 = registry.get_mapped_path(rmsd2ID)\n", - "\n", - "Image(filename=path1)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "import mdtraj as md\n", - "\n", - "traj1 = \"/Users/samanthacox/Desktop/md-agent/ckpt/ckpt_116/records/TOP_sim0_082254_1MBN_082248_20240718_082255.pdb\"\n", - "traj = md.load(traj1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj2=\"/Users/samanthacox/Desktop/md-agent/ckpt/ckpt_116/records/TOP_sim0_095917_1MBN_082248_20240718_095918.pdb\"\n", - "traj = md.load(traj1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_10.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_10.ipynb deleted file mode 100644 index 602b4452..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_10.ipynb +++ /dev/null @@ -1,180 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "39451d99-005f-40b2-867e-fb955d63647d", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d808d0af-27f5-4e95-87bf-beb2d72c9108", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "82be5f35-3197-49c7-9955-6707529f8691", - "metadata": {}, - "outputs": [], - "source": [ - "prompt10 = \"Download the PDB file for 1AEE. Then, tell me how many chains and atoms are in the protein.\"\n", - "model = \"gpt-4o-2024-05-13\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b12fdc0-25be-4835-9e70-b3ea299bac9d", - "metadata": {}, - "outputs": [], - "source": [ - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "fe11721e-c775-40d3-9332-9f80820ccc95", - "metadata": {}, - "outputs": [], - "source": [ - "answer = mda.run(prompt10)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "81d4d4a1-091e-49db-8272-33c2a11a984b", - "metadata": {}, - "outputs": [], - "source": [ - "#print final date and time\n", - "now = datetime.datetime.now()\n", - "end_time = now.strftime(\"%H:%M:%S\")\n", - "end_time" - ] - }, - { - "cell_type": "markdown", - "id": "1aab27b9-d320-46b3-805b-b953040b11e2", - "metadata": {}, - "source": [ - "# Confirm that the file was downloaded and the counts were correct" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "0ba860e5-1dd0-4fcc-aa2f-d5e7f975cbae", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_paths = registry._list_all_paths()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "4b9220de-6a3c-4db9-8768-68298ece63a6", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern = re.compile(r\"1AEE.*\\.pdb\")\n", - "assert len(all_paths) > 0\n", - "assert pattern.search(all_paths[0])\n", - "assert os.path.exists(all_paths[0])\n", - "print('It is asserted that 1AEE pdb is in path_registry')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ac6db7f4-0d84-4716-a04d-0ccdab56a36f", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(all_paths[0])\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "25deff6d-6c2d-4b63-91df-1b7e109450dc", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "1. Completed without Exception or TimeOut Errors ✅\n", - "2. Attempted all necessary steps ✅\n", - "3. Logic make sense ✅\n", - "4. Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "id": "bff27c19", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "9c5dad4b", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_11.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_11.ipynb deleted file mode 100644 index f9efcf5e..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_11.ipynb +++ /dev/null @@ -1,165 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "model = \"gpt-4o-2024-05-13\"\n", - "\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate protein 1ZNI at 300K for 1ns and calculate RMSD.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1ZNI', 'rmsd', 'sim0', 'top_sim0', 'fig0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# let's see if we can't grab the plot\n", - "import re\n", - "import os\n", - "match = re.search(rf\"fig0_\\d+\", all_names)\n", - "plot_path = registry.get_mapped_path(match.group(0))\n", - "assert os.path.exists(plot_path)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools,ckpt_dir='ckpt_202')\n", - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "plot_path = registry.get_mapped_path('fig0_230231')\n", - "Image(filename=plot_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_12.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_12.ipynb deleted file mode 100644 index 45c52d46..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_12.ipynb +++ /dev/null @@ -1,181 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c86c88a1-f5f8-473a-8342-7364252bcfba", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4o-2024-05-13'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Download the PDB files for 8PFK and 8PFQ. Then, compare the secondary structure of the two proteins, \n", - "including number atoms, secondary structure, number of chains, etc..'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d23fbcab-9ceb-46d5-ad3b-d6cf6687d1e4", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "markdown", - "id": "da5ba7ae-a3e7-4eec-b869-a884948231c4", - "metadata": {}, - "source": [ - "# Confirm the downloaded files and their structures" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5d1f0c85-88d6-4d2a-aae1-6a2d763f280d", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6684abd0-efd9-4add-bf1b-abfe1f664dbe", - "metadata": {}, - "outputs": [], - "source": [ - "import re\n", - "import os\n", - "pattern1 = re.compile(r\"8PFK_\\d+\")\n", - "pattern2 = re.compile(r\"8PFQ_\\d+\")\n", - "match1 = pattern1.search(all_names)\n", - "match2 = pattern2.search(all_names)\n", - "assert match1\n", - "assert match2\n", - "print('It is asserted that 8PFK and 8PFQ are in path_registry')\n", - "path1 = registry.get_mapped_path(match1.group(0))\n", - "path2 = registry.get_mapped_path(match2.group(0))\n", - "assert os.path.exists(path1)\n", - "assert os.path.exists(path2)\n", - "print('It is asserted these pdb files physically exist')" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5c9a6ace-69e8-4042-9d35-ca598f4d00c2", - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path1)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('protein 8PFK')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)\n", - "traj = md.load(path2)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "number_of_atoms = top.n_atoms\n", - "print('\\nprotein 8PFQ')\n", - "print('Number of chains: ', number_of_chains)\n", - "print('Number of atoms: ', number_of_atoms)" - ] - }, - { - "cell_type": "markdown", - "id": "541b835c", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "05a624f4", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_13.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_13.ipynb deleted file mode 100644 index 98490cde..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_13.ipynb +++ /dev/null @@ -1,136 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "id": "8ff706fd-c267-4d05-af58-9a3848cce8ff", - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "02c5c1ac-426e-44fa-90d2-8dd1a1eefe9c", - "metadata": {}, - "outputs": [], - "source": [ - "#todays date and time\n", - "import datetime\n", - "\n", - "start = datetime.datetime.now()\n", - "date = start.strftime(\"%Y-%m-%d\")\n", - "print(\"date:\",date)\n", - "time = start.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f62bfc17-854b-4152-bb82-7e9e0ec4b854", - "metadata": {}, - "outputs": [], - "source": [ - "model='gpt-4o-2024-05-13'\n", - "mda = MDAgent(\n", - " agent_type='Structured', \n", - " model=model, \n", - " tools_model=model,\n", - " use_memory=False, \n", - " top_k_tools=\"all\"\n", - ")\n", - "print(\"LLM: \", mda.llm.model_name,\"\\nTemperature: \", mda.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "ad2f6f66-e6b8-4244-b908-68fbebbf6e8b", - "metadata": {}, - "outputs": [], - "source": [ - "prompt = '''Simulate fibronectin (PDB ID 1FNF) for 1ns. Use an appropriate temperature from literature.'''\n", - "answer = mda.run(prompt)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "a31fd85f-9466-41da-ada4-0b9f86427723", - "metadata": {}, - "outputs": [], - "source": [ - "end = datetime.datetime.now()\n", - "elapsed = end - start\n", - "print(f\"duration: {elapsed.total_seconds()/60:.2f} minutes\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "55572852-a00c-498a-a60a-b366dc6a7db5", - "metadata": {}, - "outputs": [], - "source": [ - "registry = mda.path_registry\n", - "all_names = registry.list_path_names()\n", - "print(all_names)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "e5233722-daa3-457c-9e94-9f3905025270", - "metadata": {}, - "outputs": [], - "source": [ - "# ensure all files are in path registry\n", - "assert all(n in all_names for n in ['1FNF','sim0', 'top_sim0', 'rec0']), \"Not all file ids are present in path registry\"" - ] - }, - { - "cell_type": "markdown", - "id": "59c9a2d8", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6f8c7c13", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_14.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_14.ipynb deleted file mode 100644 index 746a0492..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_14.ipynb +++ /dev/null @@ -1,124 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt14 = \"Compare the RMSF of 1UBQ at high pressure and low pressure. Perform the simulation for 1 ns and vary only the pressure.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt14)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "\n", - "path_1 = registry.get_mapped_path(\"fig0_152904\")\n", - "path_2 = registry.get_mapped_path(\"fig0_152901\")\n", - "\n", - "assert os.path.exists(path_1), \"Path does not exist\"\n", - "assert os.path.exists(path_2), \"Path does not exist\"\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_15.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_15.ipynb deleted file mode 100644 index ea1a06c3..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_15.ipynb +++ /dev/null @@ -1,134 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt15 = \"Simulate hemoglobin oxygenated (1A3N) and de-oxygenated (6BB5)\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt15)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_124309\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_124307\")\n", - "\n", - "traj_path_2 = registry.get_mapped_path(\"rec0_124850\")\n", - "top_path_2 = registry.get_mapped_path(\"top_sim0_124850\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(traj_path_2)\n", - "assert os.path.exists(top_path_2)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "\n", - "traj1 = md.load(traj_path_1, top=top_path_1)\n", - "traj2 = md.load(traj_path_2, top=top_path_2)\n", - "\n", - "#number of framees, adn total residues simulated\n", - "print(\"Number of frames in traj1: \", traj1.n_frames)\n", - "print(\"Number of frames in traj2: \", traj2.n_frames)\n", - "print(\"Number of residues in traj1: \", traj1.n_residues)\n", - "print(\"Number of residues in traj2: \", traj2.n_residues)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_16.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_16.ipynb deleted file mode 100644 index 6986deb7..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_16.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt16 = \"Simulate Trypsin (1TRN) for 1ns at 300K and compute SASA.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt16)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_165119\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_165108\")\n", - "\n", - "fig_path = registry.get_mapped_path(\"fig0_233807\")\n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path)\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "import numpy as np\n", - "from IPython.display import display, Image\n", - "#print number of frames adn residues:\n", - "traj = md.load(traj_path_1, top=top_path_1)\n", - "\n", - "print(\"Number of frames: \", traj.n_frames)\n", - "Image(filename=fig_path)\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_17.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_17.ipynb deleted file mode 100644 index 2cd9f03c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_17.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt17 = \"Download the pdb file for 1C3W and describe the secondary structure. Then simulate the protein at 300K for 1ns. Plot RMSD over time and radius of gyration over time.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt17)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "traj_path_1 = registry.get_mapped_path(\"rec0_173932\") \n", - "top_path_1 = registry.get_mapped_path(\"top_sim0_173924\")\n", - "\n", - "fig_path_1 = registry.get_mapped_path(\"fig0_231922\")\n", - "fig_path_2 = registry.get_mapped_path(\"fig0_232021\") \n", - "\n", - "assert os.path.exists(traj_path_1)\n", - "assert os.path.exists(top_path_1)\n", - "assert os.path.exists(fig_path_1)\n", - "assert os.path.exists(fig_path_2)\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=fig_path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=fig_path_2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_18.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_18.ipynb deleted file mode 100644 index 2d15e9cd..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_18.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt19 = \"Download the PDB file for 1XQ8. Then, save the visualization for it.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt19)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_19.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_19.ipynb deleted file mode 100644 index a8921633..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_19.ipynb +++ /dev/null @@ -1,102 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt18 = \"Download the PDB for 2YXF. Tell me about its stability, as found in literature. Then, simulate it for 1ns and plot its RMSD over time.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt18)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_rmsd = registry.get_mapped_path(\"fig0_172050\")\n", - "from IPython.display import Image\n", - "Image(filename=path_rmsd)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ✅ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅ " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_2.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_2.ipynb deleted file mode 100644 index 8a1ce5bd..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_2.ipynb +++ /dev/null @@ -1,113 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt2 = \"Download the pdb file for PDB ID 1LYZ.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_20.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_20.ipynb deleted file mode 100644 index ffa5016f..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_20.ipynb +++ /dev/null @@ -1,98 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt20 = \"Simulate 1MBN in water and in methanol solutions.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt20)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ❌\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_21.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_21.ipynb deleted file mode 100644 index 8ebdc458..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_21.ipynb +++ /dev/null @@ -1,101 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt21 = \"Download Protein 1ATN.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt21)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path = registry.get_mapped_path(\"1ATN_214729\")\n", - "assert os.path.exists(path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_22.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_22.ipynb deleted file mode 100644 index 36a3c3d2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_22.ipynb +++ /dev/null @@ -1,129 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt22 = \"Download and clean protein 1A3N\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt22)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_before = registry.get_mapped_path(\"1A3N_215315\")\n", - "path_after = registry.get_mapped_path(\"1A3N_215326\")\n", - "assert os.path.exists(path_before)\n", - "assert os.path.exists(path_after)\n", - "assert path_before != path_after" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "raw_file = md.load(path_before)\n", - "clean_file = md.load(path_after)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#residues before\n", - "residues_before = set([str(res)[:3] for res in raw_file.top.residues])\n", - "residues_after = set([str(res)[:3] for res in clean_file.top.residues])\n", - "print(\"Residues before:\",residues_before)\n", - "print(\"Residues after:\",residues_after)\n", - "print(\"Residues removed:\",residues_before - residues_after)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_23.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_23.ipynb deleted file mode 100644 index c1d4bfbc..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_23.ipynb +++ /dev/null @@ -1,112 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt23 = \"Perform a short simulation of protein 1PQ2\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt23)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "trajectory_path = registry.get_mapped_path(\"rec0_140705\")\n", - "topology_path = registry.get_mapped_path(\"top_sim0_140703\")\n", - "assert os.path.exists(trajectory_path), \"Trajectory file not found\"\n", - "assert os.path.exists(topology_path), \"Topology file not found\"\n", - "\n", - "import mdtraj as md\n", - "traj = md.load(trajectory_path, top=topology_path)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅ \n", - "### Attempted all necessary steps ✅ \n", - "### Logic make sense ✅ \n", - "### Correct Answer ✅ " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_24.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_24.ipynb deleted file mode 100644 index c7d798d9..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_24.ipynb +++ /dev/null @@ -1,130 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt24 = \"Analyze the rdf of the simulation of 1A3N solvated in water\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt24)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_traj = registry.get_mapped_path(\"rec0_155251\")\n", - "path_top = registry.get_mapped_path(\"top_sim0_155247\")\n", - "assert os.path.exists(path_traj)\n", - "assert os.path.exists(path_top)\n", - "assert path_traj != path_top\n", - "\n", - "assert path_traj.endswith(\".dcd\")\n", - "assert path_top.endswith(\".pdb\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "traj = md.load(path_traj, top=path_top)\n", - "print(f\"Simulation with :{traj.n_atoms} for {traj.n_frames} frames. Total time: {traj.time[-1]*0.002} ps\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "rdf_path = registry.get_mapped_path(\"fig0_155838\")\n", - "#Disclaimer: Theres a bug in the rdf path saving. The image was created correctly, but the path was not saved correctly.\n", - "from IPython.display import Image\n", - "Image(filename=rdf_path)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_25.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_25.ipynb deleted file mode 100644 index f3d57ee1..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_25.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt25 = \"Make an rdf analysis of both oxygenated and deoxygenated hemoglobin structures\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt25)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "path_oxygenated = registry.get_mapped_path(\"fig0_144350\")\n", - "path_deoxygenated = registry.get_mapped_path(\"fig0_144351\")\n", - "assert os.path.exists(path_oxygenated), 'Path not found'\n", - "assert os.path.exists(path_deoxygenated), 'Path not found'\n", - "assert path_oxygenated != path_deoxygenated, 'Paths are the same'" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Bug saving the paths from the rdf function. Below the plots are shown, but the experiments counts as incorrect answer\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "Image(filename=path_oxygenated)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_deoxygenated)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_3.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_3.ipynb deleted file mode 100644 index 350cd18c..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_3.ipynb +++ /dev/null @@ -1,116 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt3 = \"Download the PDB file for PDB ID 1GZX. Then, analyze the secondary structure of the protein and tell me how many chains, sheets, etc. there are.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import mdtraj as md\n", - "path = registry.get_mapped_path(\"1GZX_200039\")\n", - "traj = md.load(path)\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_4.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_4.ipynb deleted file mode 100644 index 8cd179da..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_4.ipynb +++ /dev/null @@ -1,82 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt4 = \"What are common parameters to simulate fibronectin\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt4)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ❌\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_5.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_5.ipynb deleted file mode 100644 index 9e4f6d56..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_5.ipynb +++ /dev/null @@ -1,135 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt5 = \"Simulate 1XQ8 for 1ns at temperature 300K. Then tell me if the secondary structure changed from before the simulation to after.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt5)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# import mdtraj as md\n", - "# import numpy as np\n", - "\n", - "# traj_path = registry.get_mapped_path(\"rec2_232436\")\n", - "# top_path = registry.get_mapped_path(\"top_sim0_232435\")\n", - "# traj = md.load(traj_path, top=top_path)\n", - "\n", - "# # Compute the secondary structure of the trajectory\n", - "# dssp_final = md.compute_dssp(traj[-1], simplified=True)\n", - "# dssp_initial = md.compute_dssp(traj[0], simplified=True)\n", - "\n", - "# print(\"Number of initial sheets: \",len([i for i in dssp_initial[0] if i == 'E']))\n", - "# print(\"Number of initial helices: \",len([i for i in dssp_initial[0] if i == 'H']))\n", - "# print(\"Number of initial coils: \",len([i for i in dssp_initial[0] if i == 'C']))\n", - "\n", - "# print(\"Number of final sheets: \",len([i for i in dssp_final[0] if i == 'E']))\n", - "# print(\"Number of final helices: \",len([i for i in dssp_final[0] if i == 'H']))\n", - "# print(\"Number of final coils: \",len([i for i in dssp_final[0] if i == 'C']))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "\n", - "### Attempted all necessary steps ✅\n", - "- computed DSSP for post-sim twice\n", - "\n", - "### Logic make sense ✅\n", - "\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_6.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_6.ipynb deleted file mode 100644 index 1ac22717..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_6.ipynb +++ /dev/null @@ -1,141 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt\n", - "import nest_asyncio\n", - "nest_asyncio.apply()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt6 = \"Simulate 1A3N and 7VDE, two PDB IDs for hemoglobin with the same parameters. Find the appropriate parameters from literature. Then, plot the radius of gyration throughout the both simulations.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt6)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"fig0_203010\")\n", - "path_2 = registry.get_mapped_path(\"fig0_203020\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors \n", - "### Attempted all necessary steps ❌ (skipped lit search)\n", - "### Logic make sense \n", - "### Correct Answer " - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_7.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_7.ipynb deleted file mode 100644 index 7bc65067..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_7.ipynb +++ /dev/null @@ -1,131 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt7 = \"Simulate 1ZNI for 1ns at temp=300K.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mda_jun15", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_8.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_8.ipynb deleted file mode 100644 index d992dfa2..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_8.ipynb +++ /dev/null @@ -1,257 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt8 = \"Simulate 4RMB at 100K, 200K, and 300K. Then plot the radius of gyration over time for all three simulations. Lastly, compare the change in secondary structure for the three analyses throughout the simulation.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt8)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "registry = agent.path_registry\n", - "print(registry.list_path_names_and_descriptions())" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent import MDAgent\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools,ckpt_dir='ckpt_208')\n", - "registry = agent.path_registry" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from IPython.display import Image\n", - "path_1 = registry.get_mapped_path(\"fig0_072033\")\n", - "path_2 = registry.get_mapped_path(\"fig0_072038\")\n", - "path_3 = registry.get_mapped_path(\"fig0_072042\")\n", - "\n", - "Image(filename=path_1)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_2)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "Image(filename=path_3)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "import mdtraj as md\n", - "\n", - "traj1 = \"rec0_071642\"\n", - "top1 = \"top_sim0_071641\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj1), top=registry.get_mapped_path(top1))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "traj2 = \"rec0_071812\"\n", - "top2 = \"top_sim0_071811\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj2), top=registry.get_mapped_path(top2))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#secondary structure\n", - "traj3 = \"rec0_071926\"\n", - "top3 = \"top_sim0_071925\"\n", - "traj = md.load_dcd(registry.get_mapped_path(traj3), top=registry.get_mapped_path(top3))\n", - "top = traj.topology\n", - "number_of_chains = top.n_chains\n", - "secondary_structure = md.compute_dssp(traj,simplified=True)\n", - "print(\"Number of residues in chains: \",number_of_chains)\n", - "print(\"Number of residues in sheets: \",len([i for i in secondary_structure[0] if i == 'E']))\n", - "print(\"Number of residues in helices: \",len([i for i in secondary_structure[0] if i == 'H']))\n", - "print(\"Number of residues in coils: \",len([i for i in secondary_structure[0] if i == 'C']))" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from mdagent.tools.base_tools.analysis_tools.secondary_structure import ComputeDSSP" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "dssp_tool = ComputeDSSP(path_registry=registry, simplified=True)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "dssp1 = dssp_tool._run(traj_file=\"rec0_071642\", top_file=\"top_sim0_071641\")\n", - "dssp2 = dssp_tool._run(traj_file=\"rec0_071812\", top_file=\"top_sim0_071811\")\n", - "dssp3 = dssp_tool._run(traj_file=\"rec0_071926\", top_file=\"top_sim0_071925\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(dssp1)\n", - "print (dssp2)\n", - "print (dssp3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ✅" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_9.ipynb b/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_9.ipynb deleted file mode 100644 index afdf9afa..00000000 --- a/notebooks/experiments/experiment_k3/gpt-4o-2024-05-13/exp_9.ipynb +++ /dev/null @@ -1,96 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "import datetime\n", - "import os\n", - "from mdagent import MDAgent\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "prompt9 = \"What are the known interractions of protein 1BDG?.\"\n", - "llm_var = \"gpt-4o-2024-05-13\"\n", - "tools = \"all\"\n", - "agent = MDAgent(agent_type=\"Structured\", model=llm_var, top_k_tools=tools)\n", - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "print(\"LLM: \",agent.llm.model_name,\"\\nTemperature: \",agent.llm.temperature)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "agent.run(prompt9)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "now = datetime.datetime.now()\n", - "date = now.strftime(\"%Y-%m-%d\")\n", - "print(\"date and time:\",date)\n", - "time = now.strftime(\"%H:%M:%S\")\n", - "print(\"time:\",time)\n", - "registry = agent.path_registry\n", - "paths_and_descriptions = registry.list_path_names_and_descriptions()\n", - "print(\"\\n\".join(paths_and_descriptions.split(\",\")))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Experiment Result:\n", - "### Completed without Exception or TimeOut Errors ✅\n", - "### Attempted all necessary steps ✅\n", - "### Logic make sense ✅\n", - "### Correct Answer ❌" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "mdagent2", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.11.9" - } - }, - "nbformat": 4, - "nbformat_minor": 2 -}