Clone the repository and install in editable mode (recommended for development):
pip install git+https://github.com/bisect-group/FGR.gitAfter installation, you can use the FGR encoder in your Python code or notebooks:
from FGR.encoder import FGREncoder
embedder = FGREncoder(
device="cpu" # or "cuda" if using GPU
)
smiles_list = ["CCN", "CCF"]
emb = embedder.get_embedding(smiles_list, method="FGR")
print(emb.shape)methodcan be"FG","MFG", or"FGR"depending on the embedding you want.- Make sure the required files (
FGR_model.ckpt,fg.parquet, tokenizer) are available at the specified paths.