-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 92b7e14
Showing
23 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
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,20 @@ | ||
name,penalty | ||
3_valent_halogen,100 | ||
3_valent_iodine,100 | ||
4_valent_sulphur_2_connections,100 | ||
6_membered_aromatic_sulfur,50 | ||
8_aminoquinoline,100 | ||
8_hydroxyquinoline,100 | ||
9_aminoacridine,100 | ||
acetal_1_in_ring,30 | ||
acetal_acyclic,100 | ||
acetal_both_in_ring,30 | ||
acetate_ester,100 | ||
acetylene,50 | ||
acetylene_heteroatom,100 | ||
acid_halide,100 | ||
activated_ester,100 | ||
activated_phthalimide,100 | ||
acyl_amide_acyclic,40 | ||
acyl_amide_cyclic,60 | ||
acyl_aromatic_nn,100 |
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,2 @@ | ||
SMARTS | ||
"[#9,#17,#35,#53;X3]" |
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,2 @@ | ||
SMARTS | ||
"[#53;X3]" |
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,2 @@ | ||
SMARTS | ||
"[SD2v4]" |
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,2 @@ | ||
SMARTS | ||
"s1aaaaa1" |
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,2 @@ | ||
SMARTS | ||
"[nD2H0]1c2c(-[ND2H])cccc2ccc1" |
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,2 @@ | ||
SMARTS | ||
"[OD1]c1cccc2cccnc12" |
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,2 @@ | ||
SMARTS | ||
"N-c1c2c([nH0]c3c1cccc3)cccc2" |
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,2 @@ | ||
SMARTS | ||
"C[O,S;R1]C[O,S;R0]C" |
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,2 @@ | ||
SMARTS | ||
"[#7,#8,#16;X2;!R]-[C;!R;X4]-[#7,#8,#16;X2;!R]" |
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,2 @@ | ||
SMARTS | ||
C[O,S;R1]C[O,S;R1]C |
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,2 @@ | ||
SMARTS min_hits_needed | ||
"[#6]-[#8]-[#6;X3](-[#6;H3])=[#8]" 3 |
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,2 @@ | ||
SMARTS | ||
"C#C" |
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,2 @@ | ||
SMARTS | ||
"[!#6]-C#C" |
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,2 @@ | ||
SMARTS | ||
"[#9,#17,#35,#53]-[C;X3]=O" |
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,2 @@ | ||
SMARTS | ||
"O=[#6,#15,#16;!R;X3,X4]-O-[#6,#15,#16]" |
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,3 @@ | ||
SMARTS | ||
"O=C2c1ccc([F,Cl,Br,I,$(N(~[O;X1])-[O;X1]),$(C=O)])cc1C(=O)N2" | ||
"O=C2c1cccc([F,Cl,Br,I,$(N(~[O;X1])-[O;X1]),$(C=O)])c1C(=O)N2" |
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,2 @@ | ||
SMARTS | ||
"[#8,#16;X1]=[C;!R]-[#7]-[C;!R]=[#8,#16;X1]" |
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,2 @@ | ||
SMARTS | ||
"[#8,#16;X1]=[C;R]-[#7]-[C;!R]=[#8,#16;X1]" |
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,2 @@ | ||
SMARTS | ||
"[O,S;X1]=[C;!R]-[n;r5;R1;X3]~[n;r5;R1;X2]" |
Empty file.
Empty file.
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,29 @@ | ||
import os | ||
from pathlib import Path | ||
import unittest | ||
|
||
import pandas as pd | ||
from rdkit import Chem | ||
|
||
|
||
class CheckedSmarts(unittest.TestCase): | ||
def test_validity(self): | ||
data_path = Path(__file__).parents[1] / "data" | ||
query_path = data_path / "queries" | ||
checked_smarts = 0 | ||
for file in os.listdir(query_path): | ||
smarts_df = pd.read_csv(query_path / file, sep="\t") | ||
try: | ||
smarts_list = smarts_df["SMARTS"].tolist() | ||
except Exception as e: | ||
print(file) | ||
raise e | ||
for smarts_str in smarts_list: | ||
smarts_obj = Chem.MolFromSmarts(smarts_str) | ||
self.assertIsNotNone(smarts_obj, file) | ||
checked_smarts += 1 | ||
print(checked_smarts) | ||
|
||
|
||
if __name__ == '__main__': | ||
unittest.main() |