MobleyLab / chemper

Repository for Chemical Perception Sampling Tools
MIT License
19 stars 10 forks source link

Change recursive functions to while loops #57

Open bannanc opened 5 years ago

bannanc commented 5 years ago

Currently, adding "layers" or non-indexed atoms is done with a recursive method in the fragment_graphs and cluster_graphs. This is also true for making SMIRKS patterns for both new graphs here and ChemicalEnvironments. I tend to think that while loops are better (slightly less dangerous) than recursive methods. It would be nice to try to write these functions as loops instead of recursively.

bannanc commented 5 years ago

I have gotten mixed feedback from people about if while loops are actually preferable to recursive functions, but it is something for the person taking over this project to decide how they feel about it.