Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
fixed default to no coarse-graining in mol2graph
  • Loading branch information
colliner authored Jul 21, 2022
1 parent a8cd500 commit b97dab0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pycbh/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ def fn2graph(fn, simple_graph=False, fully_connected=False):
graph, cg_graph = mol2graph(fn, mol_idx, mol, simple_graph=simple_graph,fully_connected=fully_connected)
return graph, cg_graph

def mol2graph(fn, mol_idx, mol, simple_graph=False, cg_opts=['halogen','rings'], fully_connected=False):
def mol2graph(fn, mol_idx, mol, simple_graph=False, cg_opts=[], fully_connected=False):
smi = Chem.MolToSmiles(mol,kekuleSmiles=True,canonical=True)
mol_ = Chem.RemoveHs(mol)
smi = Chem.MolToSmiles(mol_)
Expand Down Expand Up @@ -316,8 +316,6 @@ def mol2graph(fn, mol_idx, mol, simple_graph=False, cg_opts=['halogen','rings'],
pass
elif atom != 1.0 or include_H:
cg_opts=[]
#cg_opts=['nitro','sulfo','phospho','rings']
cg_opts=['aromatic']
cg_incl_ls=coarse_grain(idx,atoms,mol,cg_opts=cg_opts)
#print('idx: {}'.format(idx))
atom_obj = mol.GetAtoms()[idx]
Expand Down

0 comments on commit b97dab0

Please sign in to comment.