diff --git a/Analyze_WBO_Torsion.ipynb b/Analyze_WBO_Torsion.ipynb index 62fe4119..4bc1beb8 100644 --- a/Analyze_WBO_Torsion.ipynb +++ b/Analyze_WBO_Torsion.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 41, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 6, "metadata": {}, "outputs": [], "source": [ @@ -113,7 +113,16 @@ " \n", " # get dihedral indices and pass on to get_wbo function\n", " dihedral_indices = list(tdr_object.dict()['keywords']['dihedrals'][0])\n", - " mol = chemi.smiles_to_oemol(smiles)\n", + " #mol = chemi.smiles_to_oemol(smiles)\n", + " \n", + " #debug\n", + " # create a new molecule\n", + " #mol = oechem.OEGraphMol()\n", + " mol = oechem.OEMol()\n", + " # convert the SMILES string into a molecule\n", + " oechem.OESmilesToMol(mol, smiles)\n", + " \n", + " \n", " mol.SetData(\"TB\", max(torsion_barriers))\n", " mol.SetData(\"TDindices\", dihedral_indices)\n", " mol.SetData(\"TDid\", tdr_object.id)\n", @@ -238,35 +247,63 @@ "\n", " mols=[]\n", " errors=[]\n", + " matched=0\n", " for mol in molList:\n", + " any_match=0\n", " charged = chemi.get_charges(mol)\n", " for bond in charged.GetBonds():\n", - " #m1 = bond.GetBgn().GetMapIdx()\n", - " #m2 = bond.GetEnd().GetMapIdx()\n", " m1=bond.GetBgnIdx()\n", " m2=bond.GetEndIdx()\n", " index=mol.GetData(\"TDindices\")\n", - " #print(m1)\n", - " #print(m2)\n", - " #print(index[1])\n", - " #print(index[2])\n", - " if m1 in [index[1], index[2]]:\n", - " if m2 in [index[1], index[2]]:\n", + " indices=[index[1], index[2]]\n", + " # DEBUGGING: ERROR IS HAPPENING HERE\n", + " # ISSUE WITH INDEX, ROWLEY DATASET IS NOT FINDING MATCH TO TORSION INDICES FOR ANY \n", + " if (m1 in indices and m2 in indices):\n", + " any_match+=1\n", + " matched+=1\n", " #print(\"match\")\n", " #if (m1 in map_idx or m2 in map_idx) and not bond.IsInRing():\n", - " try: \n", - " wbo = bond.GetData('WibergBondOrder')\n", - " #print(wbo)\n", - " mol.SetData(\"WBO\", wbo)\n", - " mols.append(mol)\n", - " except: \n", - " errors.append(mol)\n", - " pass\n", + " try: \n", + " wbo = bond.GetData('WibergBondOrder')\n", + " mol.SetData(\"WBO\", wbo)\n", + " mols.append(mol)\n", + " except Exception as e: \n", + " print(e)\n", + " errors.append(mol)\n", + " pass\n", + " if any_match==0:\n", + " print(\"no matches\")\n", + " oemol2mol2(mol, mol.GetData('cmiles'))\n", + " if any_match>0:\n", + " oemol2mol2(mol, \"match_\"+mol.GetData('cmiles'))\n", + " \n", " \n", " print(\"Out of \" +str(len(molList)) + \" molecules, \" + str(len(mols)) + \" were processed with WBO\")\n", + " print(matched)\n", " return mols, errors\n", " \n", "\n", + "def oemol2mol2(mol, tag):\n", + " \"\"\"\n", + " Take mollist and create oeb file using the tag as the .oeb file name \n", + " \n", + " Parameters\n", + " ----------\n", + " molList : List of objects\n", + " List of oemols with datatags generated in genData function\n", + " tag : String\n", + " Title of the oeb file \n", + "\n", + " Returns\n", + " -------\n", + " \"\"\"\n", + " ofile = oechem.oemolostream(tag+'.mol2')\n", + " oechem.OEWriteConstMolecule(ofile, mol)\n", + " ofile.close()\n", + " return\n", + "\n", + " \n", + "\n", "\n", "def makeOEB(oemolList, tag):\n", " \"\"\"\n", @@ -471,17 +508,16 @@ }, { "cell_type": "code", - "execution_count": 43, - "metadata": { - "scrolled": true - }, + "execution_count": 8, + "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Out of 43 molecules, 43 were processed with torsion data\n", - "Out of 43 molecules, 43 were processed with WBO\n" + "Out of 43 molecules, 43 were processed with WBO\n", + "43\n" ] }, { @@ -550,13 +586,12 @@ "source": [ "#An example of combining and comparing two datasets, let's try comparing with the phenyl dataset \n", "genData(\"OpenFF Substituted Phenyl Set 1\", \"phenyl\")\n", - "\n", "visualize_wbo_correlation_compare('phenyl.oeb', 'fragmentstability.oeb', \"fragmentStability_and_phenyl.pdf\")" ] }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 7, "metadata": {}, "outputs": [ { @@ -564,7 +599,36 @@ "output_type": "stream", "text": [ "Out of 86 molecules, 86 were processed with torsion data\n", - "Out of 86 molecules, 58 were processed with WBO\n" + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "no matches\n", + "Out of 86 molecules, 58 were processed with WBO\n", + "58\n" ] }, { @@ -598,6 +662,8 @@ ], "source": [ "#Let's also add the Rowley dataset and compare \n", + "#DEBUGGING ROWLEY DATASET\n", + "\n", "genData(\"OpenFF Rowley Biaryl v1.0\", \"rowley\")\n", "visualize_wbo_correlation_compare('phenyl.oeb', 'rowley.oeb', \"rowley_and_phenyl.pdf\")" ] diff --git a/ForceFields/InitalGuessWBO_Bayly.pptx b/ForceFields/InitalGuessWBO_Bayly.pptx new file mode 100644 index 00000000..706b4915 Binary files /dev/null and b/ForceFields/InitalGuessWBO_Bayly.pptx differ diff --git a/ForceFields/README.md b/ForceFields/README.md new file mode 100644 index 00000000..c6d89787 --- /dev/null +++ b/ForceFields/README.md @@ -0,0 +1,10 @@ +# Force fields for proposed WBO interpolated torsion parameters + +This repository contains the .offxml file format force fields for forcebalance refitting experiments. +These parameters were adapted from Chris Bayly's initial guess smarts for WBO interpolated parameters, round 0. + +## Manifest +* `openff-1.2.1-biaryl.offxm` - Proposed parameters are TIG0 through TIG8 +* `openff-1.2.1-phenyl.offxm` - Proposed parameters are T1i through t7i +* `openff-1.2.1-combined.offxm` - Contains both sets of parameters TIG0 through TIG8 and T1i through t7i. + diff --git a/ForceFields/openff-1.2.1-biaryl.offxml b/ForceFields/openff-1.2.1-biaryl.offxml new file mode 100644 index 00000000..beea2e61 --- /dev/null +++ b/ForceFields/openff-1.2.1-biaryl.offxml @@ -0,0 +1,379 @@ + + + + + + The Open Force Field Initiative + 2020-09-09 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ForceFields/openff-1.2.1-combined.offxml b/ForceFields/openff-1.2.1-combined.offxml new file mode 100644 index 00000000..445ff8f6 --- /dev/null +++ b/ForceFields/openff-1.2.1-combined.offxml @@ -0,0 +1,386 @@ + + + + + + The Open Force Field Initiative + 2020-09-09 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ForceFields/openff-1.2.1-phenyl.offxml b/ForceFields/openff-1.2.1-phenyl.offxml new file mode 100644 index 00000000..5154cf5b --- /dev/null +++ b/ForceFields/openff-1.2.1-phenyl.offxml @@ -0,0 +1,377 @@ + + + + + + The Open Force Field Initiative + 2020-09-09 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..61e14a6d --- /dev/null +++ b/requirements.txt @@ -0,0 +1,178 @@ +# packages in environment at /Users/jessica/miniconda3: +# +# Name Version Build Channel +ambit 0.3 h57cbb5c_0 psi4 +appnope 0.1.0 py37_1000 conda-forge +asn1crypto 0.24.0 py37_0 +atomicwrites 1.3.0 py_0 conda-forge +attrs 19.1.0 py_0 conda-forge +backcall 0.1.0 py_0 conda-forge +bcrypt 3.1.6 py37h1de35cc_0 +blas 1.0 mkl conda-forge +bleach 3.1.0 py_0 conda-forge +boost 1.68.0 py37h9888f84_1001 conda-forge +boost-cpp 1.68.0 h6f8c590_1000 conda-forge +bzip2 1.0.6 h1de35cc_1002 conda-forge +ca-certificates 2019.9.11 hecc5488_0 conda-forge +cairo 1.16.0 h9247486_1000 conda-forge +certifi 2019.9.11 py37_0 conda-forge +cffi 1.11.5 py37h6174b99_1 +chardet 3.0.4 py37_1 +chemps2 1.8.9 h57cbb5c_0 psi4 +conda 4.7.12 py37_0 conda-forge +conda-env 2.6.0 1 +conda-package-handling 1.4.1 py37_0 conda-forge +cryptography 2.6.1 py37h212c5bf_0 conda-forge +cycler 0.10.0 pypi_0 pypi +dbus 1.13.6 h2f22bb5_0 conda-forge +decorator 4.4.0 py_0 conda-forge +deepdiff 3.3.0 py37_1 psi4 +defusedxml 0.5.0 py_1 conda-forge +dkh 1.2 ha0829f0_3 psi4 +entrypoints 0.3 py37_1000 conda-forge +expat 2.2.5 h0a44026_1002 conda-forge +fontconfig 2.13.1 h1027ab8_1000 conda-forge +freetype 2.10.0 h24853df_0 conda-forge +gau2grid 1.3.1 h1d22016_0 psi4 +gdma 2.2.6 hdc02c5d_5 psi4 +geometric 0.9.7.2 py_0 conda-forge +gettext 0.19.8.1 h46ab8bc_1002 conda-forge +glib 2.58.3 h2836805_1001 conda-forge +hdf5 1.10.2 hc401514_3 conda-forge +icu 58.2 h0a44026_1000 conda-forge +idna 2.7 py37_0 +importlib_metadata 0.17 py37_1 conda-forge +intel-openmp 2019.3 199 +ipykernel 5.1.1 py37h24bf2e0_0 conda-forge +ipython 7.5.0 py37h24bf2e0_0 conda-forge +ipython_genutils 0.2.0 py_1 conda-forge +ipywidgets 7.4.2 py_0 conda-forge +jedi 0.13.3 py37_0 conda-forge +jinja2 2.10.1 py_0 conda-forge +jpeg 9c h1de35cc_1001 conda-forge +jsonpickle 0.9.6 py37_0 psi4 +jsonschema 3.0.1 py37_0 conda-forge +jupyter 1.0.0 py_2 conda-forge +jupyter_client 5.2.4 py_3 conda-forge +jupyter_console 6.0.0 py_0 conda-forge +jupyter_core 4.4.0 py_0 conda-forge +jupyterlab 0.33.11 py37_0 +jupyterlab_launcher 0.11.2 py37h28b3542_0 +kiwisolver 1.0.1 pypi_0 pypi +krb5 1.16.1 hddcf347_7 +libarchive 3.3.3 h5c473cc_1006 conda-forge +libblas 3.8.0 10_mkl conda-forge +libcblas 3.8.0 10_mkl conda-forge +libcxx 4.0.1 h579ed51_0 +libcxxabi 4.0.1 hebd6815_0 +libedit 3.1.20170329 hb402a30_2 +libffi 3.2.1 h475c297_4 +libgfortran 3.0.1 0 conda-forge +libiconv 1.15 h01d97ff_1005 conda-forge +libint 1.2.1 h1989688_2 psi4 +liblapack 3.8.0 10_mkl conda-forge +libpng 1.6.37 h2573ce8_0 conda-forge +libpq 11.2 h051b688_0 +libsodium 1.0.16 h1de35cc_1001 conda-forge +libtiff 4.0.10 hd08fb8f_1003 conda-forge +libxc 4.3.4 h1de35cc_0 psi4 +libxml2 2.9.9 hd80cff7_0 conda-forge +lxml 4.2.5 pypi_0 pypi +lz4-c 1.8.3 h6de7cb9_1001 conda-forge +lzo 2.10 h1de35cc_1000 conda-forge +markupsafe 1.1.1 py37h1de35cc_0 conda-forge +matplotlib 3.0.2 pypi_0 pypi +mistune 0.8.4 py37h1de35cc_1000 conda-forge +mkl 2019.3 199 +mongodb 3.3.9 0 https://repo.anaconda.com/pkgs/free +mongoengine 0.17.0 py37_0 conda-forge +more-itertools 4.3.0 py37_1000 conda-forge +nbconvert 5.5.0 py_0 conda-forge +nbformat 4.4.0 py_1 conda-forge +ncurses 6.1 h0a44026_0 +networkx 2.3 py_0 conda-forge +notebook 5.7.8 py37_1 conda-forge +numpy 1.15.4 pypi_0 pypi +oeommtools 0.1.7 pypi_0 pypi +olefile 0.46 py_0 conda-forge +openblas 0.3.6 hd44dcd8_1 conda-forge +openeye-toolkits 2019.4.2 py37_0 openeye +openforcefield 0.0.4+14.gd0868c7.dirty pypi_0 pypi +openssl 1.1.1c h01d97ff_0 conda-forge +pandas 0.24.2 py37h0a44026_0 conda-forge +pandoc 2.7.2 0 conda-forge +pandocfilters 1.4.2 py_1 conda-forge +parso 0.4.0 py_0 conda-forge +pcmsolver 1.2.1 py37h92ea98a_0 psi4 +pcre 8.41 h0a44026_1003 conda-forge +pexpect 4.7.0 py37_0 conda-forge +pickleshare 0.7.5 py37_1000 conda-forge +pillow 5.3.0 py37hbddbef0_1000 conda-forge +pint 0.9 py37_2 psi4 +pip 18.1 pypi_0 pypi +pixman 0.34.0 h1de35cc_1003 conda-forge +plotly 3.8.0 py_0 conda-forge +pluggy 0.12.0 py_0 conda-forge +prometheus_client 0.6.0 py_0 conda-forge +prompt_toolkit 2.0.9 py_0 conda-forge +psi4 1.3.2+ecbda83 py37h7101e00_0 psi4 +psutil 5.6.2 py37h01d97ff_0 conda-forge +psycopg2 2.8.2 py37h212c5bf_0 conda-forge +ptyprocess 0.6.0 py_1001 conda-forge +py 1.8.0 py_0 conda-forge +py-cpuinfo 5.0.0 py_0 conda-forge +py3dmol 0.8.0 py_0 conda-forge +pycairo 1.18.1 py37h650f75e_0 conda-forge +pycosat 0.6.3 py37h1de35cc_0 +pycparser 2.18 py37_1 +pydantic 0.23 py37_0 psi4 +pygments 2.4.2 py_0 conda-forge +pymongo 3.7.2 py37h0a44026_0 conda-forge +pyopenssl 18.0.0 py37_0 +pyparsing 2.3.0 pypi_0 pypi +pyqt 5.9.2 py37h2a560b1_0 conda-forge +pyrsistent 0.15.1 py37h01d97ff_0 conda-forge +pysocks 1.6.8 py37_0 +pytest 4.5.0 py37_0 conda-forge +python 3.7.2 haf84260_0 +python-dateutil 2.7.5 pypi_0 pypi +python-libarchive-c 2.8 py37_1004 conda-forge +python.app 2 py37_8 +pytz 2019.1 py_0 conda-forge +pyyaml 5.1 py37h1de35cc_0 conda-forge +pyzmq 18.0.1 py37h2d07e9b_1 conda-forge +qcelemental 0.4.1 py_0 psi4 +qcengine 0.6.4 py_0 psi4 +qcfractal 0.7.1 py_1 conda-forge +qcportal 0.7.1 py_1 conda-forge +qt 5.9.7 h93ee506_1 conda-forge +qtconsole 4.5.1 py_0 conda-forge +rdkit 2019.03.2 py37haff9cca_0 conda-forge +readline 7.0 h1de35cc_5 +requests 2.19.1 py37_0 +retrying 1.3.3 py_2 conda-forge +ruamel_yaml 0.15.46 py37h1de35cc_0 +send2trash 1.5.0 py_0 conda-forge +setuptools 40.2.0 py37_0 +simint 0.7 h9ec563c_2 psi4 +sip 4.19.8 py37h0a44026_1000 conda-forge +six 1.11.0 py37_1 +sqlalchemy 1.3.4 py37h01d97ff_0 conda-forge +sqlite 3.26.0 h1765d9f_1001 conda-forge +terminado 0.8.2 py37_0 conda-forge +testpath 0.4.2 py_1001 conda-forge +tk 8.6.8 ha441bb4_0 +tornado 6.0.2 py37h01d97ff_0 conda-forge +tqdm 4.33.0 py_0 conda-forge +traitlets 4.3.2 py37_1000 conda-forge +urllib3 1.23 py37_0 +wcwidth 0.1.7 py_1 conda-forge +webencodings 0.5.1 py_1 conda-forge +wheel 0.31.1 py37_0 +widgetsnbextension 3.4.2 py37_1000 conda-forge +xz 5.2.4 h1de35cc_4 +yaml 0.1.7 hc338f04_2 +zeromq 4.3.1 h0a44026_1000 conda-forge +zipp 0.5.0 py_0 conda-forge +zlib 1.2.11 hf3cbc9b_2 +zstd 1.4.0 ha9f0a20_0 conda-forge