Releases: Manas02/molecularnetwork
Releases · Manas02/molecularnetwork
v0.3.5
CHANGELOG
- Added edge weight attribute as the Structural similarity between molecules.
from molecularnetwork import MolecularNetwork
# Define SMILES strings and classes
smiles_list = ["CCO", "CCN", "CCC", "CCF"]
classes = ["alcohol", "amine", "alkane", "fluoride"]
# Create MolecularNetwork instance
network = MolecularNetwork(descriptor="morgan2", sim_metric="tanimoto", sim_threshold=0.25)
# Generate the molecular network graph
graph = network.create_graph(smiles_list, classes)
graph[0][1]['weight'] # Gives similarity between node 0 and 1