You are browsing as a guest. Sign up (or log in) to start making projects!

30h 17m 51s logged

MOONSHINE PROJECT FULLY FINISHED. In this devlog I am going to share how I was able to finally complete the Moonshine algorithm into a system that can autonomously generate novel crystal structures. Firstly The Beta and Gamma processing layers were changed to use locally hosted ollama models for the AI reasoning capabilities. In the Gamma layer a few changes were made as well. After constant experimenting with different AI models and architectures for the pipeline this was the one that I landed on. In the Gamma layer Ollama uses Deepseek to generate parameters for PyXtal crystal structure generation. I learned through constant experimentation that the PyXtal library’s randomness for crystal structure generation is much worse than I thought initially. Initially I thought with 10-20 tries the right structure would be generated. But no. Now what happens is the pipeline takes the parameters generated by deepseek and creates 500 pyXtal crystal structures. This adds about 3 minutes to the compute time for each candidate coming in from the Beta Processing Layer, but increases total accuracy by about 40%. The reason this helps is because PyXtal doesn’t get the structure right the first time, so by creating 500 and then picking the lowest energy generation we get the best structure we can from PyXtal. The next change made was the CHGNet relaxation phase inside of the Gamma Processing Layer. Initially I was using a random combination of convergence values, and structure optimizers. I changed that so now there are two layers to the relaxation phase. The first phase is a rough, low level, coarse relaxation that creates a rough initial structure, this is done by keeping the convergence value at 0.01 and using the basic UnitCellFillter optimizer. In the more stricter final relaxation pass the convergence value is tightened to 0.001 and the more advanced FrechetCellFilter is used. This has two benefits. firstly after the first pass the structure can be checked for validity and discarded if it is invalid before moving onto more expensive relaxation, secondly the structure created by PyXtal is relaxed more gently, by first getting an initial form and then being tightened down to its final form instead of taking the initial broken PyXtal structure and immediately forcing it into a tight final structure. It’s kind of like working with clay when making pots. Next comes the new Delta Processing Layer. The delta processing layer tests the structures made by the Gamma Processing layer further by subjecting it to a suite of tests. Atomic overlap, composition, coordination number plusability, oxidation number plusability, and structure matching against the materials project is tested on the crystal. This is done five times per candidate in beta since gamma produces five structures per candidate. This effectively tests validity and novelty for each structure. Finally comes the new Epsilon Processing Layer. This layer analyzes the structures created to give a better understanding of what we created, along with creating slab structures for the unit cell structure. Slab structures are just unit cell structures repeated into 3d space. Unit cell analysis returns density, unit cell volume, lattice parameters, final space group symmetry, local atomic geometry, bond lengths, bond angles, and prototype classification. Then comes the slab analisis. First the slabs are created by pymatgen, the main library used in this entire project, and analyzed for the following: surface symmetry, polarity, surface normal vectors, scale factors, center of mass alignment, termination layer composition, candidate adsorption sites, and total surface area. Slabs are created along the three Miller indices; there are just numbers that tell how the crystal is sliced in 3d space in reference to the three axes, (1,0,0) (1,1,0) and (1,1,1). And that’s the algorithm I spent over a month on. Now I have to just leave it running for a while and see if it finds any new crystal materials.  

0
6

Comments 0

No comments yet. Be the first!