-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into filter_update
- Loading branch information
Showing
27 changed files
with
2,044 additions
and
92 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ __pycache__ | |
molpipeline.egg-info/ | ||
lib/ | ||
build/ | ||
lightning_logs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Classes ment to transform given inchi to a RDKit molecule.""" | ||
|
||
from rdkit import Chem | ||
|
||
from molpipeline.abstract_pipeline_elements.any2mol.string2mol import ( | ||
SimpleStringToMolElement, | ||
) | ||
from molpipeline.utils.molpipeline_types import RDKitMol | ||
|
||
|
||
class InchiToMol(SimpleStringToMolElement): | ||
"""Transforms Inchi to RDKit Mol objects.""" | ||
|
||
def string_to_mol(self, value: str) -> RDKitMol: | ||
"""Transform Inchi string to molecule. | ||
Parameters | ||
---------- | ||
value: str | ||
Inchi string. | ||
Returns | ||
------- | ||
RDKitMol | ||
Rdkit molecule if valid Inchi, else None. | ||
""" | ||
return Chem.MolFromInchi(value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.