Skip to content

Commit 607859d

Browse files
committed
#38 formatting in pbf_ev.py (no fixes)
1 parent e9ef3a1 commit 607859d

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/python/pipelines/rdkit/pbf_ev.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,20 @@ def main():
129129
for mol in suppl:
130130
i +=1
131131
AllChem.EmbedMolecule(mol)
132-
if mol is None: continue
132+
if mol is None:
133+
errors += 1
134+
continue
133135
out_vector = PBFev(mol)
134-
if out_vector is None: continue
136+
if out_vector is None:
137+
errors += 1
138+
continue
135139
rd = PBFRD(mol)
136-
mol.SetDoubleProp("distance",rd)
140+
mol.SetDoubleProp("distance", rd)
137141
for j,angle in enumerate(out_vector):
138-
mol.SetDoubleProp("angle"+"_"+str(j), angle)
142+
mol.SetDoubleProp("angle" + "_" + str(j), angle)
139143
out_results.append(mol)
140-
count = write_out(out_results,count,writer,args.outformat)
141-
utils.log("Handled "+str(i)+" molecules, resulting in "+str(count)+" outputs")
144+
count = write_out(out_results, count, writer, args.outformat)
145+
utils.log("Handled " + str(i) + " molecules, resulting in "+ str(count)+ " outputs and " + str(errors) + ' errors')
142146
writer.flush()
143147
writer.close()
144148
input.close()

0 commit comments

Comments
 (0)