Skip to content

Commit

Permalink
feat(download_metanetx): generate sig alphabet with nbit and neighbors
Browse files Browse the repository at this point in the history
  • Loading branch information
tduigou committed Oct 27, 2023
1 parent a898d9c commit 8b749d6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/paper/dataset/download_metanetx.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,18 @@ def filter(smi, radius, verbose=False):
allHsExplicit=False,
)
Alphabet.fill(df["SMILES"].tolist(), verbose=True)
Alphabet.save(falphabet_nbit)
Alphabet.save(args.path["alphabet_sig_nbit"])
Alphabet.printout()

if not os.path.isfile(args.path["alphabet_sig_neigh_nbit"]):
print("Build Signature alphabet (nbit, neighbors)")
df = pd.read_csv(args.path["dataset"] + ".csv")
Alphabet = SignatureAlphabet(
radius=args.parameters_radius_int,
nBits=2048,
neighbors=True,
allHsExplicit=False,
)
Alphabet.fill(df["SMILES"].tolist(), verbose=True)
Alphabet.save(args.path["alphabet_sig_neigh_nbit"])
Alphabet.printout()

0 comments on commit 8b749d6

Please sign in to comment.