polyga is a genetic algorithm written in Python and designed to create new polymers, although, it is implemented it in such a way that it can be a framework for other design tasks. The user creates a PolyPlanet with various PolyLands that have unique environments and PolyNations that have unique cultures. Combined, these environmental and culutral factors influence the evolution of your polymers. PolyPlanet keeps track of the PolyLands and PolyNations and facilitates migration between nations.
If you run into any issues, post an issue in the "Issues" tab on the github source code page.
pip install polyga
conda create -n polyga python=3.7
conda activate polyga
- Run pip install
- Running polyga
- Analyzing polyga run
- Prediction of properties
- Fingerprinting function
- Creating fitness functions
- (OPTIONAL) tutorial background
Joseph Kern ([email protected])
Chiho Kim ([email protected])
Sure, you can either email me with your idea or write it up in a separate branch and request it be merged.
Please create a new issue on github and I will get to it as soon as I can!
Typically, fitness scores are population and land dependent, meaning a polymer will have a different score in different populations. I do not want the user to mistakingly sort polymers from different nations with the fitness score they acquire on their land, as the comparison is not accurate.
I wanted to generalize the code so other users could change how they generate the species, predict on them and run fingerprinting. However, I have added tutorials to showcase how I originally intended the algorithm to run.
There are so many possible fitness functions one could use, it just doesn't make sense to hard code them into the model. I do provide examples for you to use, however.
This database is easy to import with pandas and can be saved during runtime.
This could be because you've generated a lot of polymers. I've found it can take a minute or two to load when I have over 100,000 polymers.
I wanted to replicate the way evolution occurs in nature. I thought it would be more fun to implement with the idea that the land you are in can affect a species' evolution, and the nation they live in can affect culture. For instance, people living in Australia typically have higher rates of skin cancer (mutation rate), and people in the U.S. are (typically) monogamous (number of parents in a family).
If you create your own dna list, you should keep access to it and refer back to that for which chromosome_id corresponds with which chromosome. Else, the default dna list will have the list of all chromosomes.
If they only have one connection joint, they are automatically removed. This prevents the removal of all connection joints.
-
J. Kern, L. Chen, C. Kim, and R. Ramprasad, “Design of polymers for energy storage capacitors using machine learning and evolutionary algorithms,” J Mater Sci, Sep. 2021, doi: 10.1007/s10853-021-06520-x.
-
Chiho Kim, R. Batra, L. Chen, H. Tran, and R. Ramprasad, “Polymer design using genetic algorithm and machine learning,” Computational Materials Science, vol. 186, p. 110067, Jan. 2021, doi: 10.1016/j.commatsci.2020.110067.