Skip to content

Commit 7dbe6ca

Browse files
committed
#38 added main() method to constrained_conf_gen.py
1 parent 607859d commit 7dbe6ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/python/pipelines/rdkit/constrained_conf_gen.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def generate_conformers(molIdx, my_mol, NumOfConf, ref_mol, outputfile, coreSubs
6262
return count, errors
6363

6464

65-
if __name__ == '__main__':
65+
def main():
6666
parser = argparse.ArgumentParser(description='RDKit constrained conformer generator')
6767
parameter_utils.add_default_io_args(parser)
6868
parser.add_argument('-n', '--num', type=int, default=10, help='number of conformers to generate')
@@ -122,3 +122,7 @@ def generate_conformers(molIdx, my_mol, NumOfConf, ref_mol, outputfile, coreSubs
122122
if totalErrors > 0:
123123
metrics['__ErrorCount__'] = totalErrors
124124
utils.write_metrics(output_base, metrics)
125+
126+
127+
if __name__ == "__main__":
128+
main()

0 commit comments

Comments
 (0)