Skip to content

Commit

Permalink
debug graphBuild and ChemTools
Browse files Browse the repository at this point in the history
  • Loading branch information
n-beckage committed Apr 6, 2023
1 parent ff673fb commit b51b294
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
28 changes: 2 additions & 26 deletions ChemTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ def getPropList(node_labels):
# node_labels - list of all the smiles in the graph
# fps - corresponding list of all the fingerprints from the graph
# prop_list - list of all the molecular properties of all the molecules in the graph (corresponds with above).
def faerunPlot(chemical_space_graph, scatter_name,node_labels,fps,prop_list):
def faerunPlot(chemical_space_graph, scatter_name,node_labels,fps):
# enc = MHFPEncoder(1024)
# #the min hash fingerprint from the mhfp package
# fps=[]
Expand Down Expand Up @@ -993,32 +993,8 @@ def faerunPlot(chemical_space_graph, scatter_name,node_labels,fps,prop_list):
print('computing some molecule properties')
#use a physchem prop for coloring
color_values=[]
# #properties to include
# NHD=[]
# NHA=[]
# MWT=[]
# MLP=[]
# MMR=[]
# NAT=[]
# PSA=[]
# # adding a continuous druglikeness metric
# qed=[]

# prop_list = [NHD,NHA,MWT,MLP,MMR,NAT,PSA,qed]

# old way; will now call get_mol_props() independently of faerunPlot()
# for node_smiles in node_labels:
# mol_props=get_mol_props(node_smiles)
# NHD.append(mol_props[0])
# NHA.append(mol_props[1])
# MWT.append(mol_props[2])
# MLP.append(mol_props[3])
# MMR.append(mol_props[4])
# NAT.append(mol_props[5])
# PSA.append(mol_props[6])
# qed.append(QED.default(Chem.MolFromSmiles(node_smiles)))

NHD, NHA, MWT, MLP, MMR, NAT, PSA, qed = prop_list
NHD, NHA, MWT, MLP, MMR, NAT, PSA, qed = getPropList(node_labels)

# plt.scatter(x_posit,y_posit)
# plt.show()
Expand Down
4 changes: 2 additions & 2 deletions graphBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@
if plot:
# get list of smile strings from graph, get corresponding fingerprints list
node_labels, fps = get_node_labels_fps(csg)

# Run faerunPlot function:
faerunPlot(csg, csg_name,node_labels,fps,prop_list)
faerunPlot(csg, csg_name,node_labels,fps)
# Record time taken for faerunPlot function
faerunPlot_time = time.time() - plot_stamp

Expand All @@ -70,7 +71,6 @@

# get the molecular properties nested lists
NHD, NHA, MWT, MLP, MMR, NAT, PSA, qed = getPropList(node_labels)
prop_list = []

data_time = time.time() - data_stamp

Expand Down

0 comments on commit b51b294

Please sign in to comment.