Skip to content

Commit

Permalink
Update generate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Saoge123 authored Dec 4, 2023
1 parent b70b997 commit b983006
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pocket_flow/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,14 +357,12 @@ def generate(self, data, num_gen=100, rec_name='recptor', with_print=True, root_
data_clone = data.clone().detach()
out = self.run(data_clone)
if out:
mol, mol_NoModify = out
mol, _ = out
del data_clone
if mol is not None:
#print(len(mol.GetAtoms()))
mol.SetProp('_Name', 'No_%s-%s'%(valid_conuter, out_dir))
mol_NoModify.SetProp('_Name', 'No_%s-%s' %(valid_conuter, out_dir))
smi = Chem.MolToSmiles(mol)
smi_NoModify = Chem.MolToSmiles(mol_NoModify)
if with_print:
print(smi)
with open(out_dir+'generated.sdf', 'a') as sdf_writer:
Expand Down

0 comments on commit b983006

Please sign in to comment.