Skip to content

Commit

Permalink
Delete tensorflow version
Browse files Browse the repository at this point in the history
  • Loading branch information
renzph committed Aug 22, 2023
1 parent c7e7e99 commit 250401f
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 429 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# MANIFEST.in
include fcd/ChemNet_v0.13_pretrained.h5
include fcd/ChemNet_v0.13_pretrained.pt
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,21 @@ You can install the FCD using
pip install fcd
```

rdkit is best install via conda
```
conda install rdkit -c rdkit
```

# Requirements
```
python>3<3.8
numpy
tensorflow>1.8
keras>2.1
torch
scipy
rdkit
```
rdkit is causing troubles with python3.8 for me. You might wanna opt for 3.7.
For the effect of versions on results see `tests/test_results.csv`.
Using the current versions of tensorflow (2.1.0) and keras (2.3.1) results differ from previous versions but
are probably negligible.


# Updates
## Version 1.1 changes
- Got rid of unneeded imports
- `load_ref_model` doesn't need an argument any more to load a model.
- `canonical` and `canonical_smiles` now return `None` for invalid smiles.
- Added `get_fcd` as a quick way to get a the fcd score from two lists of smiles.
- Added `get_fcd` as a quick way to get a the fcd score from two lists of smiles.

## Version 1.2 changes
- Ported the package to pytorch with the help of https://github.com/insilicomedicine/fcd_torch
- pytorch allows a lighter package and is more popular than Tensorflow which saves an additional install
Binary file removed fcd/ChemNet_v0.13_pretrained.h5
Binary file not shown.
File renamed without changes.
231 changes: 0 additions & 231 deletions fcd/FCD.py

This file was deleted.

6 changes: 3 additions & 3 deletions fcd/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .FCD import calculate_frechet_distance, build_masked_loss, masked_accuracy, get_one_hot, myGenerator_predict, \
load_ref_model, get_predictions, canonical, canonical_smiles, get_fcd
from .fcd import get_fcd, get_predictions, load_ref_model
from .utils import calculate_frechet_distance, canonical_smiles

__version__ = "1.1"
__version__ = "1.2"
2 changes: 1 addition & 1 deletion fcd_torch/fcd.py → fcd/fcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def load_ref_model(model_path: Optional[str] = None):

if model_path is None:
chemnet_model_filename = "ChemNet_v0.13_pretrained.pt"
model_bytes = pkgutil.get_data("fcd_torch", chemnet_model_filename)
model_bytes = pkgutil.get_data("fcd", chemnet_model_filename)

tmpdir = tempfile.TemporaryDirectory()
model_path = os.path.join(tmpdir.name, chemnet_model_filename)
Expand Down
Binary file removed fcd/ref_combined_stat.p
Binary file not shown.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions fcd_torch/__init__.py

This file was deleted.

Loading

0 comments on commit 250401f

Please sign in to comment.