Skip to content

Commit

Permalink
bumped selfies to v2 (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
whitead authored Jan 21, 2022
1 parent 08899ef commit 05f204c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ one of the following:
* `'narrow'`: Only one change to molecular structure, reduced set of possible bonds/elements
* `'medium'`: Default. One or two changes to molecular structure, reduced set of possible bonds/elements
* `'wide'`: One through five changes to molecular structure, large set of possible bonds/elements
* `'chemed'`: A restrictive set where only pubchem molecules are considered. *Experimental*
* `'custom'`: A restrictive set where only molecules provided by the "data" key are considered. *Experimental*
* `'chemed'`: A restrictive set where only pubchem molecules are considered.
* `'custom'`: A restrictive set where only molecules provided by the "data" key are considered.

You can also pass `num_samples` as a "request" for number of samples. You will typically end up with less due to
degenerate molecules. See API for complete description.
Expand Down
7 changes: 7 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

v1.0.0 (2022-1-21)
-------------------
* Switched to SELFIES v2.0 release, which has a different token list
* Removed "experimental" tag from Chemed and Custom methods
* Type annotations now pass ``mypy``
* Paper models now generate SVGs correctly and fixed token issues

v0.6.0 (2022-1-17)
-------------------
* Changed behavior of num_samples so that it is not affected by mutation count in STONED
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# -- Project information -----------------------------------------------------

project = "exmol"
copyright = "2021, Geemi Wellawatte, Andrew D White"
copyright = "2022, Geemi Wellawatte, Andrew D White"
author = "Geemi Wellawatte, Andrew D White"


Expand Down
12 changes: 6 additions & 6 deletions exmol/exmol.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def get_basic_alphabet() -> Set[str]:
to_remove.extend(["[P]", "[#P]", "[=P]"])

a -= set(to_remove)
a.add("[O-1expl]")
a.add("[O-1]")
return a


Expand Down Expand Up @@ -149,9 +149,9 @@ def run_chemed(
:return: SMILES and SCORES
"""
if _pbar:
_pbar.set_description("⚡CHEMED⚡ is Experimental ☠️")
_pbar.set_description("⚡CHEMED⚡")
else:
print("⚡CHEMED⚡ is Experimental ☠️")
print("⚡CHEMED⚡")
url = f"https://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/fastsimilarity_2d/smiles/{requests.utils.quote(origin_smiles)}/property/CanonicalSMILES/JSON"
try:
reply = requests.get(
Expand Down Expand Up @@ -204,9 +204,9 @@ def run_custom(
:return: SMILES and SCORES
"""
if _pbar:
_pbar.set_description("⚡CUSTOM⚡ is Experimental ☠️")
_pbar.set_description("⚡CUSTOM⚡")
else:
print("⚡CUSTOM⚡ is Experimental ☠️")
print("⚡CUSTOM⚡")
mol0 = smi2mol(origin_smiles)
fp0 = stoned.get_fingerprint(mol0, fp_type)
scores = []
Expand Down Expand Up @@ -246,7 +246,7 @@ def sample_space(
:param origin_smiles: starting SMILES
:param f: A function which takes in SMILES and SELFIES and returns predicted value. Assumed to work with lists of SMILES/SELFIES unless `batched = False`
:param batched: If `f` is batched
:param preset: Can be wide, medium, or narrow. Determines how far across chemical space is sampled. Try `"chemed"` experimental preset to only sample commerically available compounds.
:param preset: Can be wide, medium, or narrow. Determines how far across chemical space is sampled. Try `"chemed"` preset to only sample commerically available compounds.
:param data: If not None and preset is `"custom"` will use this data instead of generating new ones.
:param method_kwargs: More control over STONED, CHEMED and CUSTOM can be set here. See :func:`run_stoned`, :func:`run_chemed` and :func:`run_custom`
:param num_samples: Number of desired samples. Can be set in `method_kwargs` (overrides) or here. `None` means default for preset
Expand Down
2 changes: 1 addition & 1 deletion exmol/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.0"
__version__ = "1.0.0"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
license="MIT",
packages=["exmol", "exmol.stoned"],
install_requires=[
"selfies == 1.0.4",
"selfies >= 2.0.0",
"numpy",
"requests",
"tqdm",
Expand Down

0 comments on commit 05f204c

Please sign in to comment.